schrodinger.infra.mm module

Python-level wrappers for the SWIG-wrapped C and C++ functions.

This module exists to make use of pymmlibs a bit easier and provides access to all functions and constants present in that module.

It adds a layer of automatic error checking to the SWIG wrapped mmlib functions. Instead of returning function return values to the user, the values are checked for indication of failure. If a failure occurs, an MmException is raised. (The underlying return code can be accessed as the ‘rc’ attribute of an MmException.) If a failure does not occur, the caller will not see the mmlib function return value at all.

To access the mmlibs functions in their “pure” form (i.e. the basic SWIG wrapped functions without automatic error checking) use the pymmlibs module, which can be imported with ‘import pymmlibs’.

To call mmlibs functions from python, use input arguments of the appropriate type. Output arguments will be returned as function return values. In the event that there are multiple output arguments, a tuple of these values will be returned. (If you are using functions from the pymmlibs module, the first value in your return tuple will always be the return value of the C function.)

Some mmlibs debugging and profiling niceties are provided through this module. For debugging python calls to mmlibs, you can set SCHRODINGER_PYTHON_MMLIBS_TRACE to any non-null value to get a debug-level logger that prints every call to a wrapped mmlibs function. For assistance in profiling, set SCHRODINGER_PYTHON_CPROFILE to a non-null value. This will set up an additional wrapper with a unique name for each mmlib function so they can be attributed in profiles run via the cProfile module. Without SCHRODINGER_PYTHON_CPROFILE, all mmlibs calls will be attributed to the _Wrapper.__call__ method.

NOTE: If a unittest.mock.MagicMock object is passed to a wrapped C++ api, the mock object’s magic methods (e.g., __int__, __bool__, __float__, and __complex__) could provide valid inputs to the C++ api, which would result in undefined behavior.

class schrodinger.infra.mm.CaptureMMErr
property messages
class schrodinger.infra.mm.Cartesian
__init__(*args, **kwargs)
static angle(a, b, c, norm_threshold=0.0) double

Gets the angle formed by a triad of coordinates in radians

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates (angle vertex)

  • c3: – Cartesian coordinates

  • norm_threshold: – maximum normalization, below which 0.0 is returned

Return type:

float

Returns:

: c1-c2-c3 angle in radians

apply(self, func) Cartesian

Applies given function to each coordinate

Parameters:

func: – function to apply to each coordinate

Return type:

Cartesian

Returns:

: reference to this updated object

as_unit_vector(self) Cartesian

Gets the unit vector of the coordinates stored in this object

Return type:

Cartesian

Returns:

: unit vector (normal)

cross(self, c) Cartesian

Gets the cross product with the given Cartesian coordinates

Parameters:

c: – Cartesian coordinates to take cross product with

Return type:

Cartesian

Returns:

: cross product between coordinates

static dihedral(a, b, c, d) double

Gets the dihedral angle formed in a quartet of coordinates in radians

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates (dihedral angle center)

  • c3: – Cartesian coordinates

  • c4: – Cartesian coordinates

Return type:

float

Returns:

: c1-c2-c3-c4 angle in radians

static distance(c1, c2) double

Gets the distance between two Cartesian coordinates

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates

Return type:

float

Returns:

: distance between pair of Cartesian coordinates

magnitude(self) double

Gets the magnitude of the coordinates (vector normal)

Return type:

float

Returns:

: coordinate magnitude

map(self, func) Cartesian

Maps given function to each coordinate

Parameters:

func: – function to map each coordinate with

Return type:

Cartesian

Returns:

: reference to this updated object

scale_to_unit_magnitude(self) Cartesian

Scales the coordinates to unit length

Return type:

Cartesian

Returns:

: reference to this updated object

sq(self) double

Gets the sum of the coordinates squared

Return type:

float

Returns:

: squared normal of the coordinates

static square_distance(c1, c2) double

Gets the square distance between two Cartesian coordinates

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates

Return type:

float

Returns:

: square distance between pair of Cartesian coordinates

to_array(self) std::array< double,3 >

Gets the coordinates as a std::array

Return type:

std::array< double,3 >

Returns:

xyz: array of xyz coordinates

to_vector(self) std::vector< double,std::allocator< double > >

Gets the coordinates as a std::vector

Return type:

std::vector< double,std::allocator< double > >

Returns:

: vector of xyz coordinates

x

Cartesian coordinates

y
z
zero(self) Cartesian

Zeros out all coordinates

Return type:

Cartesian

Returns:

: reference to this updated object

schrodinger.infra.mm.Cartesian_angle(a, b, c, norm_threshold=0.0) double

Gets the angle formed by a triad of coordinates in radians

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates (angle vertex)

  • c3: – Cartesian coordinates

  • norm_threshold: – maximum normalization, below which 0.0 is returned

Return type:

float

Returns:

: c1-c2-c3 angle in radians

schrodinger.infra.mm.Cartesian_dihedral(a, b, c, d) double

Gets the dihedral angle formed in a quartet of coordinates in radians

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates (dihedral angle center)

  • c3: – Cartesian coordinates

  • c4: – Cartesian coordinates

Return type:

float

Returns:

: c1-c2-c3-c4 angle in radians

schrodinger.infra.mm.Cartesian_distance(c1, c2) double

Gets the distance between two Cartesian coordinates

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates

Return type:

float

Returns:

: distance between pair of Cartesian coordinates

schrodinger.infra.mm.Cartesian_square_distance(c1, c2) double

Gets the square distance between two Cartesian coordinates

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates

Return type:

float

Returns:

: square distance between pair of Cartesian coordinates

class schrodinger.infra.mm.FFBundleVersionData

schrodinger::forcefield::FFBundleVersionData

__init__(*args, **kwargs)
archive_filename
opls_version
spff_version
class schrodinger.infra.mm.FFVersionData

schrodinger::forcefield::FFVersionData Definition of the an OPLS version, name, and location in the installation

Version numbers follow standard semantic versioning and correspond to: - major for breaking changes - minor for compatible new features - patch for compatible bug fixes

We rely on major version to indicate force field incompatibilities, but currently only use minor and patch for diagnostic/documentation purposes

__init__(*args, **kwargs)
display_name
version_major
version_minor
version_patch
class schrodinger.infra.mm.FfldSpec

schrodinger::forcefield::FfldSpec Forcefield specifier object (FfldSpec): a plain old data structure consisting of opls version, installation archive path, and custom archive path (or “” if no custom archive path is specified).

When the custom archive path is the same as the installation archive path, we reset the custom path to empty

Default values are for F16 + no custom path

Allows aggregate initialization

Parameters:
  • version – opls version

  • archive_path – custom opls archive from explicit path or OPLS_DIR environmental variable

Returns:

forcefield specifier

Raises:

std::runtime_error if no compatible archives are found

__init__(*args, **kwargs)
custom_path
installation_path
version
class schrodinger.infra.mm.FitParamInfo

schrodinger::forcefield::FitParamInfo

__init__(*args, **kwargs)
opls
types
vs
class schrodinger.infra.mm.LigandParameters
::LigandParameters

Parameters for defining the ligand defintion, used by find_ligand_atoms.

The default constructor contains the schrodinger default definition, not the user preferences.

__init__(*args, **kwargs)
allow_amino_acid_only_molecules
allow_ion_only_molecules
allow_nucleic_acid_only_molecules
excluded_residue_names
included_residue_names
max_atom_count
min_heavy_atom_count
class schrodinger.infra.mm.LigandScoreStructure

::LigandScoreStructure

