stko.MacroModelMD
- class stko.MacroModelMD(macromodel_path, output_dir=None, timeout=None, force_field=16, temperature=750, conformers=50, time_step=1, eq_time=10, simulation_time=200, maximum_iterations=2500, minimum_gradient=0.05, restricted_bonds=None, restricted_bond_angles=None, restricted_torsional_angles=None)[source]
Bases:
MacroModelRuns a molecular dynamics conformer search using MacroModel.
- Parameters:
macromodel_path (str) – The full path of the Schrodinger suite within the user’s machine. For example, on a Linux machine this may be something like
'/opt/schrodinger2017-2'.output_dir (str | None) – The name of the directory into which files generated during the optimization are written, if
Nonethenuuid.uuid4()is used.timeout (float | None) – The amount in seconds the MD is allowed to run before being terminated.
Nonemeans there is no timeout.force_field (int) – The number of the force field to be used.
temperature (float) – The temperature in Kelvin at which the MD is run. Cannot be more than
99999.99.conformers (int) – The number of conformers sampled and optimized from the MD. Cannot be more than
9999.simulation_time (float) – The simulation time in
psof the MD. Cannot be more than999999.99.time_step (float) – The time step in
fsfor the MD. Cannot be more than99999.99.eq_time (float) – The equilibration time in
psbefore the MD is run. Cannot be more than999999.99.maximum_iterations (int) – The maximum number of iterations done during the optimization. Cannot be more than
999999.minimum_gradient (float) – The gradient at which optimization is stopped. Cannot be less than
0.0001.restricted_bonds (set | None) –
A
setof the formrestricted_bonds = { frozenset((0, 10)), frozenset((3, 14)), frozenset((5, 6)) }
Where each
frozensetdefines which bonds should have a fixed length via the atom ids of atoms in the bond.restricted_bond_angles (set | None) –
A
setof the formrestricted_bonds = { frozenset((0, 10, 12)), frozenset((3, 14, 7)), frozenset((5, 8, 2)) }
Where each
frozensetdefines which bond angles should have a fixed size via the atom ids of atoms in the bond angle.restricted_torsional_angles (set | None) –
A
setof the formrestricted_bonds = { frozenset((0, 10, 12, 3)), frozenset((3, 14, 7, 4)), frozenset((5, 8, 2, 9)) }
Where each
frozensetdefines which torsional angles should have a fixed size via the atom ids of atoms in the torsional angle.
Examples
Molecular dynamics can be run on any
stk.Moleculeusing this class. Restrictions can be applied, but are not by default. This class collects a series of conformers from the trajectory, optimises them, then returns the lowest energy conformer.import stk import stko mol = stk.BuildingBlock('NCCCN') optimizer = stko.MacroModelMD( macromodel_path='/path/to/macromodel/', conformers=40, ) mol = optimizer.optimize(mol)
Methods
Optimize mol.