schrodinger.forcefield.common module

OPLS context managers.

Copyright Schrodinger LLC, All Rights Reserved.

exception schrodinger.forcefield.common.AtomTypingFailure(msg='')[source]

Bases: schrodinger.infra.mmcheck.MmException

__init__(msg='')[source]

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()[source]

A context manager for loading the mmffld environment.

schrodinger.forcefield.common.opls_force_field(version: pymmlibs.OPLSVersion = 16, archive_path: Optional[os.PathLike] = None, bend_conj_amines: bool = False, no_cm1a_bcc: bool = False, charges_from_ct: bool = False)[source]

A context manager for creating a force field handle, using default precedence for loading ffld datafiles.

Parameters
  • version – OPLS version number

  • archive_path – path to specific .opls file

  • bend_conj_amines – bend conjungated amine

  • no_cm1a_bcc – don’t use cm1a_bcc for OPLS version 16

  • charges_from_ct – obtain charges from ct

schrodinger.forcefield.common.assign_force_field(mmffld_handle: pymmlibs.MMFfldHandle, st: schrodinger.structure._structure.Structure, apply_mmlewis: bool = True)[source]

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)[source]

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.