__init__(*args, **kwargs)
getGradient(self, wm_st) double
getNumLigandAtom(self) int
getNumSite(self) int
getOverlapSite(self)
getScore(self) double
getTdSLigandAtom(self)
getTdSSite(self)
getdGLigandAtom(self)
getdGSite(self)
getdHLigandAtom(self)
getdHSite(self)
class schrodinger.infra.mm.MMFfldAssign

schrodinger::forcefield::MMFfldAssign Manager which runs typing by loading the structure into mmffld.

__init__(*args, **kwargs)
class schrodinger.infra.mm.MMFfldEspData

schrodinger::forcefield::MMFfldEspData

__init__(*args, **kwargs)
grid
qm_potential
weights
class schrodinger.infra.mm.MMFfldHandle

schrodinger::forcefield::MMFfldHandle Manager for creating a force field handle.

__init__(*args, **kwargs)
getHandle(self) int
setOption(self, option, value)

Sets a given mmffld option on this mmffld instance.

Parameters:
  • option: – mmffld enum option

  • value: – whether to enable the option or not

class schrodinger.infra.mm.MMFfldInitializer

schrodinger::forcefield::MMFfldInitializer Manager for initalizing the mmffld reference count.

__init__(*args, **kwargs)
class schrodinger.infra.mm.MMFileContext

::MMFileContext Class to handle initialization/cleanup of mmfile handle

__init__(*args, **kwargs)
class schrodinger.infra.mm.MMFragHandle
__init__(*args, **kwargs)
getHandle(self) MMFrag_Handle
getStructure(self) schrodinger::Structure
releaseOwnership(self)
setFragment(self, frag_name)
class schrodinger.infra.mm.MMPREF
::MMPREF

mmpref class for C++ files.

__init__(*args, **kwargs)
beginGroup(self, suffix) MMpref_Err

Begin a new group. See mmpref_begin_group(..) for docmentation details.

beginOsAttribute(self, iplat=MMPREF_NONE)

Associate the keys to be set with given platform. Set to running platform if iplat is MMPREF_NONE.

clearSettings(self)

Clear the settings.

endGroup(self)

End the group. See mmpref_end_group(..) for docmentation details.

endOsAttribute(self)

End the platform association of keys to be set.

get(self, key, i) MMpref_Err
get(self, key, d) MMpref_Err
get(self, key, s) MMpref_Err
get(self, key, b) MMpref_Err

Overload 1: Getter function for integer key and value


Overload 2: Getter function for double key and value


Overload 3: Getter function for string key and value


Overload 4: Getter function for boolean key and value

getBool(self, key, bval) MMpref_Err
getBool(self, key, bval, bdefval) MMpref_Err

Overload 1: Get the boolean key and value. See mmpref_get_int(..) for more details.


Overload 2: Get the boolean key and value if available or use user supplied default value. See mmpref_get_int_or_use_value(..) for more details.

getBoolList(self, groupname, bkeyvalue) MMpref_Err
getDouble(self, key) MMpref_Err
getDouble(self, key, ddefval) MMpref_Err

Overload 1: Get the double key and value. See mmpref_get_int(..) for more details.


Overload 2: Get the double key and value if available or use user supplied default value. See mmpref_get_int_or_use_value(..) for more details.

getDoubleList(self, groupname, dkeyvalue) MMpref_Err
getGroup(self) std::string

Get the current group name

getInt(self, key, val) MMpref_Err
getInt(self, key, idefval) MMpref_Err

Overload 1: Get the integer key and value. See mmpref_get_int(..) for more details.


Overload 2: Get the integer key and value if available or use user supplied default value. See mmpref_get_int_or_use_value(..) for more details.

getIntList(self, groupname, ikeyvalue) MMpref_Err

Functions to get requested datatype keys and values.

getKeySource(self, key) MMPrefSource

Retrieve the source of the mmpref settings associated with the given key.

getSettingsFile(self, sfallbackfile)

Get the settings file location.

getString(self, key, sval) MMpref_Err
getString(self, key, sval, sdefval) MMpref_Err

Overload 1: Get the string key and value. See mmpref_get_int(..) for more details.


Overload 2: Get the string key and value if available or use user supplied default value. See mmpref_get_int_or_use_value(..) for detail documentation.

getStringList(self, groupname, skeyvalue) MMpref_Err
getSubgroups(self, subgroups, level=0) int

Get the subgroups of the current group. See mmpref_get_subgroups(..) for detail documentation.

getType(self, key) MMPREF_TYPE

Get the datatype of key. See mmpref_get_type(..) for detail documentation.

hasKey(self, key, type) MMpref_Err
hasKey(self, key) MMpref_Err

Overload 1: Check if given key is available given a type. See mmpref_contains(..) for detail documentation.


Overload 2: Check if given key is available given no type

removeKey(self, key, type=MMPREF_TYPE_NONE) int

Remove the key/group and its values. See mmpref_remove(..) for documentation details.

set(self, key, val, comment='') MMpref_Err

Set the key with given value. The datatype is determined from value.

syncSettings(self) MMpref_Err

Sync the settings to file and reload modified setttings if any by other threads/process.

class schrodinger.infra.mm.MetadataCompatibility
FULL = 0
MAJOR_ONLY = 1
MAJOR_MISMATCH = 2
class schrodinger.infra.mm.MetalSupportStatus

schrodinger::forcefield::MetalSupportStatus Lightweight struct to hold the support status of a metal complex. The bool is_supported indicates whether the complex is fully supported. The set of unsupported_atoms contains the indices of any unsupported metal or ligand atoms. If is_supported is true, the set will be empty.

__init__(*args, **kwargs)
is_supported
unsupported_atoms
class schrodinger.infra.mm.MinimizeResults

schrodinger::forcefield::MinimizeResults

__init__(*args, **kwargs)
converged
potential_energy
rms_derivative
exception schrodinger.infra.mm.MmException(wrapped_function, args, rc)

An exception class that specifically indicates the failure of an mmlibs call. The underlying value of the error code returned by the mmlib function can be retrieved through the ‘rc’ attribute of the exception. The name of the return code can be retrieved through the ‘rc_name’ attribute of the exception.

__init__(wrapped_function, args, rc)

Initialize with the wrapped function, arguments used, and the return code.

class schrodinger.infra.mm.OPLSArchive

schrodinger::forcefield::OPLSArchive Custom parameter archive IO manager

__init__(*args, **kwargs)
add(self, datafile_path)
add(self, parameter_data, datafile) None

Overload 1:

Writes a datafile to the custom parameter archive. Otherwise, the value of datafile_path must be OPLSDatafile-mappable. :type datafile_path: boost::filesystem::path :param datafile_path: path to datafile to be added to the given archive :raises: OPLSArchiveError if the corresponding OPLSDatafile already exists


Overload 2:

Writes the contents of parameter_data to the specified OPLSDatafile in the custom parameter archive :type parameter_data: string :param parameter_data: the string containing the contents to be written :type datafile: OPLSDatafile :param datafile: enum value indicating the desired datafile to add

contains(self, datafile) bool

Determines if the given datafile is present in the archive :type datafile: OPLSDatafile :param datafile: enum value indicating the desired datafile to read :rtype: boolean :return: whether or not the datafile is present

static create(archive_path) OPLSArchive

Creates a new archive instance :type archive_path: boost::filesystem::path :param archive_path: path to custom parameter archive

empty(self) bool
Return type:

boolean

Returns:

whether the archive contains custom parameter datafiles

extractOPLS2005Files(self, output_dir)

extract the OPLS2005 data files from the current opls archive to the designated directory, which will be created if nonexistent.

Parameters:

output_dir (boost::filesystem::path) – the designated directory to extract the files to

