package GULP @ISA = qw() sub CheckFileType my ($path) = @_; return "GULP DENS file"; return "GULP DISP file"; return undef; sub ReadFiles my ($this, $filename, $TargetData) = @_; return $this->ReadDENS($filename, $TargetData); return $this->ReadDISP($filename); return undef; sub LibraryDir my $this = shift; return $this->{'LibraryDir'} if($this->{'LibraryDir'}); return $this->{'LibraryDir'} = $GULPLibDir; sub SetLibraryDir sub SetLibraryDir { my($this,$d)= return $this->{'LibraryDir'} = $d; sub SetSampleName my ($this, $name) = @_; return $this->{'SampleName'} = $name; sub SampleName my ($this) = @_; return $this->{'SampleName'}; sub SetLibraryFile my ($this, $file) = @_; return $this->{'LibraryPath'}; sub LibraryPath my ($this) = @_; return $this->{'LibraryPath'}; sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub ReadDENS my ($this, $path) = @_; return undef unless($in); return $path; sub ReadDISP my ($this, $path) = @_; return undef unless($in); return $path; sub ReadSpecies my ($this, $atom, $cstype) = @_; return ("$atom core 0.0", '') if($cstype eq 'undefined'); return () unless(open(IN,"<$GULPLibaryPath")); return ($SpeciesCore, $SpeciesShell); sub ReadSpring my ($this, $atom, $cstype) = @_; return ('', '') if($cstype eq 'core' or $cstype eq 'undefined'); return '' unless(open(IN,"<$GULPLibaryPath")); return $Spring; sub ReadBuckinghamPotential my ($this, $atom1, $atom2, $cstype1, $cstype2) = @_; return () unless(open(IN,"<$GULPLibaryPath")); sub GetnAtomFromMDHistory my ($this, $fname) = @_; return 0 unless(open(IN,"<$fname")); return $count; sub GetMDStepFromMDHistory my ($this, $fname) = @_; return 0 unless(open(IN,"<$fname")); return $count; sub GetNextCrystalStructureFromMDHistory my ($this, $in, $nAtom) = @_; return -2; return (1,1) if($a eq ''); return ($CIF,$TotalTime); sub ExtractCrystalStructureFromMDHistory my ($this, $fname, $istep) = @_; return (0,0) unless(open(IN,"<$fname")); return -2; return (1,1) if($a eq ''); return ($CIF,$TotalTime); sub ExtractCrystalStructuresFromOptimiseOutput my ($this, $fname, $iFileType) = @_; return $this->ExtractCrystalStructureFromOptimiseOutput2($fname) if($iFileType == 2); return $this->ExtractCrystalStructureFromOptimiseOutput1($fname) if($iFileType == 1); sub ExtractCrystalStructureFromOptimiseOutput2 my ($this, $fname) = @_; return 0 unless(open(IN,"<$fname")); return -1; return -2; return $CIF; sub ExtractCrystalStructureFromOptimiseOutput1 my ($this, $fname) = @_; return 0 unless(open(IN,"<$fname")); return -1; return -2; return $CIF; sub GetCCrystalFromInput my ($this, $fname) = @_; return 0 unless($in); return -2; return $Crystal; sub SaveMDLatticeHistoryToCSV my ($this, $infile, $outfile) = @_; return -1 unless(open(IN, "<$infile")); return -2; return 1; sub SaveMDPropertyHistoryToCSV my ($this, $infile, $outfile) = @_; return -1 unless(open(IN, "<$infile")); return -2; return 1; sub SetUseShellModelForCation my ($this,$val) = @_; return $this->{'UseShellModelForCation'} = $val; sub UseShellModelForCation my ($this) = @_; return $this->{'UseShellModelForCation'}; sub SetUseShellModelForAnion my ($this,$val) = @_; return $this->{'UseShellModelForAnion'} = $val; sub UseShellModelForAnion my ($this) = @_; return $this->{'UseShellModelForAnion'}; sub SaveGULPInputFile my ($this, $Crystal, $Function, $filename, $IsChooseRandomly) = @_; return; return 1;