schrodinger.energy module

schrodinger::energy C++ wrappers

class schrodinger.energy.ANIIncompatibleException

schrodinger::energy::ANIIncompatibleException Exception when there is an incompatibility issue with an ANI model. Raised if any element used in ANI energy computation is not part of the supported set of elements.

__init__(*args, **kwargs)
class schrodinger.energy.ANIModel
SCHRODINGER = 1
ANI_1CCX = 2
DESMOND = 3
class schrodinger.energy.ANIPrecision
SINGLE = 4
DOUBLE = 8
class schrodinger.energy.AniEnergyOutput

schrodinger::energy::AniEnergyOutput TODO: AniEnergyOutput was previously nested in AniPredictor but cannot be nested bc of current swig version 3.0.12

Output object with - energy Total energy of the system - standard_deviation Committee standard deviation for the total energy - atomic_energies Energy for each atom - gradient Energy gradient on each atom -

__init__(*args, **kwargs)
atomic_energies
energy
gradient
standard_deviation
class schrodinger.energy.AniPredictor

schrodinger::energy::AniPredictor This class represents an ANI model that can be used repeatedly to calculate the energies and gradients for the same chemical structure with different coordinates.

ANY_GPU = -1
NO_GPU = -2
__init__(*args, **kwargs)
getEnergyOutput(self, st) AniEnergyOutput
getEnergyOutput(self, coords, atomic_numbers, pbc_ptr=None) AniEnergyOutput

Overload 1:

Calculate the energies and gradients for the given structure.


Overload 2:

Calculate the energies and gradients using the given atomic coordinates and atomic numbers. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects


Overload 3:

Calculate the energies and gradients using the given atomic coordinates and atomic numbers. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects

gpu(self) int

GPU used by this predictor.

isCompatible(self, st) bool
isCompatible(self, atomic_numbers) bool

Overload 1:

Check the given structure to see if it is compatible with this ANI model.


Overload 2:

Check the atomic numbers of a structure’s atoms to see if the structure is compatible with this ANI model.

class schrodinger.energy.AomComplex

schrodinger::energy::AomComplex The AomComplex class describes a monometal complex with the angular overlap model (AOM) See, JCTC 16(11), 6926-6937 (2020), Eqns. (3-14)

__init__(*args, **kwargs)
static create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates AomComplex objects and return the base class pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

getDOrbitalOccupancy(self) schrodinger::energy::Matrix5i const &

Gets d orbital occupancy :rtype: schrodinger::energy::Matrix5i :return: d orbital occupancy

getOutput(self, xyz, compute_grad=DISABLE) MetalComplexOutput

Calculates AOM energy and gradients

Parameters:
  • xyz (float) – coordinate of all atoms

  • compute_grad (int, optional) – option to compute gradients, default = false

Return type:

MetalComplexOutput

Returns:

MetalComplexOutput object comprised of energy, gradient, and eigenvalues

m_ligand_parameters
m_metal_occupancy
m_subsidiary_atom_counts

This vector logs subsidary atom count (number of bonded atoms for each primary ligand atom). It is used to obtain the atom offsets

schrodinger.energy.AomComplex_create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates AomComplex objects and return the base class pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

class schrodinger.energy.AomParamKeys

schrodinger::energy::AomParamKeys

HYBRID = 'Hybrid'
KEYS = ('Sigma', 'Hybrid', 'PiX', 'PiY')
PIX = 'PiX'
PIY = 'PiY'
SIGMA = 'Sigma'
__init__(*args, **kwargs)
class schrodinger.energy.AomParameter

schrodinger::energy::AomParameter

__init__(*args, **kwargs)
m_aom_hybrid
m_aom_pix
m_aom_piy
m_aom_sigma
toArray(self) std::array< float,4 >
class schrodinger.energy.ConcreteMetalSystem

schrodinger::energy::ConcreteMetalSystem ConcreteMetalSystem implements the interface class MetalSystem

__init__(*args, **kwargs)
evaluateFlucCT(self, coords, atom_count, onsite_esp_data, coul_propagator_data, forces) FlucCTOutput
evaluateFlucCT(self, fluc_ct_calculator, initial_guess, atom_count, onsite_esp_data, coul_propagator_data, forces) FlucCTOutput
evaluateLfmm(self, st) LfmmOutput
evaluateLfmm(self, coords) LfmmOutput
getFlucCTSystem(self) FlucCTSystem
getLigandIndices(self, component, primary_only=False) std::vector< unsigned int,std::allocator< unsigned int > > const &
getMonoMetalComplexes(self) std::vector< std::shared_ptr< schrodinger::energy::MonoMetalComplex >,std::allocator< std::shared_ptr< schrodinger::energy::MonoMetalComplex > > > const &
class schrodinger.energy.CoulPropagatorData

schrodinger::energy::CoulPropagatorData Contains Coulomb propagators and the corresponding adjacency list

The Coulomb propagators are stored as a sparse matrix with an adjacency list.

__init__(*args, **kwargs)
adj_list
propagators
class schrodinger.energy.DummyComplex

schrodinger::energy::DummyComplex DummyComplex is only used for FlucCT parameter fitting, i.e., without AOM and Morse contributions

