Re: [AMBER] Split trajectory by atom

From: Hai Nguyen <nhai.qn.gmail.com>
Date: Mon, 9 Jan 2017 09:26:30 -0500

There is an easy (but not very well-optimized) way. You can use pytraj

import pytraj as pt

traj = pt.load('my.nc', top='my.parm')

for i in range(1, 51):

    atom_mask = '.' + str(i)

    print(atom_mask)

    traj[atom_mask].save(str(i) + '.nc')


Hai

On Mon, Jan 9, 2017 at 5:22 AM, The Cromicus Productions <
thecromicusproductions.gmail.com> wrote:

> Hi everyone,
>
> This may be an easy question. Say I simulate a molecule that consists on 50
> atoms and get a mdcrd file. Is there an easy way to get the trajectory of
> each one of the atoms and get 50 files?
> I'm currently using a python code I did myself (which is kind of slow) and
> would like to optimize this step.
>
> Thanks a lot,
>
> Sebastian
> _______________________________________________
> 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 Jan 09 2017 - 06:30:04 PST
Custom Search