Skip to content

Commit

Permalink
rmgpy/qm/mopac.py: Wait for 1 sec for the buffer to write to disc.
Browse files Browse the repository at this point in the history
Temporary solution to avoid attribute errors from cclib during parsing.
See issue #134
  • Loading branch information
keceli authored and rwest committed Oct 17, 2019
1 parent cdb60c7 commit e03016c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rmgpy/qm/mopac.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def run(self):
stdout, stderr = process.communicate(input=command) # necessary to wait for executable termination!
if b"ended normally" not in stderr.strip():
logging.warning("Mopac error message:" + stderr.decode('utf-8'))

import time
time.sleep(1)
# copy output file from temp dir to output dir:
tempOutFile = os.path.join(dirpath, os.path.basename(self.output_file_path))
shutil.copy(tempOutFile, self.output_file_path)
Expand Down

0 comments on commit e03016c

Please sign in to comment.