RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
ForceFields::CrystalFF Namespace Reference

Namespaces

namespace  ETKDGForceConsts

Classes

struct  GaussianTorsionAngleContribsParams
class  GaussianTorsionAngleContribs
struct  PlanarityContribsParams
class  PlanarityContribs
 A term to capture all Inversion Contributionss. More...
struct  TorsionAngleContribsParams
class  TorsionAngleContribs
class  TorsionAngleContribM6
 the torsion term for multiplicity m = 1 - 6 More...
struct  ExpTorsionAngle
 A structure used to the experimental torsion patterns. More...
struct  GaussianExpTorsionAngle
struct  CrystalFFDetails

Concepts

concept  TorsionAngleType

Typedefs

using CosineExp_T = std::pair<std::vector<int>, std::vector<double>>
using GaussianExp_T
using TorsionLookup = std::vector<std::vector<double>>
using TorsionParamVariant = std::variant<CosineExp_T, GaussianExp_T>
using TorsionAnglePtrVariant

Enumerations

enum class  TorsionParamKind { Cosine , Gaussian }

Functions

RDKIT_FORCEFIELDHELPERS_EXPORT double getEnergy (const std::vector< double > &heights, const std::vector< double > &positions, const std::vector< double > &widths, const double phi)
RDKIT_FORCEFIELDHELPERS_EXPORT double getdEdPhi (const std::vector< double > &heights, const std::vector< double > &positions, const std::vector< double > &widths, const double phi)
RDKIT_FORCEFIELDHELPERS_EXPORT double calcTorsionEnergy (const std::vector< double > &forceConstants, const std::vector< int > &signs, const double cosPhi)
RDKIT_FORCEFIELDHELPERS_EXPORT double calcTorsionEnergyM6 (const std::vector< double > &V, const std::vector< int > &signs, const double cosPhi)
 calculates and returns the torsional energy
RDKIT_FORCEFIELDHELPERS_EXPORT void getExperimentalTorsions (const RDKit::ROMol &mol, CrystalFFDetails &details, bool useExpTorsions=false, bool useSmallRingTorsions=false, bool useMacrocycleTorsions=false, bool useBasicKnowledge=false, unsigned int version=2, bool verbose=false)
 Get the experimental torsional angles in a molecule.
RDKIT_FORCEFIELDHELPERS_EXPORT void getExperimentalTorsions (const RDKit::ROMol &mol, CrystalFFDetails &details, std::vector< std::tuple< unsigned int, std::vector< unsigned int >, TorsionAnglePtrVariant > > &torsionBonds, bool useExpTorsions=false, bool useSmallRingTorsions=false, bool useMacrocycleTorsions=false, bool useBasicKnowledge=false, unsigned int version=2, bool verbose=false)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
RDKIT_FORCEFIELDHELPERS_EXPORT void populateRefTable (CrystalFFDetails &details)

Variables

constexpr std::size_t lookup_grid_size = 180

Typedef Documentation

◆ CosineExp_T

using ForceFields::CrystalFF::CosineExp_T = std::pair<std::vector<int>, std::vector<double>>

Definition at line 83 of file TorsionPreferences.h.

◆ GaussianExp_T

Initial value:
std::tuple<std::vector<double>, std::vector<double>,
std::vector<double>, double>

Definition at line 84 of file TorsionPreferences.h.

◆ TorsionAnglePtrVariant

Initial value:
std::variant<const ExpTorsionAngle *, const GaussianExpTorsionAngle *>

Points at the SMARTS-pattern entry (of whichever functional form was used) that produced a torsion match

Definition at line 105 of file TorsionPreferences.h.

◆ TorsionLookup

using ForceFields::CrystalFF::TorsionLookup = std::vector<std::vector<double>>

Definition at line 87 of file TorsionPreferences.h.

◆ TorsionParamVariant

Holds either the cosine-series (ETKDGv1/v2) or the Gaussian-fit (ETKDGv4) parameters for a single torsion term

Definition at line 101 of file TorsionPreferences.h.

Enumeration Type Documentation