Raises:

std::runtime_error if no OPLS2005 data files were found in the archive

getFilename(self) boost::filesystem::path
Return type:

boost::filesystem::path

Returns:

current archive’s path

static isCompatible(archive_path) bool
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive

Return type:

boolean

Returns:

whether the metadata is compatible with the current release

merge(self, datafile_path)

Merges a F16_UTT_DAT datafile into the custom parameter archive :type datafile_path: boost::filesystem::path :param datafile_path: path to datafile to be added to the given archive :raises: OPLSArchiveError if datafile_path is not F16_UTT_DAT

merge_archive(self, src_archive_path)

Merges all data from a source archive into this custom parameter archive; for F16_UTT_DAT this means merging into existing data; for all other datafiles this means simply copying their contents over

Parameters:

src_archive_path (boost::filesystem::path) – path to custom parameter archive to merge from

Raises:

OPLSArchiveError if a datafile exists in both archives (with the exception of F16_UTT_DAT)

remove(self, datafile)

Removes a given datafile from the custom parameter archive :type datafile: OPLSDatafile :param datafile: enum value indicating the desired datafile to delete

static upgrade(archive_path)
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive to upgrade

static validate(archive_path)
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive

Raises:

OPLSArchiveError if the OPLSArchive is in an invalid state

class schrodinger.infra.mm.OPLSArchiveError

schrodinger::forcefield::OPLSArchiveError Exception for errors associated with OPLSArchive IO

__init__(*args, **kwargs)
schrodinger.infra.mm.OPLSArchive_create(archive_path) OPLSArchive

Creates a new archive instance :type archive_path: boost::filesystem::path :param archive_path: path to custom parameter archive

schrodinger.infra.mm.OPLSArchive_isCompatible(archive_path) bool
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive

Return type:

boolean

Returns:

whether the metadata is compatible with the current release

schrodinger.infra.mm.OPLSArchive_upgrade(archive_path)
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive to upgrade

schrodinger.infra.mm.OPLSArchive_validate(archive_path)
Parameters:

archive_path (boost::filesystem::path) – path to custom parameter archive

Raises:

OPLSArchiveError if the OPLSArchive is in an invalid state

class schrodinger.infra.mm.OPLSDatafile

schrodinger::forcefield::OPLSDatafile

__init__(*args, **kwargs)
type(self) schrodinger::forcefield::OPLSDatafileType
version(self) std::optional< schrodinger::forcefield::OPLSVersion >
class schrodinger.infra.mm.OPLSDatafileType
METAFILE_JSON = 0
ASSIGN_METAL_PROPERTIES_TYPE = 1
CONFGEN_TORSION_TYPE = 2
CONF_CLEANUP_TORSION_TYPE = 3
DEFAULTS = 4
STRETCH_DEFAULT_DATA = 5
STRUCTURE_PREP_GEOMETRIC_RULES = 6
BCC_OVERWRITE_TYPE = 7
BEND_DAT = 8
BEND_INDEX_DAT = 9
CMAP_DAT = 10
CMAP_TYPE = 11
CONSOLV_TYPE = 12
DEFAULTS_DAT = 13
EXPONENTIAL_REP_DAT = 14
IMPROPER_TORSIONS_DAT = 15
METAL_COMPLEX_SETUP = 16
OPLSAA_BCC = 17
OPLSAA_BCI = 18
OPLSAA_NOSORT_TYPE = 19
OPLSAA_SIMIL_TBL = 20
OPLSAA_TYPE = 21
OPLSAA_VDW = 22
SGBNP_PARAM = 23
SPECIAL_SYMBOL_TYPE = 24
SPREAD_FORMAL_CHARGE_DAT = 25
SPREAD_ZOB_FORMAL_CHARGE_DAT = 26
STRETCH_DAT = 27
STRETCH_INDEX_DAT = 28
SYMBOL_COMPRESSION_DAT = 29
TORSION_DAT = 30
TORSION_INDEX_DAT = 31
UTT_BOND_INDEX_TYPE = 32
UTT_DAT = 33
VIRTUAL_SITE_TYPE = 34
POLARIZABILITY = 35
OPLS_M = 36
class schrodinger.infra.mm.OPLSVersion
F14 = 14
F16 = 16
F17 = 17
class schrodinger.infra.mm.OPLSVersionHash

schrodinger::forcefield::OPLSVersionHash Functor to use as hash in an unordered_map

__init__(*args, **kwargs)
class schrodinger.infra.mm.Preferences
__init__(*args, **kwargs)
clear(self)

Clear all values from preferences object.

hasKey(self, key) bool

Returns true if key exists.

removeKey(self, key)

Remove key from preferences, will not throw exception if key does not exist

class schrodinger.infra.mm.RedirectMmerrToPythonStderr

schrodinger::mmlibs::RedirectMmerrToPythonStderr

__init__(*args, **kwargs)
close(self)
class schrodinger.infra.mm.ScoreAtom

::ScoreAtom

__init__(*args, **kwargs)
is_hydrogen
vdw_radius
x
y
z
class schrodinger.infra.mm.UTT

::UTT

__init__(*args, **kwargs)
addParam(self, spec)

Adds a parameter corresponding to one of the underlying torsions.

atom1
atom2
canonicalize(self)

Canonicalizes the order of the atoms in the UTT. Will order by symbol numbers if present, otherwise by symbol strings.

central_bt
comment
end_atoms1
end_atoms2
getDefinitionString(self) std::string

Generates a string defining the UTT

info
matched
opt
quality
regular_torsion
reverseOrder(self)

Reverses the order of the UTT around the central atoms, including the end atoms and parameters.

scl14type
updateSymbolNumbers(self, fcn)

Update the symbol numbers of all atoms in this UTT according to a unary function that takes a string and returns an int. :type fcn: UpdateSignature :param fcn: function with signature int(const std::string&) returning the

symbol number for a corresponding symbol

utt_par
utt_reverse_order
class schrodinger.infra.mm.UTTAtom

::UTTAtom

__init__(*args, **kwargs)
atom_idx
symbol
symbol_num
updateSymbolNumber(self, fcn)

Update the symbol number according to a unary function that takes a string and returns an int. :type fcn: UpdateSignature :param fcn: function with signature int(const std::string&) returning the

symbol number for a corresponding symbol

class schrodinger.infra.mm.UTTDefSpec

::UTTDefSpec

__init__(*args, **kwargs)
comment
def_str
info
opt
quality
scl14type
class schrodinger.infra.mm.UTTEndAtom

::UTTEndAtom bond type and end atom connected to central atom Note this is a non-virtual class, it inherits for implementation, not for polymorphism. If we switch to private members with getters, we can instead use composition here more easily (less chained members).

__init__(*args, **kwargs)
bt
invariant(self) bond_index_t

Get an ‘invariant’ measure which can be used for canonical comparison and sorting :rtype: int :return: the invariant number

class schrodinger.infra.mm.UTTParamSpec

::UTTParamSpec

__init__(*args, **kwargs)
bt0
bt3
comment
sym0
sym3
v
class schrodinger.infra.mm.UTTParameter

::UTTParameter

__init__(*args, **kwargs)
comment
end_atom0
end_atom3
v
class schrodinger.infra.mm.UTTPolicy
ALL = 0
FROM_TORS_ATOMS_ONLY = 1
class schrodinger.infra.mm.UnpairedElectronsReplacementMode
LeaveUnspecified = 0
ExplicitHydrogens = 1
SetAsCharge = 2
class schrodinger.infra.mm.WaterMapAtom

::WaterMapAtom

