patonlab/wSterimol

Error message running example

gregoryprice12 opened this issue · 4 comments

Hi Im trying to calculate sterimol parameters for the example and keep getting the following error:

Traceback (most recent call last):
File "C:\Users\greg\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\wSterimol.py", line 25, in wSterimol
if generate(dihedrals, directory, setup_path, verbose):
NameError: name 'generate' is not defined

Any chance some can help with this?

Hi,
I am experiencing this same issue. I noticed that you closed this and was wondering if you had found a solution to this issue?
Thanks.

How are you loading the wSterimol scripts into PyMol?

One of the underlying scripts is called generate.py, and this error would suggest that it has not yet been initialized in PyMol (with the run command).

If you have added the 11 run commands into the .condarc file, then when you open PyMol it will try to execute those commands. If that works without error, then generate should be defined.

If you install via the Plugin manager, make sure to separately install all 11 python files. A copy will be made in the plugins directory. In the example above, it looks like generate.py has not been copied across. You could check by viewing the plugins folder (e.g., something like C:\Users\greg\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup) and confirming whether or not the 11 python files associated with wStermol have bene copied there.

Thank you for your reply. Once I made sure that each of the Python scripts had successfully been executed in Pymol, this seemed to fix the issue, thus allowing me to perform the wSterimol analysis. Thank you again for your help.

Awesome. I'm about to update the code on here so that you can take externally generated conformers and obtain the parameters in pymol. This might be preferable if you run e.g. Gaussian on a different machine or cluster.