stko.OpenMMForceField
- class stko.OpenMMForceField(force_field, restricted=False, tolerance=10 kJ/(nm mol), max_iterations=0, box_vectors=None, define_stereo=False, partial_charges_method='am1bcc', platform=None)[source]
Bases:
OptimizerUses OpenMM to optimise molecules.
Tip
You can get all force fields with:
import openff.toolkit openff.toolkit.typing.engines.smirnoff.get_available_force_fields()
- Parameters:
force_field (ForceField) – The force field to use.
restricted (bool) – If
Truethen an optimization is performed only on bonds created during the ConstructedMolecule creation. All building block bonds will be fixed. IfFalsethen all bonds are optimized.tolerance (Quantity) – The energy tolerance to which the system should be minimized
max_iterations (int) – The maximum number of iterations to perform. If this is 0, minimization is continued until the results converge without regard to how many iterations it takes.
box_vectors (Quantity | None) – The unit-wrapped box vectors of this topology.
define_stereo (bool) – Toggle calculation of stereochemistry.
partial_charges_method (Literal['am1bcc', 'mmff94', 'gasteiger', 'am1-mulliken', 'espaloma-am1bcc']) – The method to use for calculating partial charges. The default
"am1bcc"is semi-empirical and may be slow.platform (Literal['CUDA'] | None) – The platform to use.
Methods
Optimize mol.