__init__(*args, **kwargs)
static create(metal_ff_manager, st, m_index, m_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates DummyComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type m_index: int :param m_index: metal atom index :type m_type: int :param m_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

getOutput(self, xyz, compute_grad=DISABLE) MetalComplexOutput
schrodinger.energy.DummyComplex_create(metal_ff_manager, st, m_index, m_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates DummyComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type m_index: int :param m_index: metal atom index :type m_type: int :param m_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

class schrodinger.energy.FlucCTCalculator

schrodinger::energy::FlucCTCalculator The FlucCTCalculator class calculates charge transfer, energy, and force for the FlucCT model. It can be used on its own or via FlucCTSystem. It holds some intermediate calculations and can be reused if the atom positions are the same but the ESP data has changed.

__init__(*args, **kwargs)
createGuessZeros(self) Eigen::MatrixXd
evaluate(self, onsite_esp_data, initial_guess=None, compute_force=True) std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Calculates FlucCT energy, local part of energy gradients, and charge transfers in the presents of an external electric field (fixed OPLS charges)

Parameters:
  • onsite_esp_data (OnsiteEspData) – on-site ESP and ESP gradients

  • initial_guess (Eigen::MatrixXd, optional) – initial guess for the occupation transfer solver. Matrix of shape (metal_count X ligand_count).

  • compute_force (boolean, optional) – whether to compute force early exit if false (compute only dqs and energy)

Return type:

std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Returns:

a pair of FlucCTOutput and FlucCTIntermediateOutput

class schrodinger.energy.FlucCTIntermediateOutput

schrodinger::energy::FlucCTIntermediateOutput FlucCTIntermediateOutput contains intermediate results to calculate energy gradients: energy_gradients = local energy gradients + nonlocal energy gradients

“Nonlocal” means the energy gradients come from Coulomb interactions via the “transferred” charges. These nonlocal energy gradients are applied to sites both inside and outside the FlucCTSystem

Local energy gradients refers to the energy gradients excluding the nonlocal part, and they are only applied to sites within the FlucCTSystem

__init__(*args, **kwargs)
charge_transfer_matrix
ligand_screened_occupation_transfers
local_energy_gradients
metal_screened_occupation_transfers
class schrodinger.energy.FlucCTOutput

schrodinger::energy::FlucCTOutput FlucCTOutput contains FlucCT energy, metal charge transfers, and ligand charge transfers

__init__(*args, **kwargs)
energy
ligand_charge_transfers
metal_charge_transfers
class schrodinger.energy.FlucCTParamKeys

schrodinger::energy::FlucCTParamKeys

CHI = 'chi'
HARDNESS = 'hardness'
MIDPOINT = 'r0'
PARAM_KEYS = ('chi', 'hardness')
RATE = 'k'
SIGMOID_KEYS = ('r0', 'k')
__init__(*args, **kwargs)
class schrodinger.energy.FlucCTParameter

schrodinger::energy::FlucCTParameter The FlucCTParameter class contains parameters for the FlucCT model

__init__(*args, **kwargs)
m_chi
m_hardness
toArray(self) std::array< float,2 >
class schrodinger.energy.FlucCTSigmoid

schrodinger::energy::FlucCTSigmoid The FlucCTSigmoid class contains sigmoid parameters for the FlucCT model

__init__(*args, **kwargs)
m_k
m_r0
toArray(self) std::array< float,2 >
class schrodinger.energy.FlucCTSystem

schrodinger::energy::FlucCTSystem FlucCTSystem is a subsystem of ConcreteMetalSystem. It implements the FlucCT (Fluctuating Charge Transfer) model.

__init__(*args, **kwargs)
evaluate(self, metal_coords, ligand_coords, onsite_esp_data, initial_guess=None) std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Calculates FlucCT energy, local part of energy gradients, and charge transfers with a uniform external electrostatic field and pairwise Coulomb interactions with OPLS charges

Parameters:
  • metal_coords (Eigen::Matrix3Xd) – metal coordinates

  • ligand_coords (Eigen::Matrix3Xd) – ligand coordinates

  • onsite_esp_data (OnsiteEspData) – on-site ESP and ESP gradients

  • initial_guess (Eigen::MatrixXd, optional) – initial guess for the occupation transfer solver. Matrix of shape (metal_count X ligand_count).

Return type:

std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Returns:

a pair of FlucCTOutput and FlucCTIntermediateOutput

getLigandIndices(self) std::vector< unsigned int,std::allocator< unsigned int > > const &
getLigandTypes(self) std::vector< schrodinger::energy::FlucCTLigandType,std::allocator< schrodinger::energy::FlucCTLigandType > > const &
getMetalIndices(self) std::vector< unsigned int,std::allocator< unsigned int > > const &
getMetalTypes(self) std::vector< schrodinger::energy::FlucCTLigandType,std::allocator< schrodinger::energy::FlucCTLigandType > > const &
getParameters(self) std::vector< schrodinger::energy::ParamVector,std::allocator< schrodinger::energy::ParamVector > >

Gets FlucCT parameters for metal and ligand atoms

Return type:

std::vector< schrodinger::energy::ParamVector,std::allocator< schrodinger::energy::ParamVector > >

Returns:

Collection of FlucCT metal and ligand parameters, in order

getSigmoidParameters(self) schrodinger::energy::ParamVector

get metal specific sigmoid parameters

setParameters(self, params)

Sets FlucCT parameters for metal and ligand atoms

Parameters:

Collection – of FlucCT metal and ligand parameters, in order

setSigmoidParameters(self, params)

Sets metal specific sigmoid parameters

Parameters:

metal – sigmoid parameters

class schrodinger.energy.IterativeMlffModel

schrodinger::energy::IterativeMlffModel A class that compiles and runs an MLFF model that is aimed for “iterative” applications - those where an ML model will be iteratively called on the same system repeatedly (e.g. MD/optimization).

__init__(*args, **kwargs)
configureForSystem(self, atomic_numbers, net_charge, net_spin, has_pbc) MlffSystemPredictor

Set up the model to run on a given system and create a MlffSystemPredictor object that can be used to run inference predictions for the given system.

Additionally, this will validate the system, ensuring that it is compatible with the model type

Parameters:
  • atomic_numbers (std::vector< int,std::allocator< int > >) –

    • The atomic number of each particle making up the

    system.

  • net_charge (int) –

    • The net formal charge of the system.

  • net_spin (int) –

    • The net spin of the system.

  • has_pbc (boolean) –

    • Whether the system has periodic boundary conditions.

Raises:

std::runtime_error if the input features are not valid for this model. The runtime_error message will contain a description of the reasons the input is invalid.

Return type:

MlffSystemPredictor

Returns:

A reference to a system predictor object that can be used to run this model with the given system.

NOTE that only one MlffSystemPredictor can be active at a time for this model. New calls to configureForSystem may invalidate old references. Similarly, the IterativeMlffModel must outlive the returned MlffSystemPredictor.

getFixedInteractions(self) MlffFixedInteractions

The collection of MlffFixedInteractions that this specific model’s algorithm relies upon.

getPostProcessSteps(self) MlffPostProcessSteps

Obtain access to the PostProcessSteps used by this class to determine how to process the forward model. Typically, this is only necessary to set once during construction, but in some applications (e.g. desmond), these need to be changed dynamically.

setPostProcessSteps(self, new_steps)

Update the post processing steps that this model’s MlffSystemPredictor will run with

class schrodinger.energy.LfmmComplex

schrodinger::energy::LfmmComplex The LfmmComplex class describes a monometal complex with both the angular overlap model (AOM) and Morse potential

__init__(*args, **kwargs)
static create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates LfmmComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

getDOrbitalOccupancy(self) schrodinger::energy::Matrix5i const &

Gets d orbital occupancy :rtype: schrodinger::energy::Matrix5i :return: d orbital occupancy

getOutput(self, xyz, compute_grad=DISABLE) MetalComplexOutput

Calculates AOM + Morse energy and gradients

Parameters:
  • metal_coordinate – coordinate of the metal atom

  • all_ligand_coordinates – coordinates of all ligand atoms

  • compute_grad (int, optional) – option to compute gradients, default = false

Return type:

MetalComplexOutput

Returns:

MetalComplexOutput object comprised of energy, gradient, and eigenvalues

schrodinger.energy.LfmmComplex_create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates LfmmComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

class schrodinger.energy.LfmmOutput

schrodinger::energy::LfmmOutput Contains LFMM outputs of one metal system

__init__(*args, **kwargs)
all_ligand_gradients
aom_energy
eigenvalues
metal_gradients
morse_energy
potential_energy
class schrodinger.energy.LfmmParameter

schrodinger::energy::LfmmParameter

__init__(*args, **kwargs)
m_aom
m_morse
toArray(self) std::array< float,7 >
class schrodinger.energy.MetalComplexOutput

schrodinger::energy::MetalComplexOutput Contains LFMM outputs of one monometal complex including potential energy, energy gradients, and eigenvalues

__init__(*args, **kwargs)
aom_energy
eigenvalues
gradients
morse_energy
class schrodinger.energy.MetalForceFieldComponent
LIGAND_FIELD = 0
CHARGE_TRANSFER = 1
class schrodinger.energy.MetalForceFieldEnergy

schrodinger::energy::MetalForceFieldEnergy Contains metal force field itemized energies of a collection of metal systems

__init__(*args, **kwargs)
aom_energy
fluc_ct_energy
morse_energy
class schrodinger.energy.MetalForceFieldManager

schrodinger::energy::MetalForceFieldManager The Matalforce fieldManager class is used to load metal force field parameters from file and assigns them to a given structure

__init__(*args, **kwargs)
assignLigandTypes(self, st, component) std::map< unsigned int,schrodinger::energy::LigandType,std::less< unsigned int >,std::allocator< std::pair< unsigned int const,schrodinger::energy::LigandType > > >

Obtains ligand indices and types

Parameters:
  • st (schrodinger::Structure) – Schrodinger Strucutre object

  • component (int) – flag to specify a subsystem of the metal system

Return type:

std::map< unsigned int,schrodinger::energy::LigandType,std::less< unsigned int >,std::allocator< std::pair< unsigned int const,schrodinger::energy::LigandType > > >

Returns:

map of AOM ligand atoms mapping indices to force field types

Raises:

runtime_error is component = CHARGE_TRANSFER but FlucCT is not enabled

assignMetalTypes(self, st) std::map< unsigned int,schrodinger::energy::MetalType,std::less< unsigned int >,std::allocator< std::pair< unsigned int const,schrodinger::energy::MetalType > > >

Obtains metal indices and types

Parameters:

st (schrodinger::Structure) – Schrodinger Strucutre object

Return type:

std::map< unsigned int,schrodinger::energy::MetalType,std::less< unsigned int >,std::allocator< std::pair< unsigned int const,schrodinger::energy::MetalType > > >

Returns:

map of AOM metal atoms mapping indices to force field types

assignParameters(self, metal_ff_typer, fluc_ct, metal_ligand_cutoff=DEFAULT_METAL_LIGAND_CUTOFF) VecMetalSystem
assignParameters(self, st, monometal_complex_type, fluc_ct, metal_ligand_cutoff=DEFAULT_METAL_LIGAND_CUTOFF, metal_ff_typer_policy={}) VecMetalSystem

Overload 1:

Assigns metal force field parameters to a structure

Parameters:
  • metal_ff_typer (MetalForceFieldTyper) – MetalForceFieldTyper object

  • fluc_ct (boolean) – if true, use the FlucCT model

  • metal_ligand_cutoff (float, optional) – ligands are excluded outside the metal-ligand distance cutoff

Return type:

std::vector< std::shared_ptr< schrodinger::energy::MetalSystem >,std::allocator< std::shared_ptr< schrodinger::energy::MetalSystem > > >

Returns:

a vector of MetalSystem pointers


Overload 2:

Assigns metal force field parameters to a structure

Parameters:
  • st (schrodinger::Structure) – Schrodinger Strucutre object

  • monometal_complex_type (int) – monometal complex type

  • fluc_ct (boolean) – fluc_ct if true, use the FlucCT model

  • metal_ligand_cutoff (float, optional) – ligands are excluded outside the metal-ligand distance cutoff

  • metal_ff_typer_policy (MetalForceFieldTyperPolicy, optional) – determines how to cluster metal atoms

Return type:

std::vector< std::shared_ptr< schrodinger::energy::MetalSystem >,std::allocator< std::shared_ptr< schrodinger::energy::MetalSystem > > >

Returns:

a vector of MetalSystem pointers


Overload 3:

Assigns metal force field parameters to a structure

Parameters:
  • st (schrodinger::Structure) – Schrodinger Strucutre object

  • monometal_complex_type (int) – monometal complex type

  • fluc_ct (boolean) – fluc_ct if true, use the FlucCT model

  • metal_ligand_cutoff (float, optional) – ligands are excluded outside the metal-ligand distance cutoff

  • metal_ff_typer_policy – determines how to cluster metal atoms

Return type:

std::vector< std::shared_ptr< schrodinger::energy::MetalSystem >,std::allocator< std::shared_ptr< schrodinger::energy::MetalSystem > > >

Returns:

a vector of MetalSystem pointers


Overload 4:

Assigns metal force field parameters to a structure

Parameters:
  • st (schrodinger::Structure) – Schrodinger Strucutre object

  • monometal_complex_type (int) – monometal complex type

  • fluc_ct (boolean) – fluc_ct if true, use the FlucCT model

  • metal_ligand_cutoff – ligands are excluded outside the metal-ligand distance cutoff

  • metal_ff_typer_policy – determines how to cluster metal atoms

Return type:

std::vector< std::shared_ptr< schrodinger::energy::MetalSystem >,std::allocator< std::shared_ptr< schrodinger::energy::MetalSystem > > >

Returns:

a vector of MetalSystem pointers

getAomParameters(self, metal_type, ligand_type) AomParameter

Gets AomParameter based on the metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

Return type:

AomParameter

Returns:

AomParameter

getDOrbitalOccupancies(self, st, metal_index, metal_type) schrodinger::energy::Vector5i

Gets d orbital occupancies based on metal type and spin multiplicity

Parameters:
  • st (schrodinger::Structure) – Schrodinger Strucutre object

  • metal_index (int) – metal atom index

  • metal_type (int) – metal force field atom type

Return type:

schrodinger::energy::Vector5i

Returns:

d-orbital occupancies

getFlucCTLigandParameters(self, ligand_type) FlucCTParameter

Retrieves FlucCT parameters for a ligand type

Parameters:

ligand_type (int) –

Return type:

FlucCTParameter

Returns:

FlucCTParameter FlucCT parameters for the ligand FlucCT type

Raises:

runtime_error if FlucCT is not enabled

getFlucCTMetalParameters(self, metal_type) FlucCTParameter

Retrieves FlucCT parameters for a metal type

Parameters:

metal_type (int) –

Return type:

FlucCTParameter

Returns:

FlucCTParameter FlucCT parameters for the metal type

Raises:

runtime_error if FlucCT is not enabled

getFlucCTSigmoidParameters(self, metal_type) FlucCTSigmoid

Retrieves FlucCT sigmoid parameters for a metal type

Parameters:

metal_type (int) –

Return type:

FlucCTSigmoid

Returns:

FlucCTSigmoid FlucCT sigmoid parameters for the metal type

Raises:

runtime_error if FlucCT is not enabled

getLfmmParameters(self, metal_type, ligand_type) LfmmParameter

Gets LfmmParameter based on metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

Return type:

LfmmParameter

Returns:

LfmmParameter

getMorseParameters(self, metal_type, ligand_type) MorseParameter

Gets MorseParameter based on metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

Return type:

MorseParameter

Returns:

MorseParameter

getParameters(self, param_select, type_key) std::vector< float,std::allocator< float > >

Retrieves metal parameter using a vector. Particularly useful in Python.

Parameters:
  • param_select (int) – enum specifying the parameter to get

  • type_key (std::vector< int,std::allocator< int > >) – a vector of either 1 or 2 int types.

Return type:

std::vector< float,std::allocator< float > >

Returns:

vector of values from the parameter’s toArray() method

Raises:

runtime_error if type_key is wrong length for selected parameter type

getRestraint(self, metal_smarts, ligand_smarts) std::string

Gets a specific metal-ligand restraint

Parameters:
  • metal_smarts (string) – metal smarts pattern

  • ligand_smarts (string) – ligand smarts pattern

Raises:

std::runtime_error if either of the smarts patterns does not exist

Return type:

string

Returns:

metal-ligand restraint as a string

getSubsidiaryAtoms(self, ct, ligand_index) std::vector< unsigned int,std::allocator< unsigned int > >

Gets the subsidiary atoms (bonded atoms) of the primary ligand atom

Parameters:
  • ct (MM_Index) – structure handle

  • ligand_index (int) – ligand atom index

Return type:

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

Returns:

subsidiary atom indices

getTyper(self, st, monometal_complex_type, metal_ff_typer_policy={}) MetalForceFieldTyper

Obtains a typer object

Parameters:
  • st: – Schrodinger Structure object

  • monometal_complex_type (int) – monometal complex type

Return type:

MetalForceFieldTyper

Returns:

: typer object for metal forcefield

setAomParameters(self, metal_type, ligand_type, parameter)

Sets AomParameter based on the metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

  • parameter (AomParameter) – AOM parameters

setFlucCTLigandParameters(self, ligand_type, parameter)

Sets FlucCTParameter based on the ligand type

Parameters:
  • ligand_type (int) – ligand force field atom type

  • parameter (FlucCTParameter) – FlucCT parameters

Raises:

runtime_error if FlucCT is not enabled

setFlucCTMetalParameters(self, metal_type, parameter)

Sets FlucCTParameter based on the metal type

Parameters:
  • metal_type (int) – metal force field atom type

  • parameter (FlucCTParameter) – FlucCT parameters

Raises:

runtime_error if FlucCT is not enabled

setFlucCTSigmoidParameters(self, metal_type, parameter)

Sets FlucCT sigmoid parameters for a metal type

Parameters:
  • metal_type (int) – metal force field atom type

  • parameter (FlucCTSigmoid) – FlucCT sigmoid parameters

Raises:

runtime_error if FlucCT is not enabled

setLfmmParameters(self, metal_type, ligand_type, parameter)

Sets LfmmParameter based on metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

  • parameter (LfmmParameter) – set of Lfmm parameters

setMorseParameters(self, metal_type, ligand_type, parameter)

Sets MorseParameter based on metal-ligand type

Parameters:
  • metal_type (int) – metal force field atom type

  • ligand_type (int) – ligand force field atom type

  • parameter (MorseParameter) – Morse parameters

setParameters(self, param_select, type_key, param_values)

Set metal parameter as a vector. Particularly useful in Python.

Parameters:
  • param_select (int) – enum specifying the parameter to set

  • type_key (std::vector< int,std::allocator< int > >) – a vector of either 1 or 2 int types.

  • param_values (std::vector< float,std::allocator< float > >) – vector of float parameter values.

Raises:

runtime_error if type_key or param_values are wrong length for selected parameter type

toString(self) std::string

Converts parameters into a JSON-like string :rtype: string :return: JSON-like string

writeJson(self, file_path)

Writes parameters into a JSON file :type file_path: string :param file_path: :raises: std::runtime_error if writing fails

class schrodinger.energy.MetalForceFieldSpec

schrodinger::energy::MetalForceFieldSpec MetalForceFieldSpec describes metal-related identifiers (including atom index, atom type, and monometal complex type) that are used by MetalForceFieldTyper

__init__(*args, **kwargs)
metal_atom_type
metal_index
monometal_complex_type
class schrodinger.energy.MetalForceFieldTyper

schrodinger::energy::MetalForceFieldTyper MetalForceFieldTyper assigns types to metal systems

__init__(*args, **kwargs)
class schrodinger.energy.MetalForceFieldTyperPolicy

schrodinger::energy::MetalForceFieldTyperPolicy This policy class decides how to partition the metal atoms in a structure. The typing is geometry-dependent, i.e., metals are clustered within a cutoff distance

__init__(*args, **kwargs)
distance_cutoff
monometal_systems_only
class schrodinger.energy.MetalParameterType
LFMM = 0
AOM = 1
MORSE = 2
FLUC_CT_METAL = 3
FLUC_CT_METAL_SIGMOID = 4
FLUC_CT_LIGAND = 5
class schrodinger.energy.MetalSystem

schrodinger::energy::MetalSystem The MetalSystem class is an interface class. It provides public APIs to calculate physical quantities (energy, forces, d-orbital eigenvalues), as well as to get/set metal force field parameters.

MetalSystem handles two metal forcefield models: LFMM and FlucCT

__init__(*args, **kwargs)
evaluateFlucCT(self, coords, atom_count, onsite_esp_data, coul_propagator_data, forces) FlucCTOutput
evaluateFlucCT(self, fluc_ct_calculator, initial_guess, atom_count, onsite_esp_data, coul_propagator_data, forces) FlucCTOutput

Overload 1:

Calculates FlucCT energy and optionally applies forces

Parameters:
  • coords (float) – coordinates of atomic sites

  • atom_count (int) – number of atomic sites

  • onsite_esp_data (OnsiteEspData) – on-site ESP and ESP gradients

  • coul_propagator_data (CoulPropagatorData) – Coulomb propagators and adjacency list

  • [in/out] – forces force buffer

Return type:

FlucCTOutput

Returns:

FlucCT output


Overload 2:

Calculates FlucCT energy and optionally applies forces

Parameters:
  • fluc_ct_calculator (FlucCTCalculator) – manages FlucCT local calculations, tmp vars that are tied to metal and ligand coordinates

  • initial_guess (Eigen::MatrixXd) – inital guess for charge transfer values

  • atom_count (int) – number of atomic sites

  • onsite_esp_data (OnsiteEspData) – on-site ESP and ESP gradients

  • coul_propagator_data (CoulPropagatorData) – Coulomb propagators and adjacency list

  • [in/out] – forces force buffer

Return type:

FlucCTOutput

Returns:

FlucCT output

evaluateFlucCTLocal(self, coords, atom_count, onsite_esp_data, forces) std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Calculates FlucCT energy and optionally applies local forces

This API is designed for Desmond usage, where nonlocal forces are calculated separately with the particle-mesh Ewald method.

Parameters:
  • coords (float) – coordinates of atomic sites

  • atom_count (int) – number of atomic sites

  • onsite_esp_data (OnsiteEspData) – on-site ESP and ESP gradients

  • [in/out] – forces force buffer

Return type:

std::pair< schrodinger::energy::FlucCTOutput,schrodinger::energy::FlucCTIntermediateOutput >

Returns:

FlucCT output and intermediate output

evaluateLfmm(self, st) LfmmOutput
evaluateLfmm(self, coords) LfmmOutput

Overload 1:

Evaluates the LFMM model for the input structure

Parameters:

st (schrodinger::Structure) – structure

Return type:

LfmmOutput

Returns:

LFMM output


Overload 2:

Delegate method to evaluate the LFMM model for the input coordinates

Parameters:

coords (float) – coordinates of all sites

Return type:

LfmmOutput

Returns:

LFMM output

flucCTEnabled(self) bool

Checks if FlucCT is enabled :rtype: boolean :return: true if FlucCT is enabled

getLigandIndices(self, component, primary_only=False) std::vector< unsigned int,std::allocator< unsigned int > > const &

Gets ligand indices For the LIGAND_FIELD component, gets primary + subsidiary ligand atoms or primary ligand atoms only For the CHARGE_TRANSFER component, gets all relevant ligand atoms.

Parameters:
  • component (int) – flag to specify a subsystem of the metal system

  • primary_only (boolean, optional) –

    if true, returns primary ligand indices,

    otherwise, returns primary + subsidiary ligand

    indices. This flag only affects the LIGAND_FIELD component.

Return type:

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

Returns:

ligand indices as a vector

getLigandTypes(self, component) std::vector< schrodinger::energy::LigandType,std::allocator< schrodinger::energy::LigandType > > const &

Gets ligand types for one component of the metal system

Parameters:

component (int) – flag to specify a subsystem of the metal system

Return type:

std::vector< schrodinger::energy::LigandType,std::allocator< schrodinger::energy::LigandType > >

Returns:

ligand types as a vector

getMetalIndices(self) std::vector< unsigned int,std::allocator< unsigned int > >

Gets metal indices :rtype: std::vector< unsigned int,std::allocator< unsigned int > > :return: metal indices as a vector

getMetalTypes(self) std::vector< schrodinger::energy::MetalType,std::allocator< schrodinger::energy::MetalType > >

Gets metal types :rtype: std::vector< schrodinger::energy::MetalType,std::allocator< schrodinger::energy::MetalType > > :return: metal types as a vector

getParameters(self, component) std::vector< schrodinger::energy::ParamVector,std::allocator< schrodinger::energy::ParamVector > >

Gets parameters 1. For LIGAND_FIELD component, params[idx_complex][idx_ml_pair]

= list of metal-ligand-pair LFMM

parameters 2. For CHARGE_TRANSFER component, params[0][idx_m] = list of metal FlucCT parameters params[1][idx_l] = list of ligand FlucCT parameters

FFLD-2815: This design of parameter getter/setter is to facilitate the Python use case for parameter fitting, where numerical optimization is performed on the full set of parameters.

Ideally, we want to use a map (instead of a vector) to get/set parameters, such that we can

  1. update a subset of parameters (instead of all of them);

  2. enforce the invariance that the same type should have the same

parameters.

Parameters:

component (int) – flag to specify a subsystem of the metal system

Return type:

std::vector< schrodinger::energy::ParamVector,std::allocator< schrodinger::energy::ParamVector > >

Returns:

metal force field parameters

Raises:

runtime_error if component = CHARGE_TRANSFER but FlucCT is not enabled

getPrimarySubAtomMaps(self) std::vector< schrodinger::energy::PrimarySubAtomMap,std::allocator< schrodinger::energy::PrimarySubAtomMap > >

get a map of primary ligand indices to subsidiary ligand indices for each monometal complex

Return type:

std::vector< schrodinger::energy::PrimarySubAtomMap,std::allocator< schrodinger::energy::PrimarySubAtomMap > >

Returns:

a vector of each MonometalComplex PrimarySubAtomMap

getSigmoidParameters(self) schrodinger::energy::ParamVector

get metal specific sigmoid parameters

Raises:

runtime_error if FlucCT is not enabled

setParameters(self, params, component)

Sets parameters 1. For LIGAND_FIELD component, params[idx_complex][idx_ml_pair] = list of LFMM parameters 2. For CHARGE_TRANSFER component, params[0][idx_m] = list of metal FlucCT parameters params[1][idx_l] = list of ligand FlucCT parameters

Parameters:
  • metal – force field parameters

  • component (int) – flag to specify a subsystem of the metal system

Raises:

runtime_error if component = CHARGE_TRANSFER but FlucCT is not enabled

setSigmoidParameters(self, params)

Sets metal specific sigmoid parameters

Parameters:

metal – sigmoid parameters

Raises:

runtime_error if FlucCT is not enabled

class schrodinger.energy.MlffDeviceConfig

schrodinger::energy::MlffDeviceConfig A POD that specifies how/where the IterativeMlffModel should be executed

__init__(*args, **kwargs)
api_data
static deviceToStr(device) std::string
execution
precision
run_as_graph
schrodinger.energy.MlffDeviceConfig_deviceToStr(device) std::string
class schrodinger.energy.MlffDeviceType
Cpu = 0
Cuda = 1
class schrodinger.energy.MlffElectrostatics

schrodinger::energy::MlffElectrostatics The results of the electrostatics callback. This struct contains buffer that the callback must correctly fill in such that the overall energy/forces/virial of the total inference can be computed.

__init__(*args, **kwargs)
potentials
class schrodinger.energy.MlffEnergyUnit
Hartree = 0
KcalPerMol = 1
class schrodinger.energy.MlffFixedInteractionType
Electrostatics = 0
D3Dispersion = 1
Xtb = 2
class schrodinger.energy.MlffFixedInteractions

schrodinger::energy::MlffFixedInteractions This class serves two purposes:

  1. It provides a means to communicate to the user which fixed interactions given model uses. Specifically, once a given model is compiled, it can be queried for its fixed interaction types.

  2. (Advanced): In some cases, this class can be used to augment certain fixed interactions a given model uses. For example, a user can replace the model’s electrostatics implementation with their own (e.g. a Desmond-based impl).

__init__(*args, **kwargs)
disableD3Dispersion(self)

Disables the model’s D3 dispersion interaction :raises: std::runtime_error if the model does not supportsD3Dispersion

enableBaseEnergies(self)
getXtbParams(self) MlffXtbParams

Obtained the parameters used by the xTB contribution. :raises: std::runtime_error if the model does not hasXtbContribution()

hasElectrostatics(self) bool

Whether the model is designed with an explicit electrostatics interaction.

hasXtbContribution(self) bool

Whether the model is designed to have an xTB contribution (aka a delta learned model, e.g. Organic_MPNICE_TB).

setXtbParams(self, xtb_params)

Configure the parameters used by the xTB contribution (if the model hasXtbContribution()). Note that if this is not called, the model’s xTB contribution parameters will simply be set to the default values of MlffXtbParams. :raises: std::runtime_error if the model does not hasXtbContribution()

substituteElectrostatics(self, electrostatics)
supportsD3Dispersion(self) bool

Whether the model is designed with a D3 dispersion correction. Note that this method’s return is independent of whether D3 dispersion is actually enabled, it only indicates that the model was originally designed to have a D3 dispersion interaction. However, D3 dispersion will (typically) be enabled by default.

class schrodinger.energy.MlffInput

schrodinger::energy::MlffInput The set of tensors to be passed to an MlffModel as input features.

__init__(*args, **kwargs)
getNumParticles(self) int

Get the number of particles that this model is running predictions on.

printTensors(self)

Print the input data to the model for debugging purposes

rawPtrsView(self) schrodinger::energy::MlffInputDataPtrs &

Obtain access to the raw data pointers making up the model’s input features.

Using these ptrs can be dangerous and is thus typically ill-advised, however.

This method is Python-incompatible.

setAtomicCoordinate(self, particle_id, x, y, z)

Sets the coordinates of a particle. :type particle_id: int :param particle_id: The ID of the particle. :type x: float :param x: The x-coordinate. :type y: float :param y: The y-coordinate. :type z: float :param z: The z-coordinate. :raises: index out of range error

setCell(self, dim, x, y, z)

Sets the cell dimensions. Note that this feature can be optional for some models. If the model does not require cell dimensions, this method should just be ignored. :type dim: int :param dim: The dimension of the cell. :type x: float :param x: The x-dimension of the cell. :type y: float :param y: The y-dimension of the cell. :type z: float :param z: The z-dimension of the cell. :raises: index out of range error (for dim)

class schrodinger.energy.MlffLimitation
PbcIncompatible = 0
SpinUnaware = 1
Grpc = 2
class schrodinger.energy.MlffModel

schrodinger::energy::MlffModel A class that compiles and runs an MLFF model for simple single point calculations.

__init__(*args, **kwargs)
getFixedInteractions(self) MlffFixedInteractions

The collection of MlffFixedInteractions that this specific model’s algorithm relies upon.

getPostProcessSteps(self) MlffPostProcessSteps

Obtain access to the PostProcessSteps used by this class to determine how to process the forward model. Typically, this is only necessary to set once during construction, but in some applications these may need to be changed dynamically from system-to-system.

modelTypeName(self) std::string

Obtain the descriptive name of this model (e.g. Organic_MPNICE).

preCheckCompatibility(self, atomic_numbers, net_charge, net_spin, has_pbc)
preCheckCompatibility(self, st) None

Overload 1:

Check whether the given system is compatible with the MlffModel ahead of time.

Note that this validation step is done (by default) automatically when the runInference method is called, but there may be cases where it is useful to call this as a pre-processing step.

Parameters:
  • atomic_numbers (std::vector< int,std::allocator< int > >) – The atno of each particle (order doesn’t matter)

  • net_charge (int) – The formal net charge of the system

  • net_spin (int) – The net spin multiplicity of the system

  • has_pbc (boolean) – Whether this system is periodic

Raises:

std::runtime_error if the input features are not valid for this model. The runtime_error message will contain a description of the reasons the input is invalid.


Overload 2:

Same functionality as above preCheckCompatibility but parses features from the given structure for ease.

runInference(self, coordinates, atomic_numbers, net_charge, net_spin, pbc=0) std::unique_ptr< schrodinger::energy::MlffOutput >
runInference(self, st) std::unique_ptr< schrodinger::energy::MlffOutput >

Overload 1:

Calculate the energies and gradients using the given net charge, atomic coordinates and atomic numbers. :param coords: Atomic xyz coordinates for each particle in the system

(Angstrom)

Parameters:
  • atomic_numbers (std::vector< int,std::allocator< int > >) – Atomic number for each particle in the system

  • net_charge (int) – The formal net charge of the system

  • net_spin (int) – The net spin multiplicity of the system

  • pbc_ptr – The system’s periodic box vectors. This data will copied. nullptr indicates no periodic boundary conditions.

Return type:

std::unique_ptr< schrodinger::energy::MlffOutput >

Returns:

The model’s predictions about the energy/forces/etc of this system. Note that this MlffOutput may be semi-unfilled depending on the model’s PostProcessingSteps (e.g. whether force/virial/ calculations are enabled).


Overload 2:

Same functionality as above runInference but parses features from the given structure for ease.

setPostProcessSteps(self, new_steps)

Update the post processing steps that this model’s runInference will compute.

class schrodinger.energy.MlffModelType

schrodinger::energy::MlffModelType The type of model that an MlffModel object will compile.

__init__(*args, **kwargs)
getImplementationType(self) schrodinger::energy::MlffImplementationType

Obtain the method this model type is implemented with.

getModelDirectory(self) std::string

Obtain the directory where model’s files exist (e.g. “/path/to/models/Organic_MPNICE/”).

getModelTypeStr(self) std::string

Obtain this object’s string representation of its type (e.g. “Organic_MPNICE”)

static getOfficialModelTypes(exclusions={}) std::vector< std::string,std::allocator< std::string > >

Because Python swig wrapping compatibility issues, we need to be able to pass a vector of int instead of a vector of MlffLimitation enums. However, we should only pass in Python-based MlffLimitations here as well.

static getOfficialModelTypesFormal(exclusions={}) std::vector< std::string,std::allocator< std::string > >

Obtain a vector of all OfficialModelTypes in string form. This does not include models intended for internal testing purposes (e.g. OnlyEsModel). :type exclusions: std::vector< schrodinger::energy::MlffLimitation,std::allocator< schrodinger::energy::MlffLimitation > >, optional :param exclusions:: Exclude from the return all OfficialModelTypes that

suffer from any of the limitations in the given list. For example, {PbcIncompatible} will only return a list of model types that are Pbc compatible)

static lowerCaseStrToOfficialStr(official_model_type_str) std::string

Convert from a lower case string representing a model type to the official, case sensitive string (e.g. organic_mpnice_tb -> Organic_MPNICE_TB). :raises: std::runtime_error if the string does not match any official model

schrodinger.energy.MlffModelType_getOfficialModelTypes(exclusions={}) std::vector< std::string,std::allocator< std::string > >

Because Python swig wrapping compatibility issues, we need to be able to pass a vector of int instead of a vector of MlffLimitation enums. However, we should only pass in Python-based MlffLimitations here as well.

schrodinger.energy.MlffModelType_getOfficialModelTypesFormal(exclusions={}) std::vector< std::string,std::allocator< std::string > >

Obtain a vector of all OfficialModelTypes in string form. This does not include models intended for internal testing purposes (e.g. OnlyEsModel). :type exclusions: std::vector< schrodinger::energy::MlffLimitation,std::allocator< schrodinger::energy::MlffLimitation > >, optional :param exclusions:: Exclude from the return all OfficialModelTypes that

suffer from any of the limitations in the given list. For example, {PbcIncompatible} will only return a list of model types that are Pbc compatible)