__init__(*args, **kwargs)
energy
entropy
free_energy
occupancy
vdw_radius
x
y
z
class schrodinger.infra.mm.WaterMapAtomList

std::vector< WaterMapAtom >

__init__(*args, **kwargs)
__len__()

Return len(self).

append(self, x)
assign(self, n, x)
back(self) WaterMapAtom
begin(self) std::vector< WaterMapAtom >::iterator
capacity(self) std::vector< WaterMapAtom >::size_type
clear(self)
empty(self) bool
end(self) std::vector< WaterMapAtom >::iterator
erase(self, pos) std::vector< WaterMapAtom >::iterator
erase(self, first, last) std::vector< WaterMapAtom >::iterator
front(self) WaterMapAtom
get_allocator(self) std::vector< WaterMapAtom >::allocator_type
insert(self, pos, x) std::vector< WaterMapAtom >::iterator
insert(self, pos, n, x) None
iterator(self) SwigPyIterator
pop(self) WaterMapAtom
pop_back(self)
push_back(self, x)
rbegin(self) std::vector< WaterMapAtom >::reverse_iterator
rend(self) std::vector< WaterMapAtom >::reverse_iterator
reserve(self, n)
resize(self, new_size)
resize(self, new_size, x) None
size(self) std::vector< WaterMapAtom >::size_type
swap(self, v)
class schrodinger.infra.mm.WaterMapStructure

::WaterMapStructure

__init__(*args, **kwargs)
atom
continuous(self) bool
schrodinger.infra.mm.assert_development_license_exists()

Verifies the existence of the OPLS development license.

Raises:

: if an OPLS development license is not available

schrodinger.infra.mm.changeParameterValuesByIndex(mmffld_id, paramtype, index, parameter_list) MMFfldStatus
schrodinger.infra.mm.convert_xyz_from_angstroms_to_bohr(coords) Eigen::Matrix3Xd

prepare the xyz coordinates for mmffld :type coords: std::vector< double,std::allocator< double > > :param coords: xyz coordinates in Angstroms :rtype: Eigen::Matrix3Xd :return: xyz coordinates in Bohr

schrodinger.infra.mm.current_opls_metadata() std::string
Return type:

string

Returns:

the current OPLS force field metadata

schrodinger.infra.mm.development_license_exists() bool

Checks for the existence of the OPLS development license, which enables encryption/decryption for force field builder parameter data.

Return type:

boolean

Returns:

: whether an OPLS development license is available

schrodinger.infra.mm.ffld_main_licenses_exist(version) bool

Checks for the existence of the main OPLS license.

Parameters:

version: – OPLS force field version

Return type:

boolean

Returns:

: whether an OPLS main license is available

schrodinger.infra.mm.ffld_spec_to_string(ffld_spec) std::string
Parameters:

forcefield – specifier

Print opls version and archive paths

schrodinger.infra.mm.find_ligand_atoms(ct, params) MM_Bitset
Return a bitset of atoms that match the ligand defintion. This is the

analog to the ligand keyword in ASL.

Parameters:
  • ct (int, in) – structure handle

  • params (LigandParameters, in) – LigandParameters object. The default constructor will query the values from the user preferences.

Return type:

MM_Bitset

Returns:

bitset with ligand atoms in the ct on

schrodinger.infra.mm.find_ligand_molecules(ct, params) std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >

Return a vector of vectors, where each inner vector is the atom indices of an individual ligand molecule. This is the analog to the ligand keyword in ASL.

type ct:

int, in

param ct:

structure handle

type params:

LigandParameters, in

param params:

LigandParameters object. The default constructor will query the values from the user preferences.

rtype:

std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >

return:

Vector of vectors of ligand atom indices

schrodinger.infra.mm.get_OPLS_data_filename(opls_dir, version, data_file_basename='utt.dat') std::string
schrodinger.infra.mm.get_OPLS_data_subdirectory(opls_dir, version) std::string
schrodinger.infra.mm.get_angle_between_two_vectors(vector1, vector2) double

Gets the angle formed between two vectors in degrees

Parameters:
  • vector1: – Cartesian vector

  • vector2: – Cartesian vector

Return type:

float

Returns:

: angle between vectors in degrees

schrodinger.infra.mm.get_archive_path(oplsdir) boost::filesystem::path

Determines the path to the custom parameter archive corresponding to this release; for now, we store archives in OPLSDIR directly

Parameters:

oplsdir (boost::filesystem::path) – path to an OPLSDIR

Return type:

boost::filesystem::path

Returns:

path to the custom parameter archive

schrodinger.infra.mm.get_compatible_archive_path(oplsdir) boost::filesystem::path

Determines the path to the newest compatible custom parameter archive within the given OPLSDIR

Parameters:

oplsdir (boost::filesystem::path) – path to an OPLSDIR

Return type:

boost::filesystem::path

Returns:

path to the newest compatible custom parameter archive

Raises:

std::runtime_error if no compatible archives are found

schrodinger.infra.mm.get_current_OPLS_data_filename(opls_dir, data_file_basename='utt.dat') std::string
schrodinger.infra.mm.get_current_OPLS_data_subdirectory(opls_dir) std::string
schrodinger.infra.mm.get_dihedral(bond2_1, bond2_3, bond2_4) double

Gets the dihedral angle based on bond vectors in degrees NOTE: Matches implementation in mmctaux

Parameters:
  • bond2_1: – Cartesian vector from atom 2 -> 1

  • bond2_3: – Cartesian vector from atom 2 -> 3

  • bond2_4: – Cartesian vector from atom 2 -> 4

Return type:

float

Returns:

: angle between vectors in degrees

schrodinger.infra.mm.get_ffld_spec(version, archive_path='') FfldSpec
schrodinger.infra.mm.get_ligand_parameters() LigandParameters

Get the current parameter set from user’s preferences, has default values for anything not specified. This is used by the ligand keyword in ASL

Return type:

LigandParameters

Returns:

parameter object for passing to find_ligand_atoms

schrodinger.infra.mm.get_localhost_temp_dir() std::string
schrodinger.infra.mm.get_mmshare_data_directory() std::string
schrodinger.infra.mm.get_normal_vector_to_three_points(point1, point2, point3) Cartesian

Gets normal vector defining a plane spanned by three points

Parameters:
  • c1: – Cartesian coordinates

  • c2: – Cartesian coordinates

  • c3: – Cartesian coordinates

Return type:

Cartesian

Returns:

: normal vector to c1-c2-c3 plane

schrodinger.infra.mm.get_opls_metadata_compatibility(metadata, version) schrodinger::forcefield::MetadataCompatibility

The “full” or “major_only” compatibility means custom .opls files are “upgradable” to the current release, while “major_mismatch” compatibility disallows upgrades. Only ffbuilder projects wiht “full” compatibility continue to be usable input, while “major_only” and “major_mismatch” ffbuilder projects need to go through re-analysis and re-fitting. This mechanism enables FFLD development to utilize minor version change to trigger re-analysis but still keep .opls files upgradable.

Parameters:

metadata (string) – OPLS force field metadata

Return type:

int

Returns:

to what extent the metadata is compatible with the current release

schrodinger.infra.mm.get_preference_custom_opls_path() std::string
Return type:

string

Returns:

custom oplsdir global preference, or the above default if not set

schrodinger.infra.mm.get_preference_most_recent_custom_opls_paths() std::vector< std::string,std::allocator< std::string > >
Return type:

std::vector< std::string,std::allocator< std::string > >

Returns:

list of most recently used opls directories in the global preferences

schrodinger.infra.mm.get_preference_opls_version(allow_opls5=False) schrodinger::forcefield::OPLSVersion

