Package gromacs :: Package analysis :: Package plugins :: Module dihedrals :: Class _Dihedrals
[hide private]
[frames] | no frames]

Class _Dihedrals

source code

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

Dihedrals worker class.
Instance Methods [hide private]
 
__init__(self, **kwargs)
Set up dihedral analysis.
source code
 
_register_hook(self, **kwargs)
Run when registering; requires simulation.
source code
 
make_index(self)
Make one index group dihedrals from the selections.
source code
 
run(self, force=False, **gmxargs)
Collect dihedral data from trajectory with g_angle and save to data files.
source code
 
analyze(self, **kwargs)
Load results from disk into :attr:`_Dihedrals.results` and compute PMF.
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 dihedral analysis.

:Arguments:
   *dihedrals*
     list of tuples; each tuple contains :class:`gromacs.cbook.IndexBuilder`
     atom selection commands.
   *labels*
     optional list of labels for the dihedrals. Must have as many entries as
     *dihedrals*.

Overrides: object.__init__

_register_hook(self, **kwargs)

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

make_index(self)

source code 

Make one index group dihedrals from the selections.

Right now this requires raw atom numbers from the topology.

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

source code 

Collect dihedral data from trajectory with g_angle and save to data files.

Note that the -all flag is always enabled and hence all time series can be found under the timeseries results key.

Overrides: core.Worker.run

analyze(self, **kwargs)

source code 
Load results from disk into :attr:`_Dihedrals.results` and compute PMF.

The PMF W(phi) in kT is computed from each dihedral
probability distribution P(phi) as

   W(phi) = -kT ln P(phi)

It is stored in :attr:`_Dihedrals.results` with the key *PMF*.

:Keywords:
  *bins*
     bins for histograms (passed to numpy.histogram(new=True))

:Returns: a dictionary of the results and also sets
          :attr:`_Dihedrals.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')]
  • with_legend (bool) - add legend from labels to graphs
  • plotargs - keyword arguments for pylab.plot()
Overrides: core.Worker.plot