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.
- Parameters
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
andGroupRestraint
)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.
Example
>>> 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
- Parameters
decay (str) – The restrains will get scaled to 0 over this much time.
- Returns
restraints – A list of default protein restraints
- Return type
Examples
>>> 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
- Parameters
Examples
>>> md = Equilibration() >>> md.write('./build','./equil')