schrodinger.energy.MlffModelType_lowerCaseStrToOfficialStr(official_model_type_str) std::string

Convert from a lower case string representing a model type to the official, case sensitive string (e.g. organic_mpnice_tb -> Organic_MPNICE_TB). :raises: std::runtime_error if the string does not match any official model

class schrodinger.energy.MlffOutput

schrodinger::energy::MlffOutput The set of output predictions that will be returned from the MlffModel model

__init__(*args, **kwargs)
getAtomicEnergy(self, particle_id) float

Get the predicted energy associated with a given particle

getCharge(self, particle_id) float
Return type:

float

Returns:

The predicted charge of the particle

Raises:

index out of range error

getForce(self, particle_id, dim) double

Gets the predicted force of a particle in a specific dimension. :type particle_id: int :param particle_id: The particle id :type dim: int :param dim: The dimension of the force (0->x, 1->y, 2->z). :rtype: float :return: The predicted force :raises: index out of range error :raises: std::runtime_error if the forces tensor is not defined

(if the model is not configured to compute forces in its PostProcessSteps).

getTotalEnergy(self) double

Gets the predicted energy.

getVirial(self) Eigen::Matrix3f

Get the predicted virial tensor :raises: std::runtime_error if the virial tensor is not defined

(if the model is not configured to compute virial in its PostProcessSteps).

