Re: [AMBER] pytraj native contacts

From: Hai Nguyen <nhai.qn.gmail.com>
Date: Wed, 23 Jan 2019 11:31:44 -0500

On Wed, Jan 23, 2019 at 10:55 AM Rosellen, Martin <
martin.rosellen.16.ucl.ac.uk> wrote:

> Hi,
>
> 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.
>

hi, sounds like a bug in pytraj. I have a quick look and it seems that
pytraj still uses the default 7.0 cutoff.
Mean while, you can use cpptraj's style with on-disk trajectory (using
pytraj.iterload)
traj = pt.iterload(...)
pt.compute("nativecontacts :42 :WAT writecontacts 42_water_contacts.dat
resout 42_water_contacts_resout.dat distance 2.0 out
42_water_contacts_out.dat includesolvent", traj)

>
> I want to further keep the data that gets written out to
> '42_water_contacts.dat' in the cpptraj command, in a variable python
> variable.
>
> I am not sure if this is doable now in pytraj (and cpptraj?)
.Dan: Can "writecontacts" dump data to DataSet?

Hai
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jan 23 2019 - 09:00:02 PST
Custom Search