package SpaceGroupObject @ISA = qw() sub ConvertToFraction my ($val, $s) = @_; return "" if(abs($val) < $Threshold); return "+$s" if(abs($val - 1) < $Threshold); return "-$s" if(abs($val + 1) < $Threshold); return "$val$s"; sub BuildSymmetryOperationFromMatrix my ($x1, $y1, $z1, $t1) = @_; return $s; sub SymOpToMatrix my ($symopstr) = (@_); return ($x, $y, $z, $t); sub SPGName return shift->{'SPGName'}; sub SetSPGName sub SetSPGName { my ($this,$name)= return $this->{'SPGName'} = $name; sub iSPG return shift->{'iSPG'}; sub SetiSPG sub SetiSPG { my ($this,$i)= return $this->{'iSPG'} = $i; sub iSet return shift->{'iSet'}; sub SetiSet sub SetiSet { my ($this,$i)= return $this->{'iSet'} = $i; sub Volume return shift->{'ITableVolume'}; sub nTranslation my $this = shift; return $this->{'nTranslation'} if($this->{'nTranslation'}); return $this->{'nTranslation'} = 1; sub nSymmetryOperation return shift->{'nSymmetryOperation'}; sub SymmetryOperation sub SymmetryOperation { my ($this, $i)= return $this->{"SymmetryOperation[$i]"}; sub LatticeSystem return shift->{'LatticeSystem'}; sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub SetP1 my ($this) = @_; sub GetBravaisLattice my ($this) = @_; return $BravaisLattice; sub DoSymmetryOperation my ($this, $iop, $x, $y, $z, $IsReduce01) = @_; return ($xs,$ys,$zs); sub DoVelocitySymmetryOperation my ($this, $iop, $vx, $vy, $vz) = @_; return (0, 0, 0) if(not defined $vx); return ($vxs,$vys,$vzs); sub AnalyzeTranslation my ($this) = @_; return $this->{"nTranslation"}; return $this->{"nTranslation"}; return $this->{"nTranslation"}; return $this->{"nTranslation"}; return $this->{"nTranslation"}; return $this->{"nTranslation"}; sub TranslationVector my ($this, $i) = @_; return ($x, $y, $z); sub ClearSymmetryOperation my ($this) = @_; return 0; sub AddSymmetryOperation my ($this, $symop) = @_; return unless($symop); return $n if(lc $symop eq lc $this->{"SymmetryOperation[$i]"}); return $this->{'nSymmetryOperation'}; return $n; sub SymmetryOperationByMatrix my ($this, $i) = @_; sub LatticeParameters my ($this) = @_; sub SetLatticeParameters my ($this,$a,$b,$c,$alpha,$beta,$gamma) = @_; return 1; sub SetLatticeSystem my ($this, $latticesystem, $SearchByLatticeParameter, $tollatt, $tolangle) = @_; return $this->{LatticeSystem} = $latticesystem; return if($a == 0.0 or $b == 0.0 or $c == 0.0); return $this->{LatticeSystem} = 'rhombohedral'; return $this->{LatticeSystem} = 'trigonal'; return $this->{LatticeSystem} = 'cubic'; return $this->{LatticeSystem} = 'trigonal'; return $this->{LatticeSystem} = 'tetragonal'; return $this->{LatticeSystem} = 'hexagonal'; return $this->{LatticeSystem} = 'orthorhombic'; return $this->{LatticeSystem} = 'monoclinic'; return $this->{LatticeSystem} = 'triclinic'; sub ExpandSymmetryOperation my ($this,$iCenter) = @_; return (@list); sub LatticeSystemFromSPGName my ($this, $SPGName) = @_; return 'cubic' if($SPGName =~ /4/ and $SPGName =~ /3/); return 'cubic' if($SPGName =~ /[FI]/ and $SPGName =~ /3/); return 'tetragonal' if($SPGName =~ /4/); return 'hexagonal' if($SPGName =~ /6/); return 'trigonal' if($SPGName =~ /3/); return 'orthogonal' if($SPGName =~ /2.*2/); return 'orthogonal' if($SPGName =~ /[mnabc].*[mnabc]/); return 'monoclinic' if($SPGName =~ /2/); return 'monoclinic' if($SPGName =~ /^\s*\S\s*[mnabc]/); return 'triclinic' if($SPGName =~ /1/);