Amber-MD / pytraj

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

native_contacts returns wrong result #1466

Closed hainm closed 5 years ago

hainm commented 5 years ago

From AMBER user:

I want to write a programme in pytraj that returns the contacts with water of a given residue. In cpptraj it works fine and identifies 3 contacts:

nativecontacts :42 :WAT writecontacts 42_water_contacts.dat resout 42_water_contacts_resout.dat distance 2.0 out 42_water_contacts_out.dat includesolvent

I tried to do the same in pytraj but the behaviour of native_contacts is not clear to me:

pytraj.native_contacts(traj, mask=':42', mask2=":WAT", distance=2.0, include_solvent=True)

This gives me 927 contacts.