djay0529 / mdanalysis

Automatically exported from code.google.com/p/mdanalysis
0 stars 0 forks source link

No NCDF reading/writing code example on wiki #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. search wiki with key word NCDF
2. search online documentation with same keyword
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Hi. Sorry that I am new to this library, linux, and python.
How to read/write an external ncdf file that is not in the test data?

Original issue reported on code.google.com by k1c2...@gmail.com on 18 May 2013 at 3:40

GoogleCodeExporter commented 9 years ago
is it possible to use the universe command instead of invoking the reader 
directly?

Original comment by k1c2...@gmail.com on 18 May 2013 at 3:42

GoogleCodeExporter commented 9 years ago
MDAnalysis supports reading of Amber NCDF files and you would normally just use 
a Universe:

  u = MDAnalysis.Universe("amber.prmtop", "amber.ncdf")

In order to use NCDF files in other formats you will have to write an 
appropriate TrajectoryReader, using the MDAnalysis.coordinates.TRJ.NCDFReader 
as a starting point (see docs at 
http://pythonhosted.org/MDAnalysis/documentation_pages/coordinates/TRJ.html#MDAn
alysis.coordinates.TRJ.NCDFReader ). To see how to use the underlying netcdf 
library have a look at the source code, e.g. 
http://code.google.com/p/mdanalysis/source/browse/package/MDAnalysis/coordinates
/TRJ.py

The documentation does not say more about the details of the NCDF reader/writer 
because there's not much the user can do with it as it is. The idea is that the 
readers automagically handle files without the user having to know the 
underlying formats.

Hope that helps,

Oliver

Original comment by orbeckst on 18 May 2013 at 6:14