Ptraj cannot read velocities, and nor can cpptraj to my understanding
(yet). Your best bet is to use a Python interface to the NetCDF file
format. A useful package is ScientificPython, which contains an interface
to the NetCDF API. The website is here:
http://dirac.cnrs-orleans.fr/plone/software/scientificpython/ although
this package is installable on most unix systems by using the package
manager (e.g., "sudo apt-get install python-scientificpython" for
Ubuntu/Debian, although you can typically search for it via apt-cache
search scientificpython).
Note, you will also need numpy available, but that can be installed
similarly. If you want an example of how to access NetCDF variables via
this interface (especially for velocities), I have a script that extracts
restart files (complete with velocities) from a NetCDF file that contains
both coordinates and velocities (which you can get if you set ntwv < 0).
You can download this script here:
http://jswails.wikidot.com/helpful-scripts#toc4 (look for the word
'velocities' to see how to access the data you want).
You will have to script/program any analysis you want to do, though (unless
there's a 3rd-party program you can use to run your analyses), in which
case you can either write your analysis routine in the same Python script
you're using to read velocities, or dump the output into a format you will
read in your own custom program.
HTH,
Jason
On Tue, Jun 26, 2012 at 6:25 AM, HIMANSHU JOSHI <himanshuphy87.gmail.com>wrote:
> Dear All,
> I have saved velocities and coordinates of all atoms using
> ioutfm=1 flag using pmemd amber11. Now i want to do some analysis
> using velocities. I don't know any other way to read netcdf format hence I
> am planning to use ptraj to convert it into ascii format and doing further
> analysis. However ptraj (ambertool 12) cannot read read velocities from
> netcdf velocity file. I got the following error -
>
> PTRAJ: trajin md_prod_120_ps.vel
> Checking coordinates: md_prod_120_ps.vel
> NETCDF file:
> Error: No coordinates are present in the NetCDF file md_prod_120_ps.vel
> Error setting up NETCDF trajectory for reading.
> Could not process trajectory md_prod_120_ps.vel
>
> I expect format of trj and velocity file to be same(as is the case for
> ascii files), I am not sure why its not working and how can i get in
> working. Other ways to read netcdf files are also welcome.
> Thanks
>
>
> --
> *With Regards,
> HIMANSHU JOSHI
> Graduate Scholar, Center for Condense Matter Theory
> Department of Physics IISc.,Bangalore India 560012*
> ॐ सर्वे भवन्तु सुखिनः सर्वे सन्तु निरामयः।
> सर्वे भद्रणिपश्यन्तु मा कश्चिद्दुःख भाग भवेत्॥
> <
> http://www.rediffmail.com/cgi-bin/red.cgi?red=http%3A%2F%2Fsigads%2Erediff%2Ecom%2FRealMedia%2Fads%2Fclick%5Fnx%2Eads%2Fwww%2Erediffmail%2Ecom%2Fsignatureline%2Ehtm%40Middle%3F&isImage=0&BlockImage=0&rediffng=0
> >
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 26 2012 - 07:30:03 PDT