# OESzybki¶

class OESzybki


This class represents OESzybki.

## Constructors¶

OESzybki(unsigned int force_field=OEForceFieldType::MMFF94)
OESzybki(const OESzybkiOptions& opts)


First constructor builds the OESzybki object which will use MMFF force field. At the moment MMFF94 and MMFF94s are the only force fields implemented for intramolecular interactions. To use these for both intramolecular and intermolecular interactions, use OEForceFieldType.MMFF94 or OEForceFieldType.MMFF94S. While maintaining one of the above two forcefields for ligand intermolecular interactions, the amber ff99SB forcefield can be specified for protein-ligand interactions as an overall chimeric forcefield with: OEForceFieldType.MMFF_AMBER or OEForceFieldType.MMFFS_AMBER specifying anything other than the above choices will lead to the following error message: “Not a valid force field”. In the second constructor an instance of the OESzybkiOptions class is passed, so the OESzybki object is constructed with one or more predefined options. Newton-Raphson optimization requires the usage of the second constructor with a predefined optimizer type with a method OESzybkiOptOptions.SetOptimizerType. In all other cases the functionalities of OESzybki objects instantiated with both constructors are the same.

## operator()¶

OESystem::OEIterBase<OESz::OESzybkiResults> *operator()(OEChem::OEMCMolBase &m)
bool operator()(OEChem::OEMolBase &m, OESz::OESzybkiResults &res)


The first operator performs geometry optimization on all conformers in the passed molecule m and updates it with optimized coordinates. It returns an iterator whose elements are OESzybkiResults objects. OESzybkiResults contains the energy values of the relevant potential terms, total energies and gradients. The description of the OESzybkiResults structure is given below. The second operator performs the same task on a molecule in a single conformation. A reference to an instance of OESzybkiResults structure has to be passed. If the calculation fails the operator returns false.

## ClearFixAtoms¶

void ClearFixAtoms()


Removes the fix constraint on any fixed atoms. After the use of this function, positions of all atoms could change upon optimization.

## ClearHarmonicConstraints¶

bool ClearHarmonicConstraints()


Removes harmonic constraints. Returns true if constraints were removed and false when the action was not necessary because a constraining potential was not present.

## ClearTorsionConstraint¶

bool ClearTorsionConstraint()


Removes torsion constraint. Returns true if constraint is removed and false when the action was not necessary because a constraining potential was not present.

## FixAtoms¶

bool FixAtoms(std::string smarts_pattern)
bool FixAtoms(const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> &)


Fixes a set of atoms at their initial positions in space. The first function fixes a set of atoms which belong to a SMARTS pattern determined by the parameter smarts_pattern. It returns true if the SMARTS string passed is valid, false otherwise. The second function fixes only those atoms for which the predicate passed is true, and returns true if the predicate is valid.

## GetEntropy(const OEChem::OEMCMolBase&, unsigned int, unsigned int)¶

double GetEntropy(const OEChem::OEMCMolBase &m, unsigned int method=OEEntropyMethod::QNewton,
unsigned int env=OEEnvType::SolutionSPT)


Estimates and returns the entropy of a compound in different environments for an ensemble of conformations given in the input molecule m. The method does not alter the input set of conformations. The default parameter method specifies that the method of entropy evaluation is quasi-Newton. The alternative value for this parameter is OEEntropyMethod.Analytic. The last parameter in both methods specifies ligand environment. Its default value refers to the ligand in solution where solvation entropy is handled by scaled-particle theory (SPT). The remaining possible values of the parameter env are: OEEnvType.Gas, OEEnvType.Protein and OEEnvType.SolutionSA which specify gas-phase, protein-bound and solution ligand, respectively. In the case of OEEnvType.SolutionSA the solvation entropy is evaluated with the “Surface Area” model, however we recommend the default which uses SPT.

Deprecated since version 1.8.2: Use overloaded OESzybki.GetEntropy instead.

## GetEntropy¶

double GetEntropy(OEChem::OEMCMolBase& m, OESzybkiEnsembleResults& r,
unsigned int method = OEEntropyMethod::QNewton,
unsigned int env = OEEnvType::SolutionSPT)


Estimates and returns the entropy of a compound in different environments for an ensemble of conformations given in the input molecule m. The set of optimized unique conformations is returned in the first parameter m. The method takes the reference of the OESzybkiEnsembleResults object r which carries the entropy results for the ensemble. The default parameter method specifies that the method of vibrational entropy evaluation is based on second derivatives matrix (Hessian) which is taken from the final step of quasi-Newton optimization. The alternative value for this parameter is OEEntropyMethod.Analytic. When the latter is selected, Hessian matrix is calculated analytically. The last parameter specifies ligand environment. Its default value refers to the ligand in solution where solvation entropy is handled by scaled-particle theory (SPT). The remaining possible values of the parameter env are: OEEnvType.Gas, OEEnvType.Protein and OEEnvType.SolutionSA which specify gas-phase, protein-bound and solution ligand respectively. In the case of OEEnvType.SolutionSA the solvation entropy is evaluated with the “Surface Area” model, however we recommend the default which uses SPT.

