Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions biskit/exe/delphi.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,14 @@ class Delphi( Executor ):
'all_aminont03.in',
'all_nuc02.in' ]

RE_E_GRID = r'total grid energy\s+:\s+(?P<egrid>[0-9\-\.]+)\s+kt'
RE_E_COUL = r'coulombic energy\s+:\s+(?P<ecoul>[0-9\-\.]+)\s+kt'
RE_E_SELF = r'self-reaction field energy\s+:\s+(?P<eself>[0-9\-\.]+)\s+kt'
RE_E_RXN = r'corrected reaction field energy\s*:\s+(?P<erxn>[0-9\-\.]+)\s+kt'
RE_E_RXNT = r'total reaction field energy\s*:\s+(?P<erxnt>[0-9\-\.]+)\s+kt'
RE_SURFCH = r'total s\.charge\,no epsin carrying\s*:\s+(?P<scharge>[0-9\-\.]+)'
RE_E_GRID = r'Energy> Total grid energy\s+:\s+(?P<egrid>[0-9\-\.]+)\s+kT'
RE_E_COUL = r'Energy> Coulombic energy\s+:\s+(?P<ecoul>[0-9\-\.]+)\s+kT'
RE_E_RXN = r'Energy> Corrected reaction field energy\s*:\s+(?P<erxn>[0-9\-\.]+)\s+kT'
#Note: These are energy values not in the output of Delphi v8 anymore.
#Programs relying on these energy terms will fail
#RE_E_SELF = r'self-reaction field energy\s+:\s+(?P<eself>[0-9\-\.]+)\s+kT'
#RE_E_RXNT = r'total reaction field energy\s*:\s+(?P<erxnt>[0-9\-\.]+)\s+kT'
#RE_SURFCH = r'total s\.charge\,no epsin carrying\s*:\s+(?P<scharge>[0-9\-\.]+)'


def __init__( self,
Expand Down Expand Up @@ -582,7 +584,7 @@ def isFailed( self ):
Overrides Executor method
"""
return self.output is None or \
not 'energy calculations done' in self.output
not 'PROGRAM EXITS SUCCESSFULLY' in self.output

def fail( self ):
"""
Expand All @@ -593,7 +595,7 @@ def fail( self ):
self.log.add( s )
if self.output:
s = 'The last message from DelPhi reads as follows:\n'
s += '\n'.join( self.output.split('\n')[-3:] )
s += '\n'.join( self.output.split('\n')[-300:] )
self.log.add( s )
else:
self.log.add( 'There does not seem to be any DelPhi output.')
Expand All @@ -617,8 +619,7 @@ def parseOutput( self ):
Assumes output file has been parsed into self.output
"""
r = {}
for pattern in [self.RE_E_COUL, self.RE_E_GRID, self.RE_E_RXN,
self.RE_E_SELF, self.RE_E_RXNT, self.RE_SURFCH]:
for pattern in [self.RE_E_COUL, self.RE_E_GRID, self.RE_E_RXN, ]:
ex = re.compile( pattern )
hit = ex.search( self.output )
try:
Expand Down