package CIFObject @ISA = qw() sub BuildCreationDateStr return $s; sub new my ($module, $filename) = @_; return $this; sub DESTROY my $this = shift; sub SetCrystalName my ($this,$name) = @_; return $name; sub CrystalName my ($this) = @_; return $this->{'CrystalName'}; sub SetFormula my ($this,$s) = @_; return $s; sub Formula my ($this) = @_; return $this->{'_chemical_formula_structural'} if(defined $this->{'_chemical_formula_sum'}); return $this->{'_chemical_formula_sum'} if(defined $this->{'_chemical_formula_sum'}); return undef; sub SetFileName my $this = shift; my $s = shift; sub FileName my $this = shift; return $this->{'FileName'}; sub Read my ($this, $f) = @_; return 0; return $ret; sub ReadByJFile my ($this, $in) = @_; return 0; return 1; sub SetOtherParameters my ($this) = @_; return; sub AddSymmetryOperation my ($this,$symop) = @_; return $this->{"nSymmetryOperation"} = $nSymmetryOperation; sub GetCSpaceGroup my ($this) = @_; return $SPG; sub SetContent my ($this, $key, $idx, $content) = @_; return $content; sub GetContent my ($this, $key, $idx, $defvalue) = @_; return $val; sub GetValue my ($this, $key, $idx) = @_; return $val; sub SetVolume my ($this,$v) = @_; return $this->SetContent("_cell_volume", $v); sub Volume my ($this) = @_; return $this->GetValue("_cell_volume"); sub SetLatticeParameters my ($this,$a,$b,$c,$alpha,$beta,$gamma) = @_; return ($a,$b,$c,$alpha,$beta,$gamma); sub LatticeParameters my ($this) = @_; return ($a,$b,$c,$alpha,$beta,$gamma); sub GetSpaceGroup my ($this) = @_; return ($SPGName, $iSPG); sub SetSpaceGroup my ($this, $SPGName, $iSPG) = @_; return ($SPGName, $iSPG); sub SetSpaceGroupInformation my ($this, $SPG) = @_; sub LatticeSystem my ($this) = @_; return &GetValue($this, "_symmetry_cell_setting"); sub nTranslation my ($this) = @_; return &GetValue($this, "nTranslation"); sub nSymmetryOperation my ($this) = @_; return &GetValue($this, "nSymmetryOperation"); sub SymmetryOperation my ($this, $i) = @_; return $val; sub nAtomType my ($this, $i) = @_; return &GetValue($this, "nAtomType"); sub SetnAtomType my ($this, $n) = @_; return $this->SetContent("nAtomType", $n); sub GetCAtomType my ($this, $i) = @_; return $atom; sub GetCAtomTypeList my ($this) = @_; return @atomlist; sub AtomType my ($this, $i) = @_; return ($name, $charge); sub AddAtomType my ($this, $atomtype) = @_; return $nAtomType if($val eq $atomtype); return $nAtomType; sub SetAsymmetricAtomSiteVelocity my ($this, $i, $vx, $vy, $vz) = @_; return $nSites; sub AsymmetricAtomSiteVelocity my ($this, $i) = @_; return ($vx, $vy, $vz); sub AddAsymmetricAtomSiteWithVelocity my ($this, $label, $atomtype, $x, $y, $z, $occ, $vx, $vy, $vz) = @_; sub AddAsymmetricAtomSite my ($this, $label, $atomtype, $x, $y, $z, $occ) = @_; return $nSites; sub SetnAsymmetricAtomSite my ($this,$n) = @_; return $this->SetContent("nAsymmetricAtomSite", $n); sub nAsymmetricAtomSite my ($this) = @_; return &GetValue($this, "nAsymmetricAtomSite"); sub GetCAsymmetricAtomSite my ($this, $i) = @_; return $atom; sub GetCAsymmetricAtomSiteList my ($this) = @_; return @atomlist; sub AsymmetricAtomSite my ($this, $i) = @_; return ($label,$type,$x,$y,$z,$occupancy); sub FillCIFData my ($this) = @_; return $crystal; sub GetCCrystal my ($this) = @_; return $crystal; sub InsertSpaceToSPGName my ($this, $SPGName) = @_; return $SPGName if($SPGName =~ /\s.+\S\s+[RHS]$/); return $SPGName if($SPGName =~ /\s/); return $SPGName; return $SPGName; sub WriteSimpleCIFFile my ($this, $NewFile, $WritePublication, $strCRLF) = @_; return 0; return 1; sub CreateCIFFileFromCCrystal my ($this, $Crystal, $NewFile, $IsChooseRandomly, $strCRLF) = @_; return 0 unless(open(OUT,">$NewFile")); return 1;