Re: [AMBER] Split trajectory by atom

From: The Cromicus Productions <thecromicusproductions.gmail.com>
Date: Tue, 10 Jan 2017 03:01:25 -0500

Thanks, that actually worked!

On Mon, Jan 9, 2017 at 9:26 AM, Hai Nguyen <nhai.qn.gmail.com> wrote:

> 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
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jan 10 2017 - 00:30:02 PST
Custom Search