Dear ChemShell Team,
I am writing to report an error I encountered while trying to analyze the MD results from the P450 enzyme tutorial using ChemShell version 25.0.2. My NAMD simulation completed successfully, but I am experiencing errors when running the md_analysis.py post-processing script.
I did some troubleshooting and traced the issue back to chemsh/tools/analysis.py around line 84:
snapshot0 = files.dcd.takeSnapshots(dict_dcd, fragObj, mute=True, irecord=ipoint) dummyFrag0 = snapshot0.getSelected(select)
Here is the following outcomes:
ipointis used here before it is defined, triggering anUnboundLocalError.- If I manually fix
ipointto0, it triggers aTypeErrorbecausefiles.dcd.takeSnapshotsno longer accepts theirecordargument in version 25.0.2. - If I update the argument to the new format (e.g.,
frames=[0]), the script crashes on the next line (dummyFrag0 = snapshot0.getSelected(select)) with anAttributeError: 'NoneType' object has no attribute 'getSelected'. It appearstakeSnapshotsno longer returns a Fragment object directly.
I am just wondering how I can overcome this situation?
I have attached the full error text for your reference.
1_solvation$ tail -f md_analysis.err
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/apps/chemsh-py-25.0.2/chemsh/objects/fragbio.py”, line 3262, in analyse
analysis.analyseMD(self, dcd=dcd, nsnapshots=nsnapshots, **kwargs)
File “/apps/chemsh-py-25.0.2/chemsh/dl_py2f/utils/miscutils.py”, line 124, in wrapper
result = proc(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/apps/chemsh-py-25.0.2/chemsh/tools/analysis.py”, line 84, in analyseMD
snapshot0 = files.dcd.takeSnapshots(dict_dcd, fragObj, mute=True, irecord=ipoint)
^^^^^^
UnboundLocalError: cannot access local variable ‘ipoint’ where it is not associated with a value
Thank you for your time and help!
Sincerely,
Ahsan