Hi Justin,
> trajin ../prod_all.mdcrd 2836 2836 1
> trajin ../prod_all.mdcrd 3905 3905 1
> trajin ../prod_all.mdcrd 4277 4277 1
> ...
> trajin ../prod_all.mdcrd 5645 5645 1
> trajin ../prod_all.mdcrd 3231 3231 1
> trajout restart restart
>
> so this generates a number of amber restart files called restart.
> (frame number) that correspond to the frames extracted. the problem
> is that this takes a very long time since ptraj is loading the mdcrd
> into memory then dumping it after each frame extraction. is there a
> way to do this more efficiently, so that it would load the
> mdcrd into
> memory once and then pull out all the frames? thanks,
Off the top of my head I can think of a couple of ideas to try, Tom Cheatham
may be able to comment further.
1) You could just extract every frame from your mdcrd file.
trajin ../prod_all.mdcrd
trajout restart restart
Should get you a directory full of restart.xxx where xxx is the number of
each frame in the mdcrd file. This is real overkill if the mdcrd file is
very big and you only want specific frames but should only read the trajin
file once.
2) Convert the mdcrd file from a simple ascii mdcrd file to a binary binpos
(Scripps Binary format) file. These are much much faster to process since
you don't need to read the file sequentially.
ptraj script 1
--------------
trajin ../prod_all.mdcrd
trajout binpos_all binpos
ptraj script 2
--------------
trajin binpos_all 2836 2836 1
trajin binpos_all 3905 3905 1
trajin binpos_all 4277 4277 1
....
trajin binpos_all 5645 5645 1
trajin binpos_all 3231 3231 1
trajout restart restart
This should be much faster. Also note try to work from a local disk while
you do this rather than an NFS mount since NFS shares can greatly slow down
random file access in my experience. On a local disk the file contents go
straight into the disk cache and then all access after that is via the ram
based disk cache rather than over the network share. Once you are done you
can copy the restrt files back to the NFS share.
All the best
Ross
/\
\/
|\oss Walker
| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel: +1 858 784 8889 | EMail:- ross.rosswalker.co.uk |
|
http://www.rosswalker.co.uk | PGP Key available on request |
Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be ready every day, and should not be used for urgent or sensitive issues.
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Wed Aug 24 2005 - 19:53:00 PDT