Thanks Daniel, that's a lot cleaner script than having a rolling update.
I think what you want to use is-
trajin name.nc 1 last 1
trajout path/to/directory netcdf multi
Best,
Kenneth
On Thu, Jan 26, 2017 at 10:42 AM Elisa Pieri <elisa.pieri90.gmail.com>
wrote:
> 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
>
--
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
Received on Thu Jan 26 2017 - 08:00:05 PST