printTensors(self)

Print the model’s output data for debugging purposes.

rawPtrsView(self) schrodinger::energy::MlffOutputDataPtrs const &

Obtain access to the raw data pointers making up the model’s output predictions.

Using these ptrs can be dangerous and is thus typically ill-advised, however.

This method is Python-incompatible.

class schrodinger.energy.MlffPostProcessSteps

schrodinger::energy::MlffPostProcessSteps

__init__(*args, **kwargs)
do_force
do_virial
energy_unit
hartreeScaling(self) float

Obtain the necessary scaling factor needed to convert from Hartree to this object’s desired energy_unit

class schrodinger.energy.MlffPrecision
Single = 0
Double = 1
class schrodinger.energy.MlffSystemPredictor

schrodinger::energy::MlffSystemPredictor An IterativeMlffModel configured to run predictions for a given system.

This class is aimed to act as a state machine, with the ability to iteratively 1) Update the input features for the model (e.g. input().setCoordinate(…) ), 2) Call inference on those input features with runInference() 3) Obtain the output predictions from that inference call (e.g.

output().getTotalEnergy()).

__init__(*args, **kwargs)
input(self) MlffInput

Obtain a reference to the input data for the model. This is meant to be used to update any input features that will be run by the next call to runInference().

output(self) MlffOutput

