| Trees | Indices | Help | 
 | 
|---|
|  | 
:mod:`gromacs.utilities` -- Helper functions and classes
========================================================
The module defines some convenience functions and 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
-------
:class:`FileUtils` provides functions related to filename handling. It
can be used as a base or mixin class. The :class:`gromacs.analysis.Simulation`
class is derived from it.
.. autoclass:: FileUtils
   :members:
.. autoclass:: AttributeDict
.. autoclass:: Timedelta
Functions
---------
Some additional convenience functions that deal with files and
directories:
.. function:: openany(directory[,mode='r'])
   Context manager to open a compressed (bzip2, gzip) or plain file
   (uses :func:`anyopen`).
.. autofunction:: anyopen
.. autofunction:: realpath
.. function:: in_dir(directory[,create=True])
   Context manager to execute a code block in a directory.
   * The *directory* is created if it does not exist (unless
     *create* = ``False`` is set)   
   * At the end or after an exception code always returns to
     the directory that was the current directory before entering
     the block.
.. autofunction:: find_first
.. autofunction:: withextsep
Functions that improve list processing and which do *not* treat
strings as lists:
.. autofunction:: iterable
.. autofunction:: asiterable
Functions that help handling Gromacs files:
.. autofunction:: unlink_f
.. autofunction:: unlink_gmx
.. autofunction:: unlink_gmx_backups
.. autofunction:: number_pdbs
Functions that make working with matplotlib_ easier:
.. _matplotlib: http://matplotlib.sourceforge.net/
.. autofunction:: activate_subplot
.. autofunction:: remove_legend
Miscellaneous functions:
.. autofunction:: convert_aa_code
Data
----
.. autodata:: amino_acid_codes
| 
 | |||
| AttributeDict A dictionary with pythonic access to keys as attributes --- useful for interactive work. | |||
| FileUtils Mixin class to provide additional file-related capabilities. | |||
| Timedelta Extension of :class:`datetime.timedelta`. | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| 
 | |||
| logger = logging.getLogger('gromacs.utilities') | |||
| amino_acid_codes = translation table for 1-letter codes --> 3-letter codes .. | |||
| inverse_aa_codes =  | |||
| NUMBERED_PDB = re.compile(r' | |||
| one =  | |||
| three =  | |||
| 
 | |||
| 
 | 
| 
 Open datasource (gzipped, bzipped, uncompressed) and return a stream. 
 Arguments: | 
| 
 Join all args and return the real path, rooted at /. Returns None if any of the args is none. | 
| 
 
Find first *filename* with a suffix from *suffices*.
:Arguments:
  *filename*
     base filename; this file name is checked first
  *suffices*
     list of suffices that are tried in turn on the root of *filename*; can contain the 
     ext separator (:data:`os.path.extsep`) or not
:Returns: The first match or ``None``.
 | 
| 
 Create a directory path with subdirs but do not complain if it exists. This is like GNU mkdir -p path. | 
| 
 Make subplot numPlot active on the canvas. Use this if a simple subplot(numRows, numCols, numPlot) overwrites the subplot instead of activating it. | 
| 
 Remove legend for axes or gca. See http://osdir.com/ml/python.matplotlib.general/2005-07/msg00285.html | 
| 
 Arguments: 
 | 
| 
 | |||
| amino_acid_codestranslation table for 1-letter codes --> 3-letter codes .. Note: This does not work for HISB and non-default charge state aa!
 | 
| inverse_aa_codes
 | 
| NUMBERED_PDB
 | 
| Trees | Indices | Help | 
 | 
|---|
| Generated by Epydoc 3.0.1 on Sat Jun 12 15:59:33 2010 | http://epydoc.sourceforge.net |