package VASP @ISA = qw() sub ClearAll sub ClearAll { my $this= sub FileType return shift->{'FileType'}; sub FileName return shift->{'FileName'}; sub SetFileName sub SetFileName { my ($this,$f)= return $this->{'FileName'} = $f; return shift->{'DataArray'}; my ($this, $da) = @_; return $this->{'DataArray'} = $da; sub SetSampleName sub SetSampleName { my ($this,$n)= return $this->{'SampleName'} = $n; sub SampleName return shift->{'SampleName'}; sub KListDBDir my $this = shift; return $this->{'KListDBDir'} if($this->{'KListDBDir'}); return $this->{'KListDBDir'} = $KListDBDir; sub SetKListDBDir my($this, $d) = return $d; sub GetFileName my($this, $path, $fname) = return $path2; sub GetINCARFileName sub GetINCARFileName { my($this,$f)= return $this->GetFileName($f, "INCAR"); sub GetOUTCARFileName sub GetOUTCARFileName { my($this,$f)= return $this->GetFileName($f, "OUTCAR"); sub GetKPOINTSFileName sub GetKPOINTSFileName { my($this,$f)= return $this->GetFileName($f, "KPOINTS"); sub GetPOSCARFileName sub GetPOSCARFileName { my($this,$f)= return $this->GetFileName($f, "POSCAR"); sub GetCONTCARFileName sub GetCONTCARFileName { my($this,$f)= return $this->GetFileName($f, "CONTCAR"); sub GetPOTCARFileName sub GetPOTCARFileName { my($this,$f)= return $this->GetFileName($f, "POTCAR"); sub GetEIGENVALFileName sub GetEIGENVALFileName { my($this,$f)= return $this->GetFileName($f, "EIGENVAL"); sub GetCARDir my($this, $path)= return $path if(-d $path); return Deps::MakePath($drive, $dir); return $dir; sub SpinPolarized sub SpinPolarized { my ($this,$s) = return $this->{IsSpinPolarized} = $s; sub IsSpinPolarized my ($this) = @_; return $this->{IsSpinPolarized} if(defined $this->{IsSpinPolarized}); return 0; sub DataArray sub DataArray { my ($this)= return $this->{DataArray}; sub SetDataArray my ($this, $da) = @_; return $this->mw()->{DataArray} = $this->{DataArray} = $da; return $this->{DataArray} = $da; sub CheckFileType my ($path) = @_; return "VASP Output file"; return undef unless($in); return "VASP DOSCAR file" if($IsBig); return undef; return "VASP EIGENVAL file"; return undef; sub new my ($module) = @_; return $this; sub DESTROY sub DESTROY { my $this = sub ReadOUTCAR my ($this, $path, $target) = @_; return undef unless($in); return $path; sub ReadKeyValue my ($this, $RegExp, $def, $path) = @_; return 0.0 if(!defined $in); return $val; sub ReadFermiEnergy my ($this, $path) = @_; return 0.0 if(!defined $in); return $EF; sub ReadOUTCARValues my ($this, $path) = @_; return 0.0 if(!defined $in); return; sub ReadDOSCAR my ($this, $path) = @_; return undef unless($in); return $path; sub ReadEIGENVALtoArray my ($this, $EIGENVALPath, $EF) = @_; return undef unless($in); return ($nn, $nK, $nLevels, \@EnergyBands, \@KPointInf); sub ReadEIGENVAL my ($this, $path) = @_; return undef unless($in); return $path; sub ReadFiles my ($this, $filename, $TargetData) = @_; return $this->ReadOUTCAR($filename, $TargetData); return $this->ReadOUTCAR($filename, "EnergyLevels"); return $this->ReadDOSCAR($filename); return $this->ReadEIGENVAL($filename); return undef; sub RWIGSFromINCAR my ($this, $filename) = @_; return -1; return @RWIGS; sub ReadAtomTypesFromPOTCAR my ($this, $filename, $IsPrint, $AllowDuplicate) = @_; return -1; return @AtomTypes; sub ReadStructureFromCARFiles my ($this, $CARDir, $IsPrint, %hash) = @_; return -1 if(@Atomtypes == 0 or $Atomtypes[0] eq "-1"); return -1; return $crystal; sub GetPOTCARList my ($this, $name, $Functional, $UseDPP, $UseRecommendedPOTCAR) = @_; return @POTFiles if(@POTFiles > 0); return (@POTFiles); sub MakePOTCARFile my ($this, $Crystal, $Functional, $UseDPP, $fname, $pParams) = @_; return 0; return -1; return ($fname, @POTFiles); sub ModifyPOSCARFile my ($this, $POSCARPath, $A, $a, $b, $c, $alpha, $beta, $gamma) = @_; return undef; sub ModifyPOSCARFile2 my ($this, $Function, $InputFile, $OutputFile, %hash) = @_; return undef if(@lines == 0); return undef; sub ModifyINCARFile my ($this, $Function, $InputFile, $OutputFile, $AllSeparated, $MinEnergy, $MaxEnergy, $DOSMeasuredFromEF, $FromScratch, $Precision, $KeepSymmetry, $nMesh, $SpinPolarized, $PStress, $pParamHash, $NBANDS, $NELECT, $pParams) = @_; return; return; sub MakeKPOINTSForFS my ($this, $KListPath, $CheckPath, $Crystal, $Title, $UseSymmetry, $nx, $ny, $nz, $K, $IsPrint) = @_; return (0); return (1, @KIndex); sub ReadElementFromPOT my ($this, $potfile) = @_; return -1; return $val; sub ReadRWIGSFromPOT my ($this, $potfile) = @_; return -1; return $val; sub ReadSystemName my ($this, $infile) = @_; return undef if(!defined $pHash->{SYSTEM}); return $pHash->{SYSTEM}; sub GetFileNameFromSystemName my ($this, $dir, $ext) = @_; return undef if(!defined $fname); return Utils::ConvertToValidFileName(Deps::MakePath("$drive$directory", "$fname$ext", 0)); sub LatticeConversionForDensityFile my ($this, $InputVASPFile, $ConvertedVASPFile, $NewCrystal, $T, $tRT) = @_; sub ReadDensityFileToHash my ($this, $path) = @_; return undef if(!$in->Open($path, "r")); return \%hash; sub SaveDensityFileFromHash my ($this, $path, $phash) = @_; return undef if(!$out->Open($path, "w")); sub ReadINCARtoHash my ($this, $infile) = @_; return undef; return \%hash; sub ReadKPOINTStoHash my ($this, $infile) = @_; return undef; return \%hash; sub ReadPOTCARtoHash my ($this, $infile) = @_; return undef; return \%hash; sub GetTotalValenceElectrons my ($this, $infile) = @_; return $nVEL; sub GetFinalIonCharges my ($this, $infile) = @_; return (\@AtomName, \@SiteIndex, \@Charge, \@Magnetization); sub ReadPOSCARtoHash my ($this, $dir) = @_; return undef; return \%hash; sub ReadStructuresFromOUTCAR my ($this, $infile) = @_; return (); return (@Crystals); sub ReadOUTCARtoHash my ($this, $infile) = @_; return undef; return \%hash; sub ReadEgFromDOSOUTCAR my ($this, $DOSOUTCAR) = @_; return (); return ($EF, $VBM, $CBM, $Eg); sub ReadFromDOSCSV my ($this, $Dir) = @_; sub MakeINCARFile my ($this, $Crystal, $Function, $Functional, $UseDPP, $SpinPolarized, $fname, $pParams) = @_; return 0; return 1; sub MakePOSCARFile my ($this, $Crystal, $Function, $fname, $UseConventionalCell, $pParams) = @_; return 0; return 1; sub AnalyzeaKProduct my ($this, $Crystal, $aKProduct) = @_; return ($nx, $ny, $nz, $NKREDX, $NKREDY, $NKREDZ); sub ReadIBZKPT my ($this, $IBZKPTFile) = @_; return ($nK, \@lines, \@SCFKList); sub ReadKListFromklist my ($this, $klistFile) = @_; return ($nKPoints, \@lines, \@klists); sub ReadKListFromKPOINTS my ($this, $klistFile) = @_; return ($nKPoints, \@lines, \@klists); sub MakeBandKPOINTSFileFromKLISTForHF my ($this, $Function, $OutputName, $klistFile, $UseGammaOnly, $nKPointDiv, $KPoints, $aKProduct, $pParams) = @_; return; return undef; sub MakeBandKPOINTSFileForHF my ($this, $Crystal, $CellType, $Function, $fname, $UseGammaOnly, $nKPointDiv, $KPoints, $aKProduct, $pParams) = @_; return undef; sub MakeKPOINTSFileFromKLIST my ($this, $Function, $OutputName, $klistFile, $UseGammaOnly, $nKPointDiv, $KPoints, $aKProduct, $pParams) = @_; return; return undef; return undef; sub MakeKPOINTSFile my ($this, $Crystal, $CellType, $Function, $fname, $UseGammaOnly, $nKPointDiv, $KPoints, $aKProduct, $pParams) = @_; return undef; return $KListFilePath; sub SaveVASPFiles my ($this, $Crystal, $CellType, $UseConventionalCell, $Function, $Functional, $UseDPP, $SpinPolarized, $Dir, $IsChooseRandomly, $pParams) = @_; return () if($ret <= 0); return ($INCAR) if($ret <= 0); return ($INCAR, $POSCAR) if($ret <= 0); return ($INCAR, $POSCAR, $POTCAR) if(!defined $KListFile); return ($KListFile, $INCAR, $POSCAR, $POTCAR, $KPOINTS);