makson96 / Dynamics

Dynamics PyMOL Plugin
GNU General Public License v3.0
39 stars 17 forks source link

No such file or directory error when using positional restraints from PyMol selection #80

Closed mtrellet closed 7 years ago

mtrellet commented 7 years ago

Hello,

While trying to play with the plugin (very nice work by the way), I bumped into this error while running a simulation for which I set up some positional restraints.

Traceback (most recent call last):
  File "/usr/local/Cellar/pymol/1.8.4.0/libexec/lib/python2.7/site-packages/pmg_tk/startup/pymol_plugin_dynamics.py", line 2519, in dynamics
    status = gromacs2.restraints(project_name)
  File "/usr/local/Cellar/pymol/1.8.4.0/libexec/lib/python2.7/site-packages/pmg_tk/startup/pymol_plugin_dynamics.py", line 528, in restraints
    os.remove("posre.itp")
OSError: [Errno 2] No such file or directory: 'posre.itp'

I looked at the code (pymol_plugin_dynamics.py and it seems to me that the remove function at line 528 should be protected by a try .. except ... statement in case the file is not present? However, the absence of this file might also mean that there is another error in my GROMACS implementation..?

Thanks for the good work!

ghost commented 7 years ago

Thank you for this bug report. The issue is now fixed in the 2.1 master branch and 2.0 stable branch. Best regards,