Package gromacs :: Package analysis :: Package plugins :: Module com :: Class _COM
[hide private]
[frames] | no frames]

Class _COM

source code

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

COM worker class.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Set up COM analysis.
source code
 
_register_hook(self, **kwargs)
Run when registering; requires simulation.
source code
 
run(self, force=None, **gmxargs)
Analyze trajectory and write COM file.
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 COM analysis.

:Keywords:
   *group_names*
       list of index group names
   *ndx*
       index file if groups are not in the default index
   *offset*
       add the *offset* to the residue numbers [0]
   *name*
       plugin name [COM]
   *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

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

source code 
Analyze trajectory and write COM file.

All three components of the COM coordinate are written.

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

Overrides: core.Worker.run

analyze(self, **kwargs)

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

- Make COM as a function of time available as XVG files and
  objects.
- Compute RMSD of the COM of each group (from average
  position, "rmsd").
- Compute distance whic encompasses 50% of observations ("median")
- Compute drift of COM, i.e. length of the vector between
  initial and final position. Initial and final position are
  computed as averages over *nframesavg* frames ("drift").

RMSD, median, and drift are columns in an xvg file. The rows correspond
to the groups in :attr:`gromacs.analysis.plugins.com.Worker.results.group_names`.

:Keywords:
  *nframesavg*
      number of initial and final frames that are averaged in
      order to compute the drift of the COM of each group
      [5000]
  *refgroup*
      group name whose com is taken as the reference and subtracted from
      all other coms for the distance calculations. If supplied,
      additional result 'com_relative_*refgroup*' is created.

:Returns:  a dictionary of the results and also sets
          :attr:`gromacs.analysis.plugins.com.Worker.results`. 

Overrides: core.Worker.analyze

plot(self, **kwargs)

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