On Mon, Nov 23, 2020 at 1:28 PM Hai Nguyen <nhai.qn.gmail.com> wrote:
> hi Pietro,
>
> I don't know "why" but here is what I tried with your commands (in my
> macbook) and I did not get NAN.
>
> conda create -n at20 python=3.8 -y
>
> conda activate at20
>
> conda install ambertools -c conda-forge
>
>
> This will create a new python environment with ambertools 20.
>
> Please give it a try.
>
>
>
And here is the cpptraj version that pytraj is using:
In [*3*]: pt.__cpptraj_internal_version__
Out[*3*]: 'V4.25.6'
> Hai
>
> On Mon, Nov 23, 2020 at 5:16 AM Pietro ARONICA <pietroa.bii.a-star.edu.sg>
> wrote:
>
>> Hello,
>> It is definitely the autoimage command that is misbehaving. It works fine
>> if I use it with cpptraj, but not with pytraj.
>> I generated a capped alanine residue with leap and solvated it. Then I
>> autoimaged it using the two programs.
>> With cpptraj, I did:
>> cpptraj Solvated_capALA.pdb -y Solvated_capALA.pdb
>> autoimage
>> trajout Imaged_cpptraj.pdb
>>
>> With python, I did:
>> import pytraj as pt
>> pdb = pt.load('Solvated_capALA.pdb')
>> ima = pdb.autoimage()
>> pt.write_traj('Imaged_python.pdb', ima)
>>
>> As you can see, the version imaged by python gives nan for all the waters
>> (as well as a 0 in the box X dimension), while the cpptraj version is
>> perfectly fine.
>> I don't know which specific binary the two are using and whether there is
>> a difference between the two. My pytraj is located here:
>>
>> /usr/local/amber18/lib/python2.7/site-packages/pytraj-2.0.5-py2.7-linux-x86_64.egg/pytraj/__init__.pyc
>> If I can't figure out how to fix this, how can I at least point to the
>> correct autoimage code used by cpptraj?
>> Thank you for any help
>> Pietro
>> ________________________________
>> From: Hai Nguyen <nhai.qn.gmail.com>
>> Sent: Thursday, November 19, 2020 10:43 PM
>> To: AMBER Mailing List <amber.ambermd.org>
>> Subject: Re: [AMBER] pytraj
>>
>> Do you mean the 'autoimage' command in pytraj? If "yes", it should be fine
>> since it's from cpptraj itself.
>>
>> Hai
>>
>> On Wed, Nov 18, 2020 at 11:22 PM Pietro ARONICA <
>> pietroa.bii.a-star.edu.sg>
>> wrote:
>>
>> > Thank you for your response.
>> > I have used the verbose version and the test systems to diagnose the
>> > problem, and I've made some progress. With the test system, it still
>> gives
>> > me a 0 on the first CRYST1 record, which it never used to do. The real
>> > issue I've found is the autoimage command; when used with one of my
>> > trajectories, it causes the output pdb to have nan in the pdb. Even
>> worse,
>> > the command hangs indefinitely when used with the test system. Again,
>> this
>> > autoimage command seemed to work fine when I used it up to two days ago.
>> > I'm not sure what the code of the autoimage command is, where to find it
>> > and what might have gone wrong. Maybe it relies on another python
>> library
>> > that was updated recently.
>> > Pietro
>> >
>> > ________________________________
>> > From: Hai Nguyen <nhai.qn.gmail.com>
>> > Sent: Thursday, November 19, 2020 8:26 AM
>> > To: AMBER Mailing List <amber.ambermd.org>
>> > Subject: Re: [AMBER] pytraj
>> >
>> > Dear Pietro,
>> >
>> > > Has there been an update to pytraj in the past 24-48 hours?
>> >
>> > No, I don't think so. There has been NO update for pytraj for at least
>> the
>> > last 6 months from the release.
>> > How did you install pytraj (via ambertools?)
>> >
>> > Can you turn on the pytraj's verbose to see the message from cpptraj
>> (which
>> > is used by pytraj under the hood):
>> >
>> > pytraj._verbose()
>> > pytraj.write_traj(...)
>> >
>> > What's your exact commands?
>> >
>> > Can you reproduce the issue If you replace your systems with the tests
>> > system (tz2.ortho.nc, tz2.ortho.parm7) in here:
>> > https://github.com/Amber-MD/pytraj/tree/master/tests/data
>> >
>> > Hai
>> >
>> >
>> > On Wed, Nov 18, 2020 at 12:04 PM Pietro ARONICA <
>> pietroa.bii.a-star.edu.sg
>> > >
>> > wrote:
>> >
>> > > Hello all,
>> > > Has there been an update to pytraj in the past 24-48 hours? My code,
>> > which
>> > > relies on the python implementation of cpptraj, no longer works. It
>> reads
>> > > trajectory and restart files fine, as far as I can tell; they seem to
>> > have
>> > > all the correct box parameters. However, using pytraj.write_traj to
>> write
>> > > them into pdb gives a file where the CRYST1 record either has all
>> zeroes
>> > > for the box, or the first one is a zero and the others are correct.
>> > > Furthermore, it also outputs the coordinates of all waters as nan.
>> This
>> > > code worked perfectly fine up to a few days ago, so I'm wondering what
>> > > happened. Trying different pytraj commands like load, save and
>> write_traj
>> > > with different options do not seem to solve the issue; in each case,
>> the
>> > > CRYST1 records are incorrect and in some cases the waters have nan
>> > > coordinates.
>> > > The problem seems to be only with pytraj. Loading, reading and writing
>> > the
>> > > same files with the interactive, normal version of cpptraj has no
>> issue,
>> > > but my workflow requires the python implementation.
>> > > Does anyone have any clues?
>> > > Pietro
>> > > This e-mail and any attachments are only for the use of the intended
>> > > recipient and may contain material that is confidential, privileged
>> > and/or
>> > > protected by the Official Secrets Act. If you are not the intended
>> > > recipient, please delete it or notify the sender immediately. Please
>> do
>> > not
>> > > copy or use it for any purpose or disclose the contents to any other
>> > person.
>> > > _______________________________________________
>> > > AMBER mailing list
>> > > AMBER.ambermd.org
>> > > http://lists.ambermd.org/mailman/listinfo/amber
>> > >
>> > _______________________________________________
>> > AMBER mailing list
>> > AMBER.ambermd.org
>> > http://lists.ambermd.org/mailman/listinfo/amber
>> > This e-mail and any attachments are only for the use of the intended
>> > recipient and may contain material that is confidential, privileged
>> and/or
>> > protected by the Official Secrets Act. If you are not the intended
>> > recipient, please delete it or notify the sender immediately. Please do
>> not
>> > copy or use it for any purpose or disclose the contents to any other
>> person.
>> > _______________________________________________
>> > AMBER mailing list
>> > AMBER.ambermd.org
>> > http://lists.ambermd.org/mailman/listinfo/amber
>> >
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>> This e-mail and any attachments are only for the use of the intended
>> recipient and may contain material that is confidential, privileged and/or
>> protected by the Official Secrets Act. If you are not the intended
>> recipient, please delete it or notify the sender immediately. Please do not
>> copy or use it for any purpose or disclose the contents to any other person.
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Nov 23 2020 - 11:00:02 PST