◆ TorsionParamKind

Which functional form the parameters stored in a CrystalFFDetails instance use

Enumerator
Cosine 
Gaussian 

Definition at line 94 of file TorsionPreferences.h.

Function Documentation

◆ calcTorsionEnergy()

RDKIT_FORCEFIELDHELPERS_EXPORT double ForceFields::CrystalFF::calcTorsionEnergy ( const std::vector< double > & forceConstants,
const std::vector< int > & signs,
const double cosPhi )

Calculate the torsion energy as described in 10.1021/acs.jcim.5b00654, this can be used with any i > 0.

Parameters
forceConstantsForce constants for the different cosine fits
signsPhases of the cosine fits
cosPhicosine of the torsion angle phi

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ calcTorsionEnergyM6()

RDKIT_FORCEFIELDHELPERS_EXPORT double ForceFields::CrystalFF::calcTorsionEnergyM6 ( const std::vector< double > & V,
const std::vector< int > & signs,
const double cosPhi )

calculates and returns the torsional energy

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ getdEdPhi()

RDKIT_FORCEFIELDHELPERS_EXPORT double ForceFields::CrystalFF::getdEdPhi ( const std::vector< double > & heights,
const std::vector< double > & positions,
const std::vector< double > & widths,
const double phi )

Calculate the torsion gradient as described in 10.1021/acs.jcim.5b00654, this can be used with any any number of heights, positions and widths. The caller is responsible that the size of the three parameter objects are the same and non zero. widths need to be strictly positive.

Parameters
heightsheights of the gaussians
positionspositions of the gaussians
widthswidths of the gaussians
phithe torsion angle in radians

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ getEnergy()

RDKIT_FORCEFIELDHELPERS_EXPORT double ForceFields::CrystalFF::getEnergy ( const std::vector< double > & heights,
const std::vector< double > & positions,
const std::vector< double > & widths,
const double phi )

Calculate the torsion energy as described in 10.1021/acs.jcim.5b00654, this can be used with any any number of heights, positions and widths. The caller is responsible that the size of the three parameter objects are the same and non zero. widths need to be strictly positive.

Parameters
heightsheights of the gaussians
positionspositions of the gaussians
widthswidths of the gaussians
phithe torsion angle in radians

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ getExperimentalTorsions() [1/2]

RDKIT_FORCEFIELDHELPERS_EXPORT void ForceFields::CrystalFF::getExperimentalTorsions ( const RDKit::ROMol & mol,
CrystalFFDetails & details,
bool useExpTorsions = false,
bool useSmallRingTorsions = false,
bool useMacrocycleTorsions = false,
bool useBasicKnowledge = false,
unsigned int version = 2,
bool verbose = false )

Get the experimental torsional angles in a molecule.

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ getExperimentalTorsions() [2/2]

RDKIT_FORCEFIELDHELPERS_EXPORT void ForceFields::CrystalFF::getExperimentalTorsions ( const RDKit::ROMol & mol,
CrystalFFDetails & details,
std::vector< std::tuple< unsigned int, std::vector< unsigned int >, TorsionAnglePtrVariant > > & torsionBonds,
bool useExpTorsions = false,
bool useSmallRingTorsions = false,
bool useMacrocycleTorsions = false,
bool useBasicKnowledge = false,
unsigned int version = 2,
bool verbose = false )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References RDKIT_FORCEFIELDHELPERS_EXPORT.

◆ populateRefTable()

RDKIT_FORCEFIELDHELPERS_EXPORT void ForceFields::CrystalFF::populateRefTable ( CrystalFFDetails & details)

Populate the lookuptable for the minimizations The size of the lookup table is defined in GaussianTorsionAngleContribs.h!

References RDKIT_FORCEFIELDHELPERS_EXPORT.

Variable Documentation

◆ lookup_grid_size

std::size_t ForceFields::CrystalFF::lookup_grid_size = 180
constexpr

Size of the energies and gradients lookup table This is used in torsionPreferences.cpp.

Definition at line 32 of file GaussianTorsionAngleContribs.h.