Update number of electrons in Gamess reader

This commit is contained in:
Anthony Scemama 2021-12-20 18:39:07 +01:00
parent b0288d0208
commit b20b799947
1 changed files with 26 additions and 1 deletions

View File

@ -58,11 +58,36 @@ class gamessFile(resultsFile.resultsFileX):
exec(get_data('date',"EXECUTION OF GAMESS BEGUN",'4:'), locals())
exec(get_data('machine',"Files used on the master node",'6:7'), locals())
exec(get_data('version',"GAMESS VERSION",'4:8'), locals())
exec(get_data('num_proc',"MEMDDI DISTRIBUTED OVER",'3:4',"int"), locals())
exec(get_data('num_elec',"NUMBER OF ELECTRONS", '4:5',"int"), locals())
exec(get_data('num_proc',"MEMDDI DISTRIBUTED OVER",'3:4',"int"), locals())
exec(get_data('charge',"CHARGE OF MOLECULE", '4:5',"float"), locals())
exec(get_data('nuclear_energy',"THE NUCLEAR REPULSION ENERGY", '5:6',"float"), locals())
def get_num_elec(self):
try:
getattr(self,'_num_elec')
except AttributeError:
self._num_elec = None
if self._num_elec is None:
text = self.text
try:
self.find_string("NUMBER OF ELECTRONS")
pos = self._pos
self._num_elec = int(text[pos].split("=")[1].strip())
except IndexError:
pass
try:
self.find_next_string("NUMBER OF ELECTRONS KEPT IN THE CALCULATION")
pos = self._pos
self._num_elec = int(text[pos].split("=")[1].strip())
except IndexError:
pass
return self._num_elec
num_elec = property (get_num_elec, None)
def get_normf(self):
try:
getattr(self,'_normf')