Package gromacs :: Module formats
[hide private]
[frames] | no frames]

Module formats

source code


:mod:`gromacs.formats` -- Accessing various files
=================================================

This module contains classes that represent data files on
disk. Typically one creates an instance and

- reads from a file using a :meth:`read` method, or

- populates the instance (in the simplest case with a :meth:`set`
  method) and the uses the :meth:`write` method to write the data to
  disk in the appropriate format.

For function data there typically also exists a :meth:`plot` method
which produces a graph (using matplotlib).

The module defines some classes that are used in other modules; they
do *not* make use of :mod:`gromacs.tools` or :mod:`gromacs.cbook` and
can be safely imported at any time.


Classes
-------

.. autoclass:: XVG
   :members:
.. autoclass:: NDX
   :members:
.. autoclass:: uniqueNDX
   :members:
.. autoclass:: GRO
   :members:

   (Not implemented yet)

Classes [hide private]
  XVG
Class that represents the numerical data in a grace xvg file.
  NDX
Gromacs index file.
  IndexSet
set which defines '+' as union (OR) and '-' as intersection (AND).
  uniqueNDX
Index that behaves like make_ndx, i.e.
  GRO
Class that represents a GROMOS (gro) structure file.
  MDP
Class that represents a Gromacs mdp run input file.
Functions [hide private]
 
autoconvert(s)
Convert input to a numerical type if possible.
source code
Function Details [hide private]

autoconvert(s)

source code 

Convert input to a numerical type if possible.

  1. A non-string object is returned as it is
  2. Try conversion to int, float, str.