Retrieves the OPLS force field version based on global preferences. If OPLSVersion::F17 is set in the global preferences and OPLS5 is disallowed, falls back to OPLSVersion::F16. :type allow_opls5: boolean, optional :param allow_opls5: Flag indicating whether OPLS5 is allowed as a valid

version.

Return type:

int

Returns:

The OPLS force field version.

schrodinger.infra.mm.get_preference_use_custom_opls() bool
Return type:

boolean

Returns:

whether custom opls parameters should be used per the global preferences, or false if not set

schrodinger.infra.mm.get_schrodinger_temp_dir() std::string
schrodinger.infra.mm.get_structure_UTTs(mmffld_handle, st, policy=ALL) std::vector< UTT,std::allocator< UTT > >

returns all UTTs given the structure and the force field instance

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • st: – the Structure instance

Return type:

std::vector< UTT,std::allocator< UTT > >

Returns:

: vector of UTTs

schrodinger.infra.mm.get_torsion_fit_info(mmffld_id, ct) FitParamInfo
schrodinger.infra.mm.installation_archive_path() boost::filesystem::path
schrodinger.infra.mm.int_to_opls_version(version) schrodinger::forcefield::OPLSVersion
Parameters:

OPLS – version

Return type:

int

Returns:

Converts either OPLS_200X or fXX integer to valid enum value

schrodinger.infra.mm.is_valid_opls_directory(oplsdir) bool

Determines if the given OPLS_DIR is valid for a specific force field version.

Parameters:

oplsdir (boost::filesystem::path) – directory to validate

Return type:

boolean

Returns:

whether the given OPLS_DIR passes validation

schrodinger.infra.mm.ligprep3_refcount() int
schrodinger.infra.mm.make_metal_force_field_manager(ffld_version, archive_path) schrodinger::energy::MetalForceFieldManager
schrodinger.infra.mm.make_metal_force_field_manager_from_ffld_spec(ffld_spec) schrodinger::energy::MetalForceFieldManager
schrodinger.infra.mm.make_metal_force_field_manager_from_mmffld_handle(mmffld_handle) schrodinger::energy::MetalForceFieldManager
schrodinger.infra.mm.minimization_license_exists() bool

Checks for the existence of any license which enables minimization; this includes MacroModel, Glide, Impact, MaterialScience, or Plop.

Return type:

boolean

Returns:

: whether a minimization license is available

schrodinger.infra.mm.mmalign_get_aligned_sequence(alignment, nth_aligned_seq) MMsequence
schrodinger.infra.mm.mmalign_get_end_position(alignment, nth_aligned_seq) int
schrodinger.infra.mm.mmalign_get_evalue(alignment, nth_aligned_seq) double
schrodinger.infra.mm.mmalign_get_num_aligned_sequences(alignment) int
schrodinger.infra.mm.mmalign_get_percent_gaps(alignment, nth_aligned_seq) int
schrodinger.infra.mm.mmalign_get_percent_identity(alignment, nth_aligned_seq) int
schrodinger.infra.mm.mmalign_get_percent_positive(alignment, nth_aligned_seq) int
schrodinger.infra.mm.mmalign_get_query_sequence(alignment) MMsequence
schrodinger.infra.mm.mmalign_get_score(alignment, nth_aligned_seq) double
schrodinger.infra.mm.mmalign_get_start_position(alignment, nth_aligned_seq) int
schrodinger.infra.mm.mmalign_in_use(alignment) MMbool
schrodinger.infra.mm.mmat_get_atom_type(arg1) int
schrodinger.infra.mm.mmat_get_central_geometry(arg1) int
schrodinger.infra.mm.mmat_get_color(arg1) int
schrodinger.infra.mm.mmat_get_element_by_atomic_number(atomic_number) char *
schrodinger.infra.mm.mmat_get_formal_charge(arg1) int
schrodinger.infra.mm.mmat_get_largest_vdw_radius() double
schrodinger.infra.mm.mmat_get_mmod_name(arg1) char *
schrodinger.infra.mm.mmat_get_nhua(arg1) int
schrodinger.infra.mm.mmat_get_valence(arg1) int
schrodinger.infra.mm.mmat_get_vdw_radius(arg1) double
schrodinger.infra.mm.mmat_get_wildcard(arg1) int
schrodinger.infra.mm.mmat_is_wildcard(arg1) int
schrodinger.infra.mm.mmbs_get_next(ibs, pos) int

returns the next member set after “pos”; MMBS_ERR if none if “pos” is specified as zero or negative,

return the position of the lowest bit that is on

schrodinger.infra.mm.mmbs_in_use(ibs) MMbool
schrodinger.infra.mm.mmbs_in_use(bs) MMbool

check whether bitset handle is valid

schrodinger.infra.mm.mmbs_is_on(ibs, pos) MMbool

querying bits

schrodinger.infra.mm.mmcolor_vector_to_index(color_vector_in)
schrodinger.infra.mm.mmcolor_vector_to_string(color_vector_in)
schrodinger.infra.mm.mmcommon_display_ffbuilder() MMbool

Returns true if display of Force Field Builder related functionality is allowed.

schrodinger.infra.mm.mmcommon_display_opls2() MMbool

Returns true if display of OPLS2 functionality is allowed.

schrodinger.infra.mm.mmcommon_display_scisol() MMbool

Returns true if display of ‘scisol’ related functionality is allowed.

schrodinger.infra.mm.mmcommon_display_watermap() MMbool

Returns true if display of Watermap functionality is allowed.

schrodinger.infra.mm.mmcommon_get_license_feature_version(feature) int

Return the major version to use for license feature.

Parameters:

feature (int, in) – License Feature code

Return type:

int

Returns:

int major version number to use with license feature

Raises:

std::runtime_error if invalid feature is passed

schrodinger.infra.mm.mmcommon_get_scratch_project_regular_expression() std::string
Return type:

string

Returns:

regular expression for scratch project name.

schrodinger.infra.mm.mmct_atom_get_atom_entry(ict, iatom) int

The atom number with respect to the entry in which it resides

schrodinger.infra.mm.mmct_atom_get_atom_mol(cthandle, iatom) int

The atom number with respect to the molecule in which it resides:

schrodinger.infra.mm.mmct_atom_get_bond_angle(ct1, ct1atom, ct2, ct2atom, ct3, ct3atom) MM_Angle
Calculate the bond angle between three specified atoms,

with no ct or atom error checking.

Parameters:
  • ct1 (int, in) – is the handle of the first atom’s CT

  • ct1atom (int, in) – is the atom number in first CT

  • ct2 (int, in) – is the handle of the second atom’s CT

  • ct2atom (int, in) – is the atom number in second CT

  • ct3 (int, in) – is the handle of the third atom’s CT

  • ct3atom (int, in) – is the atom number in third CT

Return type:

float

Returns:

bond angle, in degrees, computed between three given atoms

schrodinger.infra.mm.mmct_atom_get_charge1(cthandle, iatom) MM_Charge
schrodinger.infra.mm.mmct_atom_get_charge2(cthandle, iatom) MM_Charge
schrodinger.infra.mm.mmct_atom_get_chargef(cthandle, iatom) int
schrodinger.infra.mm.mmct_atom_get_color(cthandle, iatom) int

Deprecated: The atom’s true color is the RGB color returned by mmct_atom_get_color_vector.

schrodinger.infra.mm.mmct_atom_get_dihedral_angle(ct1, ct1atom, ct2, ct2atom, ct3, ct3atom, ct4, ct4atom) MM_Angle
Calculate the dihedral angle between four specified atoms,

