schrodinger.forcefield.common module¶
OPLS context managers.
Copyright Schrodinger LLC, All Rights Reserved.
- exception schrodinger.forcefield.common.AtomTypingFailure(msg='')¶
Bases:
MmException
- __init__(msg='')¶
Initialize with the wrapped function, arguments used, and the return code.
- schrodinger.forcefield.common.mmffld_environment()¶
A context manager for loading the mmffld environment.
- schrodinger.forcefield.common.opls_force_field(ffld_options: Optional[ForceFieldOptions] = None, **kwargs) int ¶
A context manager for creating a force field handle, using default precedence for loading ffld datafiles.
- Parameters:
ffld_options – options that affect ffld params
kwargs – Allows passing
ForceFieldOptions
keywords seaparately to the function. See keywords inForceFieldOptions
for available options.
- Returns:
mmffld handle
- schrodinger.forcefield.common.set_mmffld_option(mmffld_handle: int, mm_option_enum: int, typed_value: Union[int, float, str, bool])¶
Assign MMFfld value for a given handle and value.
- Parameters:
mmffld_handle – force field handle number
mm_option_enum – enumerated name of MMFfld option for a parameter
typed_value – parameter value with explicit type setting
- schrodinger.forcefield.common.assign_force_field(mmffld_handle: MMFfldHandle, st: Structure, apply_mmlewis: bool = True)¶
A context manager to runs typing by loading the structure into mmffld. Note: If cm1a is turned on, enterMol calculates charges which is a fairly lengthy operation.
- Parameters:
handle – mmffld handle
st – structure to assign atom types
apply_mmlewis – whether to apply mmlewis to the incoming structure
- Raises:
AtomTypingFailure – if mmffld_enterMol() fails