htmd.protocols.equilibration_v3 module#

class htmd.protocols.equilibration_v3.Equilibration#

Bases: ProtocolInterface

Equilibration protocol v3

Equilibration protocol for globular and membrane proteins Supporst extra restraints like a flatbottom potential box to retain a ligand for example within this box.

  • runtime (float, default=0) – Running time of the simulation.

  • timeunits (str, default='steps') – Units for time arguments. Can be ‘steps’, ‘ns’ etc.

  • temperature (float, default=300) – Temperature of the thermostat in Kelvin

  • restraints (list, default=None) – A list of restraint objects. See AtomRestraint and GroupRestraint)

  • useconstantratio (bool, default=False) – For membrane protein simulations set it to true so that the barostat does not modify the xy aspect ratio.

  • restraintsteps (int, default=None) – Number of initial steps to apply restraints in units of 4fs. Defaults to half the simulation time.


>>> from htmd.protocols.equilibration_v3 import Equilibration
>>> from htmd.mdengine.acemd.acemd import GroupRestraint
>>> md = Equilibration()
>>> md.runtime = 4
>>> md.timeunits = 'ns'
>>> md.temperature = 300
>>> md.useconstantratio = True  # only for membrane sims
Use a 10A flat bottom potential to prevent the ligand from diffusing from original position during equilibration
>>> width = np.array([10, 10, 10])
>>> flatbot = GroupRestraint('segname L and noh', width, [(5, '0ns')])
Add also the default restraints for protein
>>> mol = Molecule("./build/structure.pdb")
>>> md.restraints = [flatbot,] + md.defaultEquilRestraints('2ns', mol)
>>> md.write('./build','./equil')
defaultEquilRestraints(decay, mol=None)#

Get the default equilibration restraints.

This function applies restraints on proteins and nucleic acids from the start of the equilibration run up to the time specified with the decay argument, scaling down linearly from X to 0. The rest the equilibration will be run without restraints.

For protein carbon-alpha (CA) atoms, X is equal to 1 kcal/mol. For protein heavy non-CA atoms, X is equal to 0.1 kcal/mol. For nucleic backbone atoms, X is equal to 1 kcal/mol. For nucleic non-backbone heavy atoms, X is equal to 0.1 kcal/mol.


decay (str) – The restrains will get scaled to 0 over this much time.


restraints – A list of default protein restraints

Return type:



>>> md = Equilibration()
>>> res = md.defaultEquilRestraints('20ns')
write(inputdir, outputdir, cisbondcheck=True)#

Write the equilibration protocol

Writes the equilibration protocol and files into a folder for execution using files inside the inputdir directory

  • inputdir (str) – Path to a directory containing the files produced by a build process.

  • outputdir (str) – Directory where to write the equilibration setup files.

  • cisbondcheck (bool) – Set to False to disable the cis peptidic bond checks


>>> md = Equilibration()
>>> md.write('./build','./equil')