Re: [AMBER] large .mdcrd splitting

From: Hai Nguyen <nhai.qn.gmail.com>
Date: Thu, 6 Aug 2015 13:44:54 -0400

.Vishal

alternatively, you can use pytraj (api of cpptraj) for this

import pytraj as pt
# use iterload for memory saving
traj = pt.iterload("../tests/data/md1_prod.Tc5b.x",
"../tests/data/Tc5b.top")

# split to 4 chunks
traj.split_and_write_traj(n_chunks=4, root_name='./output/trajx')

https://github.com/pytraj/pytraj/blob/master/examples/example_split_and_write_trajectory.py

Note: you can use `iterload` to load a list of files too.

Hai

On Thu, Aug 6, 2015 at 7:39 AM, Daniel Roe <daniel.r.roe.gmail.com> wrote:

> Hi,
>
> You can accomplish this with cpptraj. Either do several rounds of trajin
> with start and stop arguments and trajout, e.g.
>
> trajin mytraj.nc 1 100
> trajout part1.nc
> run
> clear trajin
> trajin mytraj.nc 101 200
> trajout part2.nc
> ...
>
> Or you can use trajout with the onlyframes keyword (which is a better
> option in my opinion):
>
> trajin mytraj.nc
> trajout part1.nc onlyframes 1-100
> trajout part2.nc onlyframes 101-200
> ...
>
> See the manual for full details on the commands and keywords. Good luck,
>
> -Dan
>
> On Thursday, August 6, 2015, Vishal Nemaysh <vishal.bioinfotech.gmail.com>
> wrote:
>
> > Respected Sir/Madam
> >
> > how can i split the large *.mdcrd *file into small-small parts please
> let
> > me know ...how can i do this
> >
> > thanking you,
> >
> > --
> > Vishal
> > Research Scholar,
> > Neuropharmaceutical Chemistry lab.,
> > Dr. B. R. Ambedkar Center for Biomedical Research,
> > University of Delhi, Delhi-110007
> > Email: *vishal.bioinfotech.gmail.com <javascript:;> <
> > vishal.bioinfotech.gmail.com <javascript:;>>*
> > Phone: 91-11-27662778 Mobile: 91+9650736653
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org <javascript:;>
> > http://lists.ambermd.org/mailman/listinfo/amber
> >
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Department of Medicinal Chemistry
> University of Utah
> 30 South 2000 East, Room 307
> Salt Lake City, UT 84112-5820
> http://home.chpc.utah.edu/~cheatham/
> (801) 587-9652
> (801) 585-6208 (Fax)
> _______________________________________________
> 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 Aug 06 2015 - 11:00:03 PDT
Custom Search