schrodinger.forcefield.common module¶
OPLS context managers.
Copyright Schrodinger LLC, All Rights Reserved.
- exception schrodinger.forcefield.common.AtomTypingFailure(msg='')¶
Bases:
schrodinger.infra.mmcheck.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[schrodinger.forcefield.ffld_options.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: pymmlibs.MMFfldHandle, st: schrodinger.structure._structure.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
- schrodinger.forcefield.common.generate_partial_charges(st: schrodinger.structure._structure.Structure, version: pymmlibs.OPLSVersion = 16)¶
Generates partial charges for a given structure. Results will be stored in the
PARTIAL_CHARGE_PROP
atom-level property.- Parameters
st – Structure for which partial charges are generated.