htmd.kinetics module

class htmd.kinetics.Kinetics(model, temperature, concentration=1, source=None, sink=None)

Bases: object

Constructor for the Kinetics class

Parameters:
  • model (Model) – The model from which this class will calculate the kinetics
  • concentration (float, optional) – If a ligand is contained in the simulation, give the concentration of the ligand.
  • temperature (float, optional) – The simulation temperature
  • source (int, optional) – The source macrostate. Default it will be detected as the most disassociated state or the most extended conformation.
  • sink (int, optional) – The sink macrostate. Default it will be calculated as the macrostate with the highest equilibrium population.

Examples

>>> kin = Kinetics(model, temperature=300, concentration=0.015)

Methods

getRates([source, sink, states, _logger]) Get the rates between two (sets of) states
mfptGraph() Not yet implemented
plotFluxPathways([statetype, mode, fraction]) Plot flux pathways between source and sink state.
plotRates([rates]) Plot the MFPT on, off and DG of all the macrostates to the sink state

Attributes

getRates(source=None, sink=None, states='macro', _logger=True)

Get the rates between two (sets of) states

Parameters:
  • source (int, optional) – The state index to use as source
  • sink (int, optional) – The state index to use as sink
  • states (['macro','micro'], optional) – The state type of the states given before
Returns:

rates – A Rates object containing the rates

Return type:

Rates object

Example

>>> kin = Kinetics(model, temperature=300, concentration=0.015)
>>> r = kin.getRates()
>>> print(r)
>>> dg = r.g0eq
>>> r = kin.getRates(source=4, sink=[0,1,2,3])
mfptGraph()

Not yet implemented

plotFluxPathways(statetype='macro', mode='net_flux', fraction=1.0)

Plot flux pathways between source and sink state.

Parameters:
  • statetype ({'macro','coarse','micro'}) – What type of states to plot
  • mode ({'net_flux', 'gross_flux'}) – Type of fluxes to plot
  • fraction (float) – Fraction of fluxes for which to report pathways. Doesn’t change the plot, only the text output.
plotRates(rates=('mfptoff', 'mfpton', 'g0eq'))

Plot the MFPT on, off and DG of all the macrostates to the sink state

Parameters:rates (tuple) – Specify which rates you want to plot. Options are (‘mfptoff’,’mfpton’,’g0eq’,’kdeq’,’kon’,’koff’)

Examples

>>> kin = Kinetics(model, temperature=300, concentration=0.015)
>>> kin.plotRates()
class htmd.kinetics.Rates(mfpton=None, mfptoff=None, kon=None, koff=None, kdeq=None, g0eq=None)

Bases: object

A class containing a set of rates

mfpton

float – The mean first passage time of going from source to sink

mfptoff

float – The mean first passage time of going from sink to source

kon

float – The Kon rate (association constant) from source to sink

koff

float – The Koff rate (dissociation constant) from sink to source

kdeq

float – The Kd, calculated from the equilibrium probability

g0eq

float – The free energy between source and sink, calculated from the equilibrium probability