mirror of
https://gitlab.com/scemama/resultsFile.git
synced 2025-01-03 01:55:53 +01:00
Add pseudopotentials from Gaussian output
This commit is contained in:
parent
427514e36e
commit
2d33329c1c
@ -35,7 +35,7 @@ import re
|
|||||||
gaussianFile_defined_vars = [ "date", "version", "machine", "memory", "disk",\
|
gaussianFile_defined_vars = [ "date", "version", "machine", "memory", "disk",\
|
||||||
"cpu_time", "author", "title", "units", "methods", "options", \
|
"cpu_time", "author", "title", "units", "methods", "options", \
|
||||||
"spin_restrict", "conv_threshs", "energies", \
|
"spin_restrict", "conv_threshs", "energies", \
|
||||||
"ee_pot_energies", \
|
"ee_pot_energies", "pseudo", \
|
||||||
"Ne_pot_energies", "pot_energies", \
|
"Ne_pot_energies", "pot_energies", \
|
||||||
"kin_energies", "point_group", "num_elec", \
|
"kin_energies", "point_group", "num_elec", \
|
||||||
"charge", "multiplicity","nuclear_energy","dipole","geometry",\
|
"charge", "multiplicity","nuclear_energy","dipole","geometry",\
|
||||||
@ -632,6 +632,49 @@ class gaussianFile(resultsFile.resultsFileX):
|
|||||||
pass
|
pass
|
||||||
return self._lowdin_ao
|
return self._lowdin_ao
|
||||||
|
|
||||||
|
def get_pseudo(self):
|
||||||
|
if self._pseudo is None:
|
||||||
|
try:
|
||||||
|
self.find_string("Pseudopotential Parameters")
|
||||||
|
except IndexError:
|
||||||
|
return None
|
||||||
|
self._pos += 5
|
||||||
|
pos = self._pos
|
||||||
|
try:
|
||||||
|
self.find_next_string("=======")
|
||||||
|
except IndexError:
|
||||||
|
return None
|
||||||
|
end = self._pos
|
||||||
|
pseudo_read = []
|
||||||
|
text = self.text
|
||||||
|
bdict = {"S": 0, "P": 1, "D": 2, "F": 3, "G": 4, "H": 5}
|
||||||
|
while pos < end:
|
||||||
|
ecp = {}
|
||||||
|
center, _, valence = [int(x) for x in text[pos].split()]
|
||||||
|
ecp["atom"] = center
|
||||||
|
ecp["zcore"] = valence
|
||||||
|
ecp["lmax"] = 0
|
||||||
|
pos += 1
|
||||||
|
l = 0
|
||||||
|
while text[pos][:35].strip() == "":
|
||||||
|
# Read angular momentum
|
||||||
|
line = text[pos].lstrip()
|
||||||
|
buffer = line.split()
|
||||||
|
if buffer[0] in "SPDFGH":
|
||||||
|
contraction = []
|
||||||
|
l = bdict[buffer[0]]
|
||||||
|
ecp["lmax"] = max(ecp["lmax"], l)
|
||||||
|
else:
|
||||||
|
# Read gaussian parameters
|
||||||
|
power, expo, coef = int(buffer[0]), float(buffer[1]), float(buffer[2])
|
||||||
|
contraction.append( (coef, power, expo) )
|
||||||
|
ecp[str(l)] = contraction
|
||||||
|
pos += 1
|
||||||
|
pseudo_read.append(ecp)
|
||||||
|
|
||||||
|
self._pseudo = pseudo_read
|
||||||
|
return self._pseudo
|
||||||
|
|
||||||
|
|
||||||
def get_mulliken_atom(self):
|
def get_mulliken_atom(self):
|
||||||
if self._mulliken_atom is None:
|
if self._mulliken_atom is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user