Re: [AMBER] Split a trajectory into frames

From: Kenneth Huang <kennethneltharion.gmail.com>
Date: Thu, 26 Jan 2017 09:50:51 -0500

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
Received on Thu Jan 26 2017 - 07:00:03 PST
Custom Search