README 1.52 KB
Newer Older
Berk Onat's avatar
Berk Onat committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
libxdrfile2
=============

This library allows to read GROMACS trr and xtc files and also to
convert from one format to another. libxdrfile2 is a derivative of the
`libxdrfile library`_ written by the Gromacs developers. For MDAnalysis we
added Python bindings (generated with SWIG_). For libxdrfile2 we added
new indexing and seeking capabilities to the library.

.. _`libxdr library`: 
   http://www.gromacs.org/Developer_Zone/Programming_Guide/XTC_Library
.. _SWIG: 
   http://www.swig.org/


Licensing
=========

libxdrfile is provided by the Gromacs developers under the GNU Lesser
General Public License version 3.
While under development together with the MDAnalysis code, the library
was enhanced to provide xtc/trr frame indexing and seeking. This derivative
version of the library, named libxdrfile2, is now provided under the GNU
General Public License version 2. Read the AUTHORS and COPYING files
for details.


Python bindings
===============

Although the whole ``xdrfile`` package is distributed together with
`MDAnalysis <http://mdanalysis.googlecode.com>` it is also possible to
use it as a stand-alone library. Build the library from the src
directory::

  mv xdrfile/setup_py setup.py
  mv xdrfile/__init___py xdrfile/__init__.py 
  swig -python xdrfile/libxdrfile2.i   # or copy libxdrfile2.py to xdrfile/
  python setup.py build --build-lib=.

(This does an in-place build but you can also do a normal ``python
setup.py install``.)

Note that in order to import the module you will have to do:

  from xdrfile import libxdrfile2