Obtain the output predictions of the model’s last call to runInference.

runInference(self)

Performs an core inference MlffModel inference call on the current state of this class’s MlffInput, and update the result of this class’s MlffOutput.

This performs both the core “forward” pass of the model (predicting energy), and any optional PostProcessingSteps that the model is configured to run (e.g. force prediction, unit conversion, etc).

Raises:

std::runtime_error if the torchscript model’s “forward” pass fails for any reason.

class schrodinger.energy.MlffXtbParams

schrodinger::energy::MlffXtbParams Specifies the xTB parameters to use with the MLFF model.

__init__(*args, **kwargs)
solvent
solvent_model
class schrodinger.energy.MonoMetalComplex

schrodinger::energy::MonoMetalComplex The MonoMetalComplex class is the base class for LfmmComplex and MorseComplex. It is an abstract class to describe monometal complexes (one metal atom, many ligands)

Ligands atoms are classfieid into primary and subsidiary ones. Primary ligands exchange charge with metals, while subsidary ligands determine the expression of the AOM energy term.

See, JCTC 16(11), 6926-6937 (2020)

__init__(*args, **kwargs)
getAllLigandIndices(self) std::vector< unsigned int,std::allocator< unsigned int > > const &
getMetalIndex(self) unsigned int
getMetalType(self) schrodinger::energy::MetalType
getMonoMetalComplexType(self) schrodinger::energy::MonoMetalComplexType