with no ct or atom error checking.

Parameters:
  • ct1 (int, in) – is the handle of the first atom’s CT

  • ct1atom (int, in) – is the atom number in first CT

  • ct2 (int, in) – is the handle of the second atom’s CT

  • ct2atom (int, in) – is the atom number in second CT

  • ct3 (int, in) – is the handle of the third atom’s CT

  • ct3atom (int, in) – is the atom number in third CT

  • ct4 (int, in) – is the handle of the fourth atom’s CT

  • ct4atom (int, in) – is the atom number in fourth CT

Return type:

float

Returns:

dihedral angle, in degrees, computed between four given atoms

schrodinger.infra.mm.mmct_atom_get_distance(ct1, ct1atom, ct2, ct2atom) MM_Coord
schrodinger.infra.mm.mmct_atom_get_distance_pbc(ct1, ct1atom, ct2, ct2atom) MM_Coord

Calculate the distance between ct1atom and ct2atom with no error checking, respecting Periodic Boundary Conditions of atom1 if they are set. (gets the distance between the two closest copies of ct1atom and ct2atom)

Parameters:
  • ct1 (int, in) – is the handle of the first atom’s CT

  • ct1atom (int, in) – is the atom number in first CT

  • ct2 (int, in) – is the handle of the second atom’s CT

  • ct2atom (int, in) – is the atom number in second CT

schrodinger.infra.mm.mmct_atom_get_entry_mol_num(ict, iatom) int

Returns the entry-relative molecule number for this molecule.

schrodinger.infra.mm.mmct_atom_get_secondary_struct(cthandle, iatom) int
schrodinger.infra.mm.mmct_atom_get_x(cthandle, iatom) MM_Coord
schrodinger.infra.mm.mmct_atom_get_y(cthandle, iatom) MM_Coord
schrodinger.infra.mm.mmct_atom_get_z(cthandle, iatom) MM_Coord
schrodinger.infra.mm.mmct_atom_has_alt_position(cthandle, iatom) MMbool

Indicates whether or not the given atom has alternate coordinates

schrodinger.infra.mm.mmct_atom_is_selected(cthandle, iatom) MMbool
schrodinger.infra.mm.mmct_ct_get_all_xyz_copy(cthandle)
schrodinger.infra.mm.mmct_ct_get_all_xyz_live(cthandle)
schrodinger.infra.mm.mmct_ct_get_first_entry_atom(ct, entry_name) MM_Index

Returns index of first atom with entry_name, if found, zero otherwise. This is the fastest way to determine whether any atom has entry_name. The atom index can be used for mmct_atom_get_entry_atoms.

schrodinger.infra.mm.mmct_ct_in_use(cthandle) int
schrodinger.infra.mm.mmct_id_map_in_use(imap) MMbool

Check whether imap handle is valid

schrodinger.infra.mm.mmct_is_enabled(option) int
schrodinger.infra.mm.mmct_is_standard_biopolymer(res_name) MMbool

Returns TRUE if the specified residue is either a protein or a nucleotide:

schrodinger.infra.mm.mmct_is_standard_nucleotide(res_name) MMbool

Returns TRUE if the specified residue is on the list of known standard PDB nucleotide bases:

schrodinger.infra.mm.mmct_is_standard_residue(res_name) MMbool

Returns TRUE if the specified residue is on the list of known standard PDB residues:

schrodinger.infra.mm.mmct_res_connected(ct, res1_atom, res2_atom) MMbool

This function determines whether or not the residues are connected. If the “C” PDB atom of res1 is connected to the “N” PDB atom of res2, then the residues are connected. Otherwise, they are not connected.

schrodinger.infra.mm.mmct_valid_atom(atom_index) MMbool

