10
0
mirror of https://gitlab.com/scemama/resultsFile.git synced 2024-11-07 06:33:41 +01:00

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

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')