Re: [AMBER] Split a trajectory into frames

From: Elisa Pieri <elisa.pieri90.gmail.com>
Date: Thu, 26 Jan 2017 16:30:26 +0100

Is this relevant ? :)

I need to work on the frames individually.

Elisa

On Thu, Jan 26, 2017 at 4:26 PM, Nhai <nhai.qn.gmail.com> wrote:

> The question is: why do you want yo do that?
>
> Hai
>
> > On Jan 26, 2017, at 10:10 AM, Elisa Pieri <elisa.pieri90.gmail.com>
> wrote:
> >
> > Thanks Kenneth,
> >
> > yes that's my question too. Being a big file, it could take days to load
> it
> > 40000 times! My other plan would be to split it in smaller files, and
> then
> > split them and so on..but this would be very annoying.
> >
> > Elisa
> >
> > On Thu, Jan 26, 2017 at 3:50 PM, Kenneth Huang <
> kennethneltharion.gmail.com>
> > wrote:
> >
> >> Hi,
> >>
> >> The best way I've found to split by every frame is to loop it through a
> >> shell script that ticks up after every frame, which at least automates
> the
> >> process and saves you from having to making a trajin for every 40000
> >> frames, so something like-
> >>
> >> firstframe=1
> >> lastframe=40000
> >>
> >> while [ $firstframe -le $lastframe ]; do
> >>
> >> cat >analysis.ptraj<<EOF
> >> parm *.prmtop
> >> trajin *.nc $firstframe $firstframe 1
> >> trajout snapshot_$firstframe.pdb
> >> EOF
> >>
> >> let firstframe=firstframe+1
> >>
> >> done
> >>
> >> I'd also be curious if there's a faster way that doesn't require
> reloading
> >> the trajectory every single time, though.
> >>
> >> Best,
> >>
> >> Kenneth
> >>
> >> On Thu, Jan 26, 2017 at 9:35 AM, Elisa Pieri <elisa.pieri90.gmail.com>
> >> wrote:
> >>
> >>> Hello,
> >>>
> >>> how can I split a .nc file into single frames? My nc file has 40000
> >> frames
> >>> and is 4.2 Gb, I think that using a strategy like "trajin mdcrd 1 4000
> 1
> >> ;
> >>> trajout mdcrd_chunk_" would be reeeeeally long. Anything faster?
> >>>
> >>> Thanks!
> >>> Elisa
> >>> _______________________________________________
> >>> AMBER mailing list
> >>> AMBER.ambermd.org
> >>> http://lists.ambermd.org/mailman/listinfo/amber
> >>>
> >>
> >>
> >>
> >> --
> >> Ask yourselves, all of you, what power would hell have if those
> imprisoned
> >> here could not dream of heaven?
> >> _______________________________________________
> >> 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
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jan 26 2017 - 08:00:02 PST
Custom Search