Re: [AMBER] Split a trajectory into frames

From: Elisa Pieri <elisa.pieri90.gmail.com>
Date: Thu, 26 Jan 2017 17:12:59 +0100

Ops, sorry Daniel, I hadn't see your message! It worked perfectly! Thanks a
lot!!

Elisa

On Thu, Jan 26, 2017 at 5:00 PM, Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Hi,
>
> On Thu, Jan 26, 2017 at 10:53 AM, Elisa Pieri <elisa.pieri90.gmail.com>
> wrote:
> > No, sorry, I cannot use the PDB format, and I don't want to modify the
> > frames by minimizing them. I just need them as they are in the nc format.
>
> Did the script I posted earlier not work for you?
>
> -Dan
>
> >
> > Elisa
> >
> > On Thu, Jan 26, 2017 at 4:47 PM, Adrian Roitberg <roitberg.ufl.edu>
> wrote:
> >
> >> If you want to use amber itself to then look at the individual frames,
> >> let's say by minimizing them one by one, you can use the imin=5 option
> >> is amber.
> >>
> >> adrian
> >>
> >>
> >> On 1/26/17 10:45 AM, Casalini Tommaso wrote:
> >> > If pdb format is suitable as well for your purposes, you can use the
> >> keyword "multi" in the trajout command.
> >> >
> >> > Tommaso
> >> > ________________________________________
> >> > Da: Elisa Pieri [elisa.pieri90.gmail.com]
> >> > Inviato: giovedì 26 gennaio 2017 16.42
> >> > A: AMBER Mailing List
> >> > Oggetto: Re: [AMBER] Split a trajectory into frames
> >> >
> >> > I need to get the individual frames in the nc format, like you would
> get
> >> > using cpptraj with:
> >> > trajin bigfile.nc 1 1 1
> >> > trajout frame_00001.nc
> >> >
> >> > Elisa
> >> >
> >> > On Thu, Jan 26, 2017 at 4:38 PM, Nhai <nhai.qn.gmail.com> wrote:
> >> >
> >> >> Well, if we know clearly why do you need that, we might provide
> better
> >> >> advice to optimize your workflow. (Or if we even have an existing
> tool
> >> for
> >> >> your need).
> >> >>
> >> >> Hai
> >> >>
> >> >>> On Jan 26, 2017, at 10:30 AM, Elisa Pieri <elisa.pieri90.gmail.com>
> >> >> wrote:
> >> >>> 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
> >> >> _______________________________________________
> >> >> 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
> >>
> >> --
> >> Dr. Adrian E. Roitberg
> >> University of Florida Research Foundation Professor.
> >> Department of Chemistry
> >> University of Florida
> >> roitberg.ufl.edu
> >> 352-392-6972
> >>
> >>
> >> _______________________________________________
> >> 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
>
>
>
> --
> -------------------------
> Daniel R. Roe
> Laboratory of Computational Biology
> National Institutes of Health, NHLBI
> 5635 Fishers Ln, Rm T900
> Rockville MD, 20852
> https://www.lobos.nih.gov/lcb
>
> _______________________________________________
> 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:30:03 PST
Custom Search