Tell if `atom_index’ is a valid value. This is only checking the value against the lower bound, not against the upper bound (ie. the number of atoms)

schrodinger.infra.mm.mmelement_get_atomic_number_by_symbol(symbol) int

Get Atomic nuber by symbol :type symbol: string, in :param symbol: Atomic symbol for a chemical element. :rtype: int :return: Atomic number corresponding to given symbol.

Return -1 otherwise.

schrodinger.infra.mm.mmelement_get_atomic_weight_by_atomic_number(atnum) double

Get Atomic weight by atomic number :type atnum: int, in :param atnum: Atomic number for a chemical element. :rtype: float :return: Atomic weight corresponding to given atomic number.

Return 0 otherwise.

schrodinger.infra.mm.mmelement_get_atomic_weight_by_symbol(symbol) double

Get Atomic weight by atomic symbol :type symbol: string, in :param symbol: Atomic symbol for a chemical element. :rtype: float :return: Atomic weight corresponding to given atomic symbol.

Return 0 otherwise.

schrodinger.infra.mm.mmelement_get_max_valence(atomic_number) size_t

Gets the maximum number of bonds that can be made to the atom. Raises runtime_error for invalid atomic numbers (>= 0 or >= 102).

Parameters:

atomic_number (int) – Atomic number for a chemical element.

Return type:

int

Returns:

number of valence electrons

schrodinger.infra.mm.mmelement_get_period(atomic_number) size_t

Determines period of the element in the periodic table by atomic number. This directly correspoinds to the the principal quantum number (n).

Parameters:

atomic_number (int) – Atomic number for a chemical element.

Return type:

int

Returns:

element’s period

schrodinger.infra.mm.mmelement_get_symbol_by_atomic_number(atnum) char const *

Get Atomic symbol by atomic number :type atnum: int, in :param atnum: Atomic number for a chemical element. :rtype: string :return: Atomic symbol corresponding to atomic number.

Caller has to free the string. Return NULL otherwise.

schrodinger.infra.mm.mmelement_get_valence_count(atomic_number) size_t

Gets the number of valence electrons the atom provides. Raises runtime_error for invalid atomic numbers (>= 0 or >= 102).

Parameters:

atomic_number (int) – Atomic number for a chemical element.

Return type:

int

Returns:

number of valence electrons

schrodinger.infra.mm.mmffld_checkMetalSupport(mmffld_handle, st, adapt_in_place=False, component=schrodinger::energy::MetalForceFieldComponent::LIGAND_FIELD) MetalSupportStatus

the metal lewis adapter, which is called while assigning parameters, will determine if all flagged metal complexes are supported by the force field. This wrapper returns the current state of the metal force field support

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • st: – structure obj to check the metal ff support against

  • adapt_in_place (boolean, optional) – if true the function could modify the connection table, and the complex could be in the nonbonded rep if chemistry is supported

  • component (int, optional) – flag to specify whether LFMM or FlucCT support should be checked

Return type:

MetalSupportStatus

Returns:

: MetalSupportStatus, which contains a bool whether or not there is full support, and the set of any unsupported metal or ligand atoms.

schrodinger.infra.mm.mmffld_compute_esp_rmse(qm_potential, mm_potential, weights) double

compute the root mean squared error between the mm and qm esp :type qm_potential: Eigen::VectorXd :param qm_potential: qm esp :type mm_potential: Eigen::VectorXd :param mm_potential: mm esp :type weights: Eigen::VectorXd :param weights: weights for rmse calculation :rtype: float :return: rmse

schrodinger.infra.mm.mmffld_compute_mm_esp(atomic_charges, grid, xyz) Eigen::VectorXd

compute esp from a set of atomic charges and a grid :type atomic_charges: std::vector< double,std::allocator< double > > :param atomic_charges: mm atomic charges :type grid: Eigen::MatrixX3d :param grid: the grid point to compute the esp over :type xyz: Eigen::Matrix3Xd :param xyz: atomic xyz coordinates :rtype: Eigen::VectorXd :return: esp

schrodinger.infra.mm.mmffld_getAtomicCharges(mmffld_handle, include_charge_transfers=False) std::vector< double,std::allocator< double > >

Get the atomic charges after force field assignement

If include_charge_transfers = true, get combined charges = OPLS fixed charges + FlucCT charge transfers. Otherwise, get OPLS fixed charges.

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • include_charge_transfers: – if true, include FlucCT charge transfers

Raises:

std::runtime_error if MMFFLD_COUPLE_DRUDES_FLUCCT is enabled this api does not currently support the FlucCTDrude coupling

Return type:

std::vector< double,std::allocator< double > >

Returns:

: The force field atomic charges of a molecular system

schrodinger.infra.mm.mmffld_getCoordinates(mmffld_handle, relax_drudes=False) std::vector< double,std::allocator< double > >

Get coordinates for all the sites (i.e., real and pseudo sites) :type mmffld_handle: int :param mmffld_handle: :type relax_drudes: boolean, optional :param relax_drudes: if true, the drudes will be relaxed to their parents :raises: std::runtime_error if MMFFLD_COUPLE_DRUDES_FLUCCT is enabled

this api does not currently support the FlucCTDrude coupling

Return type:

std::vector< double,std::allocator< double > >

Returns:

coordinates as a 1D vector

schrodinger.infra.mm.mmffld_getEnergyForce(mmffld_id) std::pair< std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > > >

API to provide energies and forces. The atom positions from the ct-handle given to mmffld_enterMol() will be used.

Parameters:

mmffld_id (int) – instance of mmffld with the coordinates of the real atoms

Return type:

std::pair< std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > > >

Returns:

a pair containing: a vector of energies of length MMFfldMAX_ENE a vector of forces of length 3 * number of atoms (including virtual sites)

NOTE: This API is incompatible with virtual site folding and will fail if it is enabled.

schrodinger.infra.mm.mmffld_getEnvEnergyForce(mmffld_id, center_atom_list, env_atom_list={}) std::pair< double,std::vector< double,std::allocator< double > > >

Get the energy force between a provided atom list and the surrounding atoms

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • center_atom_list: – the center atom list for calculating energy/forces. Atom indices are 1-based.

  • env_atom_list: – the surrounding atom list. When it is not provided, it will use all the atoms in the system that are not in the center atom list

Return type:

std::pair< double,std::vector< double,std::allocator< double > > >

Returns:

the energy value and force lists. The energy value is the total non-bonded energy; The force list is in the size 3 times of the total real atoms and virtual sites. But only the real atoms*3 are non-zero values. The virtual sites have 0 forces. The force values only include the forces generated by the two atom lists

schrodinger.infra.mm.mmffld_getExcludedAtoms(mmffld_handle, i) std::unordered_set< unsigned int,std::hash< unsigned int >,std::equal_to< unsigned int >,std::allocator< unsigned int > >

get the set of excluded atom indices for a given atom

Parameters:
  • mmffld_handle (int) – handle for the current mmffld instance

  • i (int) – atom index (0-based)

Return type:

std::unordered_set< unsigned int,std::hash< unsigned int >,std::equal_to< unsigned int >,std::allocator< unsigned int > >

Returns:

unordered set of excluded atom indices

schrodinger.infra.mm.mmffld_getMetalComplexParameters(mmffld_handle, component) MetalSystemsParams

Get specific metal force field parameters for assigned the metal complexes

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • component: – flag to specify a subsystem of the metal system

Return type:

MetalSystemsParams

Returns:

: metal complex parameters

schrodinger.infra.mm.mmffld_getOplsmLigandTypes(mmffld_handle, component) MetalSystemsTypeMap

get oplsM force field ligand types for assigned the complexes

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • component: – flag to specify a subsystem of the metal system

Return type:

MetalSystemsTypeMap

Returns:

: complex ligand indices mapped to types

schrodinger.infra.mm.mmffld_getOplsmMetalTypes(mmffld_handle) MetalSystemsTypeMap

get oplsM force field metal types for assigned the complexes

Parameters:

mmffld_handle: – handle for the current mmffld instance

Return type:

MetalSystemsTypeMap

Returns:

: complex metal indices mapped to types

schrodinger.infra.mm.mmffld_get_LJ_type_from_symbol(mmffld_id, vdw_type) int
schrodinger.infra.mm.mmffld_get_error_handler() int

Get mmffld’s error handler.

schrodinger.infra.mm.mmffld_get_loaded_UTTs(mmffld_handle) std::map< std::string,UTT,std::less< std::string >,std::allocator< std::pair< std::string const,UTT > > >

Extracts all UTTs currently loaded into the given force field instance

Parameters:

mmffld_handle: – handle for the current mmffld instance

Return type:

std::map< std::string,UTT,std::less< std::string >,std::allocator< std::pair< std::string const,UTT > > >

Returns:

: ordered map of loaded UTTs with definition strings as keys

schrodinger.infra.mm.mmffld_hasMetalComplexLewisUnadaptInfo(ct_handle) bool

Meant to be used to avoid making unnecessary connection table copies. :rtype: boolean :return: true if metal complex Lewis unadaptation is may alter the

connection table of the molecular system.

schrodinger.infra.mm.mmffld_minimize()

mmffld_minimize_lic(mmffld_id) -> MinimizeResults

schrodinger.infra.mm.mmffld_minimize_lic(mmffld_id) MinimizeResults
schrodinger.infra.mm.mmffld_overwrite_vdw_interaction_parameter_IAC(mmffld_id, iac_i, iac_j, value_a, value_b)
schrodinger.infra.mm.mmffld_parse_resp_file(filename, n_real_atoms, xyz) MMFfldEspData

parse the .resp file, does sanity check against coordinates, and extract the esp data :type filename: string :param filename: the name of the jaguar resp file :type n_real_atoms: int :param n_real_atoms: number of real atoms in the system :param coords: xyz coordinates for all sites :rtype: MMFfldEspData :return: MMFfldEspData

schrodinger.infra.mm.mmffld_refcount() int

Return the library reference count.

schrodinger.infra.mm.mmffld_setElectricField(mmffld_handle, electric_field)
Sets the external uniform electric field

for the given MMFFLD handle.

Parameters:
  • mmffld_handle (int) – The handle to the MMFFLD instance.

  • electric_field (Eigen::Vector3d) – external uniform electric field (a.u./A^2)

schrodinger.infra.mm.mmffld_setMetalComplexParameters(mmffld_handle, params, component)

Set specific metal force field parameters for assigned the metal complexes

Parameters:
  • mmffld_handle: – handle for the current mmffld instance

  • params (MetalSystemsParams) – metal force field parameters

  • component: – flag to specify a subsystem of the metal system

schrodinger.infra.mm.mmffld_solveFlucCTPlusDrudes(mmffld_handle) std::pair< std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > > >

Compute charges and atomic coordinates for a molecular system by solving the FlucCT+Drude equations (SCF procedure) :type mmffld_handle: int :param mmffld_handle: :raises: std::runtime_error if MMFFLD_COUPLE_DRUDES_FLUCCT i not enabled :rtype: std::pair< std::vector< double,std::allocator< double > >,std::vector< double,std::allocator< double > > > :return: atomic charges and coordinates

schrodinger.infra.mm.mmffld_unadaptMetalComplexLewis(ct_handle)

Unadapt metal complex lewis structure from the nonbonded representation to the bonded representation (if possible). :type ct_handle: int :param ct_handle: handle of the connection table of the molecular system.

schrodinger.infra.mm.mmfile_get_config_dir() std::string
Returns path to configuration directory, in an OS localized fashion.

This string is newly allocated and must be freed by the caller.

Parameters:

config_dir – path to directory, NULL if MMFILE_ERROR

Return type:

string

Returns:

MMFILE_OK on success, MMFILE_ERROR if no directory exists.

schrodinger.infra.mm.mmfile_get_directory_path(which_directory) std::string

Returns a string that gives the directory path for any of the directories in the DirectoryName enum above. Wraps methods specific to particular directories in order to provide a nicer interface to python code that calls these methods. :type which_directory: int :param which_directory: gives the desired directory. :raises: runtime_error if the wrapped method does not produce a valid string

or does not return MMFILE_OK.

schrodinger.infra.mm.mmfile_get_maestro_scripts_path(path_type) std::string

Returns maestro scripts installation directory or menu absolute path. :type path_type: int, in :param path_type: is a one of the path type specified by

MaestroScriptsPathType enum.

Raises:

runtime_error if the wrapped method does not produce a valid string or does not return MMFILE_OK.

schrodinger.infra.mm.mmfile_get_product_dir_path(product_name) std::string

Returns product installation directory absolute path. :type product_name: string, in :param product_name: is a product directory pattern to be used to frame

the path.

Raises:

runtime_error if the wrapped method does not produce a valid string or does not return MMFILE_OK. E.g: product_name = ‘mmshare’, output = $SCHRODINGER/mmshare-vX.Y

schrodinger.infra.mm.mmfile_get_product_directory_names() std::vector< std::string,std::allocator< std::string > >
schrodinger.infra.mm.mmjag_basis_count() int

Report the number of basis sets defined in the Jaguar data files.

schrodinger.infra.mm.mmjag_key_nondef_count(h) int

Return the number of non-default keywords.

schrodinger.infra.mm.mmjag_scan_adjust(h, ct, coord_type, i, j, k, l, value, allow_linear, ct_ref) int
schrodinger.infra.mm.mmjag_scan_useable(scan_code) MMjag_bool
schrodinger.infra.mm.mmjag_terminate()

Shut down the library and release allocated memory.

schrodinger.infra.mm.mmlewis_get_error_handler() int
schrodinger.infra.mm.mmlewis_refcount() int
schrodinger.infra.mm.mmlist_get(list_id, list_index) int
schrodinger.infra.mm.mmlist_get_size(list_id) int
schrodinger.infra.mm.mmlist_in_list(list_id, val) int
schrodinger.infra.mm.mmmdl_escape_property_name(name) std::string

Convert an SD data name to the stem of a Maestro property string by applying certain escaping rules. For example, turns “my property_name%” into “my_property_name%25”

schrodinger.infra.mm.mmneut_get_errhandle() int
schrodinger.infra.mm.mmneut_set_errhandle(arg1) int
schrodinger.infra.mm.mmpatty_get_error_handler() int
schrodinger.infra.mm.mmpdb_get_three_to_one_letter_residue_map() std::unordered_map< resname_t,char > const &

Returns a map of full residue names to single character residue names ( e.g. ‘ALA’: ‘A’.)

schrodinger.infra.mm.mmpipeline_initialize() char *
schrodinger.infra.mm.mmseq_get_accession_number(sequence) char const *
schrodinger.infra.mm.mmseq_get_all_codes(sequence) char const *
schrodinger.infra.mm.mmseq_get_chainstr(sequence) std::string
schrodinger.infra.mm.mmseq_get_description(sequence) char const *
schrodinger.infra.mm.mmseq_get_length(sequence) int
schrodinger.infra.mm.mmseq_get_name(sequence) char const *
schrodinger.infra.mm.mmtable_table_is_valid(table) MMbool
schrodinger.infra.mm.mmtable_terminate()
schrodinger.infra.mm.mmzip_file_name(handle, index) char const *

Returns the name of the i-th child of the ZIP archive. The returned value should not be freed. :type handle: int, in :param handle: The handle of the mmzip object :type index: int :param index: The index, starting at 0.

Return type:

string

Returns:

NULL on error.

schrodinger.infra.mm.opls_name_to_version(name) schrodinger::forcefield::OPLSVersion
Parameters:

OPLS – force field name

Return type:

int

Returns:

corresponding OPLS version

schrodinger.infra.mm.opls_names(name_type=COMMON) std::vector< std::string,std::allocator< std::string > >
Return type:

std::vector< std::string,std::allocator< std::string > >

Returns:

all valid OPLS version names

schrodinger.infra.mm.opls_version_to_name(version, name_type=COMMON) std::string
Parameters:
  • OPLS – version

  • whether – to use the common forcefield name or a display-specific name

Return type:

string

Returns:

corresponding OPLS name

schrodinger.infra.mm.opls_versions() std::vector< int,std::allocator< int > >
schrodinger.infra.mm.read_utts(archive, version) std::vector< UTT,std::allocator< UTT > >

Read UTTs from an OPLS archive :type archive: OPLSArchive :param archive: OPLS archive to read from :type version: int :param version: OPLS version for the UTT_DAT OPLSDatafile :rtype: std::vector< UTT,std::allocator< UTT > > :return: vector of UTTs

Raises:

std::out_of_range if there is no UTT_DAT OPLSDatafile with the given OPLSVersion

schrodinger.infra.mm.resolve_archive_path(archive_path='') std::string

Auxiliary function get explicit custom opls archive path from either input string or OPLS_DIR env var. This is the ONLY place where OPLS_DIR env var is used to set the custom archive path :type archive_path: string, optional :param archive_path: path to a custom opls archive, can be empty

if you want to use OPLS_DIR env var or just the installation opls archive

Return type:

string

Returns:

path to a custom opls archive

schrodinger.infra.mm.set_globals()
schrodinger.infra.mm.set_ligand_parameters(params)

Sets the current ligand settings to the user’s preferences. This is used when a user specifies the ‘ligand’ keyword in ASL. :type params: LigandParameters, in :param params: ligand parameters

schrodinger.infra.mm.set_preference_custom_opls_path(custom_opls_path)

Sets the custom opls directory path in the global preferences :type custom_opls_path: string :param custom_opls_path: custom oplsdir path :raises: std::runtime_error if new value could not be set

schrodinger.infra.mm.set_preference_most_recent_custom_opls_paths(most_recent_custom_opls_paths)

Sets the most recently used opls directories in the global preferences :type most_recent_custom_opls_paths: std::vector< std::string,std::allocator< std::string > > :param most_recent_custom_opls_paths: list of most recently used

opls directories from global preferences

Raises:

std::runtime_error if new value could not be set

schrodinger.infra.mm.set_preference_opls_version(opls_version)

Sets the OPLS forcefield version in the global preferences :type opls_version: int :param opls_version: forcefield version :raises: std::runtime_error if new value could not be set

schrodinger.infra.mm.set_preference_use_custom_opls(use_custom_opls)

Sets whether to use custom opls parameters in the global preferences :param whether: custom opls parameters should be used :raises: std::runtime_error if new value could not be set

schrodinger.infra.mm.validate_opls_directory(oplsdir)

Validates the given OPLSDIR path for current release compatible custom parameters. This should be used when validating OPLS_DIR set in the env, which can be set to either a directory or a specific .opls file path

Parameters:

oplsdir (boost::filesystem::path) – directory to validate

Raises:

runtime_error if the validation fails

schrodinger.infra.mm.validate_opls_metadata(metadata)

Valid metadata can be loadable into an mmffld instance; invalid metadata will throw indicating the expected version information

Parameters:

metadata (string) – OPLS force field metadata

Raises:

runtime_error if the metadata is invalid