Gets the monometal complex type :rtype: int :return: monometal complex type

getOutput(self, xyz, compute_grad=DISABLE) MetalComplexOutput

Calculates metal forcefield energy, eigenvalues, and forces :type xyz: float :param xyz: spatial coordinates of a structure, used in mmffld and

desmond

Return type:

MetalComplexOutput

Returns:

energies, gradients, and d-orbital eigenvalues

getParameters(self) schrodinger::energy::ParamVector

Gets metal force field parameters :rtype: schrodinger::energy::ParamVector :return: parameters for all metal-ligand pairs

getPrimaryLigandIndices(self) std::vector< unsigned int,std::allocator< unsigned int > >
getPrimaryLigandTypes(self) std::vector< schrodinger::energy::LigandType,std::allocator< schrodinger::energy::LigandType > > const &
getPrimarySubAtomMap(self) schrodinger::energy::PrimarySubAtomMap

Gets PrimarySubAtomMap where Primary atom indices are keys to a vector of subsidiary atom indices :rtype: schrodinger::energy::PrimarySubAtomMap :return: PrimarySubAtomMap

m_ligand_indices
m_ligand_types
m_metal_index
m_metal_type
m_primary_ligand_mask
setParameters(self, params)

Sets metal force field parameters :type params: schrodinger::energy::ParamVector :param params: parameters for all metal-ligand pairs

