Package gromacs :: Package analysis :: Package plugins :: Module helixbundle :: Class _HelixBundle
[hide private]
[frames] | no frames]

Class _HelixBundle

source code

         object --+        
                  |        
utilities.FileUtils --+    
                      |    
            core.Worker --+
                          |
                         _HelixBundle

HelixBundle worker class.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Set up HelixBundle analysis.
source code
 
_register_hook(self, **kwargs)
Run when registering; requires simulation.
source code
 
make_index(self, force=None)
Build g_bundle index file from a record array.
source code
 
run(self, force=None, **gmxargs)
Analyze trajectory and write HelixBundle files.
source code
 
analyze(self, **kwargs)
Collect output xvg files as :class:`gromacs.formats.XVG` objects.
source code
 
plot(self, **kwargs)
Plot all results in one graph, labelled by the result keys.
source code

Inherited from core.Worker: figdir, plugindir, savefig, store_xvg, topdir

Inherited from utilities.FileUtils: __repr__, check_file_exists, filename, infix_filename

Inherited from utilities.FileUtils (private): _init_filename

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]

Inherited from utilities.FileUtils: default_extension

Instance Variables [hide private]

Inherited from core.Worker: plugin, plugin_name

Inherited from utilities.FileUtils: real_filename

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
Set up HelixBundle analysis.

:Keywords:
   *helixtable*
       reST table with columns "name", "top", "bottom",
       "kink"; see :mod:`gromacs.analysis.plugins.helixbundle`
       for details
   *offset*
       add the *offset* to the residue numbers in *helixtable* [0]
   *helixndx*
       provide a index file with the appropriate groups
       instead of the table; also requires *na*
   *na*
       number of helices
   *with_kinks*
       take kinks into account [True]
   *name*
       plugin name [HelixBundle]
   *simulation*
       The :class:`gromacs.analysis.Simulation` instance that
       owns the plugin [None]

Overrides: object.__init__

_register_hook(self, **kwargs)

source code 
Run when registering; requires simulation.
Overrides: core.Worker._register_hook

make_index(self, force=None)

source code 
Build g_bundle index file from a record array.

:Keywords:
  *force*
      - ``None`` does nothing if the index file already exists
      - ``False`` raises exception if it exists
      - ``True`` always rebuild index file

Format of the index table:
- must contain columns name, top, bottom, kink
- a row corresponds to one helis
- name contains the name of the helix e.g. 'TM5'
- a entry is a *string* of residues which is split on white space; 
  entries in the same column must have the same number of residues 
  (limitation of g_bundle)

run(self, force=None, **gmxargs)

source code 
Analyze trajectory and write HelixBundle files.

:Arguments:
  - *force*: ``True`` does analysis and overwrites existing files
  - *gmxargs*: additional keyword arguments for :func:`gromacs.g_bundle` 

.. Note:: The plugin default is *z* = ``True``, i.e. the tilt is computed
          relative to the box z-axis.

Overrides: core.Worker.run

analyze(self, **kwargs)

source code 
Collect output xvg files as :class:`gromacs.formats.XVG` objects.

:Returns:  a dictionary of the results and also sets ``self.results``.

Overrides: core.Worker.analyze

plot(self, **kwargs)

source code 
Plot all results in one graph, labelled by the result keys.
Parameters:
  • figure -
    • True: save figures in the given formats
    • "name.ext": save figure under this filename (ext -> format)
    • False: only show on screen
  • formats (sequence) - sequence of all formats that should be saved [('png', 'pdf')]
  • plotargs - keyword arguments for pylab.plot()
Overrides: core.Worker.plot