@@ -63,9 +63,7 @@ def run(self):
63
63
# submits the input file to mopac
64
64
process = Popen ([self .executablePath , self .inputFilePath ])
65
65
process .communicate ()# necessary to wait for executable termination!
66
- #Wait for OS to flush the buffer to disk. There should be a better way
67
- # import time
68
- # time.sleep(1)
66
+
69
67
return self .verifyOutputFile ()
70
68
71
69
def verifyOutputFile (self ):
@@ -88,7 +86,7 @@ def verifyOutputFile(self):
88
86
if not os .path .exists (self .outputFilePath ):
89
87
logging .debug ("Output file {0} does not (yet) exist." .format (self .outputFilePath ))
90
88
return False
91
-
89
+
92
90
InChIMatch = False #flag (1 or 0) indicating whether the InChI in the file matches InChIaug this can only be 1 if InChIFound is also 1
93
91
InChIFound = False #flag (1 or 0) indicating whether an InChI was found in the log file
94
92
@@ -195,31 +193,6 @@ def inputFileKeywords(self, attempt):
195
193
"""
196
194
raise NotImplementedError ("Should be defined by subclass, eg. MopacMolPM3" )
197
195
198
- def generateQMData (self ):
199
- """
200
- Calculate the QM data and return a QMData object, or None if it fails.
201
- """
202
- if self .verifyOutputFile ():
203
- logging .info ("Found a successful output file already; using that." )
204
- source = "QM MOPAC result file found from previous run."
205
- else :
206
- self .createGeometry ()
207
- success = False
208
- for attempt in range (1 , self .maxAttempts + 1 ):
209
- self .writeInputFile (attempt )
210
- logging .info ('Trying {3} attempt {0} of {1} on molecule {2}.' .format (attempt , self .maxAttempts , self .molecule .toSMILES (), self .__class__ .__name__ ))
211
- success = self .run ()
212
- if success :
213
- source = "QM {0} calculation attempt {1}" .format (self .__class__ .__name__ , attempt )
214
- break
215
- else :
216
- logging .error ('QM thermo calculation failed for {0}.' .format (self .molecule .toAugmentedInChI ()))
217
- return None
218
- result = self .parse () # parsed in cclib
219
- result .source = source
220
- return result # a CCLibData object
221
-
222
-
223
196
class MopacMolPM3 (MopacMol ):
224
197
225
198
#: Keywords that will be added at the top and bottom of the qm input file
@@ -368,4 +341,4 @@ def inputFileKeywords(self, attempt):
368
341
multiplicity_keys ,
369
342
)
370
343
371
- return top_keys , bottom_keys , polar_keys
344
+ return top_keys , bottom_keys , polar_keys
0 commit comments