class schrodinger.energy.MonoMetalComplexType
LFMM = 0
AOM = 1
MORSE = 2
DUMMY = 3
class schrodinger.energy.MorseComplex

schrodinger::energy::MorseComplex The MorseComplex class describes a monometal complex with the Morse potential See, JCTC 16(11), 6926-6937 (2020), Eqn. (2)

__init__(*args, **kwargs)
static create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates MorseComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

getOutput(self, xyz, compute_grad=DISABLE) MetalComplexOutput

Calculates Morse energy and gradients Note that d-orbital eigenvalues are not defined for MorseComplex

Parameters:
  • xyz: – atom coordinates of the entire structure

  • compute_grad: – option to compute gradients, default = false

Return type:

MetalComplexOutput

Returns:

MetalComplexOutput object comprised of energy, gradient, and eigenvalues

m_ligand_parameters
schrodinger.energy.MorseComplex_create(metal_ff_manager, st, metal_index, metal_type, metal_ligand_cutoff) std::shared_ptr< schrodinger::energy::MonoMetalComplex >

Creates MorseComplex objects and return the base class shared pointer :type metal_ff_manager: MetalForceFieldManager :param metal_ff_manager: metal force field manager object :type st: schrodinger::Structure :param st: Schrodinger Structure object :type metal_index: int :param metal_index: metal atom index :type metal_type: int :param metal_type: metal atom type :type metal_ligand_cutoff: float :param metal_ligand_cutoff: metal-ligand distance cutoff :rtype: MonoMetalComplex :return: base class pointer

class schrodinger.energy.MorseParamKeys

schrodinger::energy::MorseParamKeys

ALPHA = 'alpha'
KEYS = ('Well-depth', 'alpha', 'Req')
R_EQ = 'Req'
WELL_DEPTH = 'Well-depth'
__init__(*args, **kwargs)
class schrodinger.energy.MorseParameter

schrodinger::energy::MorseParameter struct to contain aom ligand parameters

__init__(*args, **kwargs)
m_morse_alpha
m_morse_d
m_morse_r0
toArray(self) std::array< float,3 >
class schrodinger.energy.OnsiteEspData

schrodinger::energy::OnsiteEspData Contains on-site ESP and ESP gradients

__init__(*args, **kwargs)
esp_gradients
esps
class schrodinger.energy.QRNNEnergyOutput

schrodinger::energy::QRNNEnergyOutput Output object with - energy Total energy of the system - standard_deviation Committee standard deviation for the total energy - atomic_energies Energy for each atom - gradient Energy gradient on each atom -

__init__(*args, **kwargs)
atomic_energies
energy
gradient
standard_deviation
class schrodinger.energy.QRNNModel
DIRECT_2022_1 = 1
DELTA_2022_1 = 2
DELTA_TRANSFER_2022_1 = 3
DIRECT_TRANSFER_2022_3 = 4
class schrodinger.energy.QRNNPredictor

schrodinger::energy::QRNNPredictor This class represents an QRNN model that can be used repeatedly to calculate the energies and gradients for the same chemical structure with different coordinates.

__init__(*args, **kwargs)
getEnergyOutput(self, st, verbosity=1) QRNNEnergyOutput
getEnergyOutput(self, coords, atomic_numbers, Qnet, pbc_ptr=None, verbosity=1) QRNNEnergyOutput

Overload 1:

Calculate the energies and gradients for the given structure. :type st: schrodinger::Structure :param st: Input structure :type verbosity: int, optional :param verbosity:, specifies the verbosity level of the xtb output.

Default is XTB_VERBOSITY_MINIMAL (1), which prints SCC output. Can also be set to XTB_VERBOSITY_MUTED (0) to suppress all output or XTB_VERBOSITY_ALL (2) to print all the output that would come from the xTB executable.


Overload 2:

Calculate the energies and gradients using the given net charge, atomic coordinates and atomic numbers. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects

:param Qnet:, the net charge on the structure :type pbc_ptr: schrodinger::PBC, optional :param pbc_ptr:, optional pointer to the PBC object :type verbosity: int, optional :param verbosity:, specifies the verbosity level of the xtb output.


Overload 3:

Calculate the energies and gradients using the given net charge, atomic coordinates and atomic numbers. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects

:param Qnet:, the net charge on the structure :type pbc_ptr: schrodinger::PBC, optional :param pbc_ptr:, optional pointer to the PBC object :param verbosity:, specifies the verbosity level of the xtb output.


Overload 4:

Calculate the energies and gradients using the given net charge, atomic coordinates and atomic numbers. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects

:param Qnet:, the net charge on the structure :param pbc_ptr:, optional pointer to the PBC object :param verbosity:, specifies the verbosity level of the xtb output.

getSupportedAtNums(self) std::set< int,std::less< int >,std::allocator< int > >

Return the atomic numbers of elements supported by the model

isCompatible(self, st) bool
isCompatible(self, atomic_numbers) bool

