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.
-
args
¶
-
with_traceback
()¶ Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
-
-
schrodinger.forcefield.common.
mmffld_environment
()¶ A context manager for loading the mmffld environment.
-
schrodinger.forcefield.common.
opls_force_field
(version: pymmlibs.OPLSVersion = 16, user_uttdat_path: Optional[os.PathLike] = None, **kwargs)¶ A context manager for creating a force field handle, using default precedence for loading ffld datafiles.
- Parameters
version – OPLS version number
user_uttdat_path – path to user-specified UTT datafile. Only
compatible with OPLSVersion.F16 # TODO change param name when FFLD_SINGLE_FILE is removed and when # addressing FFLD-2275
-
schrodinger.forcefield.common.
assign_force_field
(mmffld_handle, st, apply_mmlewis=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 (MMFfldHandle or int) – mmffld handle
st (structure.Structure) – structure to assign atom types
apply_mmlewis (bool) – whether to apply mmlewis to the incoming structure
- Raises
AtomTypingFailure – if mmffld_enterMol() fails
-
schrodinger.forcefield.common.
generate_partial_charges
(st, version=16)¶ Generates partial charges for a given structure. Results will be stored in the
PARTIAL_CHARGE_PROP
atom-level property.- Parameters
st (structure.Structure) – Structure for which partial charges are generated.