Amber-MD / pytraj

Python interface of cpptraj
https://amber-md.github.io/pytraj
170 stars 38 forks source link

Error when search for Hbonds #1574

Closed IsmaheneMesbah closed 3 years ago

IsmaheneMesbah commented 3 years ago

Hi,

I want to perform H bonds analysis, I am following the tutorial:

hbonds = pt.search_hbonds(pdb_file) hbonds.values

I have the following error:

`Traceback (most recent call last):

File "/Users/macbookair/smd_software/readGromacs.py", line 109, in hbonds = pt.search_hbonds(pdb_file)

File "/opt/anaconda3/lib/python3.8/site-packages/pytraj/utils/decorators.py", line 11, in inner return f(*args, **kwd)

File "/opt/anaconda3/lib/python3.8/site-packages/pytraj/utils/get_common_objects.py", line 296, in inner kwargs['top'] = get_topology(traj, top)

File "/opt/anaconda3/lib/python3.8/site-packages/pytraj/utils/get_common_objects.py", line 57, in gettopology return top

UnboundLocalError: local variable 'top_' referenced before assignment`

hainm commented 3 years ago

Hi

traj = pt.load(pdb_file) pt.search_hbonds(traj)

IsmaheneMesbah commented 3 years ago

Thank you very much.