Overload 1:

Check the given structure to see if it is compatible with this QRNN model.


Overload 2:

Check the atomic numbers of a structure’s atoms to see if the structure is compatible with this QRNN model.

class schrodinger.energy.Solvent
NONE = 0
H2O = 1
ACETONITRILE = 2
ANILINE = 3
BENZENE = 4
CH2CL2 = 5
CHCL3 = 6
CS2 = 7
DMF = 8
DMSO = 9
DIETHYL_ETHER = 10
ETHANOL = 11
ETHYLACETATE = 12
HEXADECANE = 13
HEXANE = 14
NITROMETHANE = 15
OCTANOL = 16
TOLUENE = 17
THF = 18
class schrodinger.energy.SolventModel
GBSA = 1
ALPB = 0
COSMO = 2
class schrodinger.energy.VecMetalSystem

std::vector< std::shared_ptr< schrodinger::energy::MetalSystem > >

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

Return len(self).

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

schrodinger::energy::XTBEnergyOutput Output object with - energy Total energy of the system - gradient Energy gradient on each atom -

__init__(*args, **kwargs)
energy
gradient
schrodinger.energy.calc_fluc_ct_energy_force_with_calculators(metal_systems, calculators, guesses, coords, atom_count, onsite_esp_data_vec, coul_propagator_data_vec, forces) double

Calculates FlucCT energy and optionally applies forces for a list of metal systems using a list of FlucCTCalculators and initial guess rather than creating them on the fly. This is useful for IterativeFlucCTDrude, where FlucCTCalculators are created and are reused for each iteration.

Parameters:
  • metal_systems (VecMetalSystem) – metal systems

  • calculators (std::vector< schrodinger::energy::FlucCTCalculator,std::allocator< schrodinger::energy::FlucCTCalculator > >) – FlucCTCalculators

  • guesses (std::vector< Eigen::MatrixXd,std::allocator< Eigen::MatrixXd > >) – initial guess for charge transfer values

  • coords (float) – coordinates of atomic sites

  • atom_count (int) – number of atomic sites

  • onsite_esp_data_vec (std::vector< schrodinger::energy::OnsiteEspData,std::allocator< schrodinger::energy::OnsiteEspData > >) – collection of on-site ESP and ESP gradients for metal systems

  • coul_propagator_data_vec (std::vector< schrodinger::energy::CoulPropagatorData,std::allocator< schrodinger::energy::CoulPropagatorData > >) – collection of Coulomb propagators and adjacency lists for metal systems

  • forces (float) – [in/out] force buffer

Return type:

float

Returns:

FlucCT energy

schrodinger.energy.check_xtb_solvent(solvent: str) int | None

Get the enum representation of the supported solvent name. Any changes here should also be made to the corresponding function of the same name in jaguar-src/main/solvation.f

Parameters:

solvent – solvent name

Returns:

enum representation of the solvent name, None if invalid solvent

schrodinger.energy.create_fluc_ct_calculators_and_guesses(metal_systems, coords, atom_count) std::pair< std::vector< schrodinger::energy::FlucCTCalculator,std::allocator< schrodinger::energy::FlucCTCalculator > >,std::vector< Eigen::MatrixXd,std::allocator< Eigen::MatrixXd > > >

Creates fluctuation charge transfer (FlucCT) calculators and initial guesses. from metal_systems and coordinates.

Parameters:
  • metal_systems (VecMetalSystem) – A vector of metal systems

  • coords (float) – atomic coordinates of all atoms

  • atom_count (int) – number of atomic sites

Return type:

std::pair< std::vector< schrodinger::energy::FlucCTCalculator,std::allocator< schrodinger::energy::FlucCTCalculator > >,std::vector< Eigen::MatrixXd,std::allocator< Eigen::MatrixXd > > >

Returns:

FlucCTCalculators and initial guesses (zeros)

schrodinger.energy.create_iterative_mlff(model_type, device_config, post_process_steps=schrodinger::energy::MlffPostProcessSteps()) std::unique_ptr< schrodinger::energy::IterativeMlffModel >

Same design as above create_mlff function, expect that this generates an IterativeMlffModel - a model that is geared towards applications where it is necessary to run Mlff predictions repeatedly on the same system but with different coordinates/cell (e.g. for MD/optimization).

schrodinger.energy.create_mlff(model_type, device_config, post_process_steps=schrodinger::energy::MlffPostProcessSteps()) std::unique_ptr< schrodinger::energy::MlffModel >

A factory function to compile an MlffModel (geared toward single point calculations) based on the user’s needs.

Parameters:
  • model_type (MlffModelType) – Specification of which type of MlffModel to compile.

  • device_config (MlffDeviceConfig) – On which device(s) the given MlffModel should be able to run on.

  • post_process_steps (MlffPostProcessSteps, optional) – Any steps that should be taken after the model’s primary inference call (e.g. gradient computation, unit conversion, etc)

Raises:

std::runtime_error if the model type is not recognized, or the model cannot be properly compiled for any reason.

schrodinger.energy.determine_multiplicity(atomic_numbers, charge, multiplicity) int

Determine spin multiplicity given a set of atoms and total charge. If multiplicity is non-zero to start, will just check the validity

schrodinger.energy.getXTBEnergyOutput(coords, atomic_numbers, Qnet, solvent, solv_model=ALPB, multiplicity=0, verbosity=1) XTBEnergyOutput
schrodinger.energy.getXTBEnergyOutput(structure, solvent, solv_model=ALPB, verbosity=1) XTBEnergyOutput

Overload 1:

Calculate the energy and gradients using the given net charge, atomic coordinates and atomic numbers, and the solvent. :type coords: std::vector< Eigen::Vector3d,std::allocator< Eigen::Vector3d > > :param coords: Input atomic coordinates as a vector of Eigen::Vector3d

objects

Parameters:

atomic_numbers (std::vector< int,std::allocator< int > >) – Input atomic numbers as a vector of int objects

:param Qnet:, the net charge on the structure :type solvent: int :param solvent:, the specified solvent :type solv_model: int, optional :param solv_model:, the specified solvent model :type multiplicity: int, optional :param multiplicity:, the spin multiplicity of the structure. Value of 0

indicates that the multiplicity should be determined from the number of electrons, including charge.

:param verbosity:, specifies the verbosity level of the xtb output.

Default is XTB_VERBOSITY_MINIMAL (1), which prints SCC output. Can also be set to XTB_VERBOSITY_MUTED (0) to suppress all output or XTB_VERBOSITY_ALL (2) to print all the output that would come from the xTB executable.


Overload 2:

Calculate the energy and gradients for the given structure and the solvent.


Overload 3:

Calculate the energy and gradients for the given structure and the solvent.


Overload 4:

Calculate the energy and gradients for the given structure and the solvent.

schrodinger.energy.get_structure_charge(st) int

Determine charge from i_m_Molecular_charge property. If charge is not set, uses sum of formal charges. :type st: schrodinger::Structure :param st: input structure :rtype: int :return: total charge

schrodinger.energy.get_structure_multiplicity(st) int

Determine spin multiplicity from i_m_Spin_multiplicity property. If spin multiplicity is not set, sets to 0. Should always have its result eventually passed to determine_multiplicity, which will set the multiplicity if it is zero and validate it otherwise. :type st: schrodinger::Structure :param st: input structure :rtype: int :return: spin multiplicity

schrodinger.energy.is_torchff_lib_open() bool

Determine whether the torchff library is currently in a dlopened state.