## GetFixPattern¶

const char *GetFixPattern() const


Returns the SMARTS string used for fixing atoms.

## GetFixPredicate¶

const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *GetFixPredicate() const


Returns a pointer to the predicate used to determine which atoms are fixed.

## GetHarmonicConstraints¶

const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> *
GetHarmonicConstraints(double &kc, double &kd) const


Provides a method to query for the harmonic constraint used, the force constant kc, and distance kd. The function returns a pointer to a predicate which determines which atoms are constrained. If the returned pointer is 0, then no harmonic constraints are used.

## GetProtein¶

bool GetProtein(OEChem::OEMolBase &p) const


Copies the current protein molecule to the passed molecule object p. If the OESzybki object does not hold a protein molecule, the function will return false.

## GetSheffieldParameters¶

void GetSheffieldParameters(double &a, double &b, double &dc) const


Returns the Sheffield solvation model parameters which are currently used.

void LoadPotentialGrid(std::string fname)


Reads a pre-calculated potential grid from the file name fname. For a large number of ligands to be optimized inside a single protein with the use of the electrostatic model OEProteinElectrostatics.GridPB or OEProteinElectrostatics.GridCoulomb (see function OESzybkiProteinOptions.SetProteinElectrostaticModel), this function offers a significant saving in CPU time.

## SavePotentialGrid¶

void SavePotentialGrid(std::string fname)


Saves potential grid in the file named fname. The potential grid will be generated in protein-ligand calculations in which electrostatic model used is OEProteinElectrostatics.GridPB or OEProteinElectrostatics.GridCoulomb set with the function OESzybkiProteinOptions.SetProteinElectrostaticModel.

## SetHarmonicConstraints¶

bool SetHarmonicConstraints(double kc, double kd=0.0,
const OESystem::OEUnaryPredicate<OEChem::OEAtomBase> &pred=OEChem::OEIsHeavy())


Adds potential term $$V=k_c(r - k_d)^2$$ for every atom for which the passed predicate operator returns true. Default predicate imposes harmonic potential on every heavy atom. Parameter kc is the force constant $$k_c$$ (in $$kcal/(mol |A|^2)$$ and kd is the constraining distance $$k_d$$ in Å. By default kd is set to 0. Function returns true if harmonic potential added.

## SetProtein¶

bool SetProtein(const OEChem::OEMolBase& protein)


Sets the protein molecule for subsequent szybki calculations. The protein molecule may be modified by this operation, if needed. It returns false if the operation fails, otherwise true.

Note

To specify charging options for protein-ligand coulombic interactions, use the OESzybkiSolventOptions.SetChargeEngine method under the OESzybkiSolventOptions class. To work with the pre-existing charges, use the OEChargeEngineNoOp as the charging engine.

## SetSheffieldParameters¶

void SetSheffieldParameters(double a, double b, double dc=1.0)


Sheffield solvation energy requires two parameters $$a$$ and $$b$$: $$E_{solv} = -\frac{f_\epsilon}{8\pi \epsilon_0}\sum_{i,j}\frac{q_iq_j}{\sqrt{(aR_iR_j + br_{ij}^2)}}$$ where $$q_i$$ and $$q_j$$ are atomic charges, $$R_i$$ and $$R_j$$ are vdW radii for atoms $$i$$ and $$j$$, and $$r_{ij}$$ is the interatomic distance. Parameter $$f_\epsilon$$ depends on dielectric constants of the solute ($$\epsilon$$) and the solvent ($$\epsilon_{solv}$$): $$f_\epsilon = 1/\epsilon - 1/\epsilon_{solv})$$. This function sets both parameters $$a$$ and $$b$$ to the required values, as well as the solute dielectric constant (which may not exceed 10). If the function not used, the solute dielectric constant is set to 1.0, and the default values of $$a = 1.553149$$ and $$b = 0.735694$$ are adopted ([Grant-2007]).

## SetTorsionConstraint¶

bool SetTorsionConstraint(std::string tor_pattern, double k, double phi0)
bool SetTorsionConstraint(const OEChem::OETorsion& tor, double k)


The method adds a potential term $$V=k_c(cos(phi) - cos(phi0))^2$$ for a torsion. The first method specifies the torsion with a SMARTS pattern passed as a string tor pattern. This must be in the indexed form which show which atoms forms the torsion. For example a valid pattern is [C:1][N:2][c:3][s:4]. k is the user specified force field in kcal/mol, and phi0 is the torsion reference dihedral angle in radians. The function returns true if a torsion constraint is added successfully.

The second method takes an instance of an OETorsion object, tor, which defines a single torsion to be constrained. k is the user specified force field in kcal/mol. The function returns true if a constrained torsion is added successfully.

## UnsetProtein¶

void UnsetProtein() const


Removes protein context from the OESzybki object.