UFF/Params.h
Go to the documentation of this file.
//
// Copyright (C) 2004-2006 Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef __RD_UFFPARAMS_H__
#define __RD_UFFPARAMS_H__
#include <string>
#include <cmath>
#include <map>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
namespace ForceFields {
namespace UFF {
const double DEG2RAD = M_PI / 180.0;
const double RAD2DEG = 180.0 / M_PI;
inline bool isDoubleZero(const double x) {
return ((x < 1.0e-10) && (x > -1.0e-10));
}
inline void clipToOne(double &x) {
if (x > 1.0) {
x = 1.0;
} else if (x < -1.0) {
x = -1.0;
}
}
//! class to store UFF parameters for bond stretching
class UFFBond {
public:
double kb;
double r0;
};
//! class to store UFF parameters for angle bending
class UFFAngle {
public:
double ka;
double theta0;
};
//! class to store UFF parameters for torsions
class UFFTor {
public:
double V;
};
//! class to store UFF parameters for inversions
class UFFInv {
public:
double K;
};
//! class to store UFF parameters for van der Waals interactions
class UFFVdW {
public:
double x_ij;
double D_ij;
};
//! class to store atomic parameters for the Universal Force Field
class AtomicParams {
public:
double r1; //!< valence bond radius
double theta0; //!< valence angle
double x1; //!< vdW characteristic length
double D1; //!< vdW atomic energy
double zeta; //!< vdW scaling term
double Z1; //!< effective charge
double V1; //!< sp3 torsional barrier parameter
double U1; //!< torsional contribution for sp2-sp3 bonds
double GMP_Xi; //!< GMP Electronegativity;
double GMP_Hardness; //!< GMP Hardness
double GMP_Radius; //!< GMP Radius value
};
namespace Params {
const double lambda = 0.1332; //!< scaling factor for rBO correction
const double G = 332.06; //!< bond force constant prefactor
const double amideBondOrder =
1.41; //!< special case bond order for amide C-N bonds.
};
//! singleton class for retrieving UFF AtomParams
/*!
Use the singleton like this:
\verbatim
ParamCollection *params=ParamCollection::getParams();
const AtomParams *ap=params("C_3");
\endverbatim
If you have your own parameter data, it can be supplied as a string:
\verbatim
ParamCollection *params=ParamCollection::getParams(myParamData);
const AtomParams *ap=params("C_3");
\endverbatim
You are responsible for making sure that the data is in the correct
format (see Params.cpp for an example).
*/
class ParamCollection {
public:
//! gets a pointer to the singleton ParamCollection
/*!
\param paramData (optional) a string with parameter data. See
below for more information about this argument
\return a pointer to the singleton ParamCollection
<b>Notes:</b>
- do <b>not</b> delete the pointer returned here
- if the singleton ParamCollection has already been instantiated and
\c paramData is empty, the singleton will be returned.
- if \c paramData is empty and the singleton ParamCollection has
not yet been instantiated, the default UFF parameters (from Params.cpp)
will be used.
- if \c paramData is supplied, a new singleton will be instantiated.
The current instantiation (if there is one) will be deleted.
*/
static ParamCollection *getParams(const std::string &paramData = "");
//! Looks up the parameters for a particular UFF key and returns them.
/*!
\return a pointer to the AtomicParams object, NULL on failure.
*/
const AtomicParams *operator()(const std::string &symbol) const {
std::map<std::string, AtomicParams>::const_iterator res;
res = d_params.find(symbol);
if (res != d_params.end()) {
return &((*res).second);
}
return 0;
}
private:
//! to force this to be a singleton, the constructor must be private
ParamCollection(std::string paramData);
static class ParamCollection *ds_instance; //!< the singleton
std::map<std::string, AtomicParams> d_params; //!< the parameter map
};
}
}
#endif
ForceFields::UFF::AtomicParams
class to store atomic parameters for the Universal Force Field
Definition: UFF/Params.h:71
ForceFields::UFF::UFFVdW::D_ij
double D_ij
Definition: UFF/Params.h:67
ForceFields::UFF::AtomicParams::theta0
double theta0
valence angle
Definition: UFF/Params.h:74
ForceFields::UFF::DEG2RAD
const double DEG2RAD
Definition: UFF/Params.h:24
ForceFields::UFF::Params::G
const double G
bond force constant prefactor
Definition: UFF/Params.h:88
ForceFields::UFF::AtomicParams::r1
double r1
valence bond radius
Definition: UFF/Params.h:73
ForceFields::UFF::Params::amideBondOrder
const double amideBondOrder
special case bond order for amide C-N bonds.
Definition: UFF/Params.h:89
ForceFields::UFF::Params::lambda
const double lambda
scaling factor for rBO correction
Definition: UFF/Params.h:87
ForceFields::UFF::isDoubleZero
bool isDoubleZero(const double x)
Definition: UFF/Params.h:26
ForceFields::UFF::RAD2DEG
const double RAD2DEG
Definition: UFF/Params.h:25
ForceFields::UFF::AtomicParams::U1
double U1
torsional contribution for sp2-sp3 bonds
Definition: UFF/Params.h:80
M_PI
#define M_PI
Definition: UFF/Params.h:18
ForceFields::UFF::UFFInv::K
double K
Definition: UFF/Params.h:60
RDKit::paramData
std::string paramData
ForceFields::UFF::ParamCollection
singleton class for retrieving UFF AtomParams
Definition: UFF/Params.h:111
ForceFields
Definition: TorsionAngleM6.h:23
ForceFields::UFF::UFFAngle::ka
double ka
Definition: UFF/Params.h:47
ForceFields::UFF::AtomicParams::V1
double V1
sp3 torsional barrier parameter
Definition: UFF/Params.h:79
ForceFields::UFF::UFFVdW
class to store UFF parameters for van der Waals interactions
Definition: UFF/Params.h:64
ForceFields::UFF::AtomicParams::GMP_Xi
double GMP_Xi
GMP Electronegativity;.
Definition: UFF/Params.h:81
ForceFields::UFF::ParamCollection::operator()
const AtomicParams * operator()(const std::string &symbol) const
Looks up the parameters for a particular UFF key and returns them.
Definition: UFF/Params.h:135
ForceFields::UFF::UFFBond
class to store UFF parameters for bond stretching
Definition: UFF/Params.h:38
ForceFields::UFF::UFFAngle
class to store UFF parameters for angle bending
Definition: UFF/Params.h:45
ForceFields::UFF::UFFInv
class to store UFF parameters for inversions
Definition: UFF/Params.h:58
ForceFields::UFF::UFFAngle::theta0
double theta0
Definition: UFF/Params.h:48
ForceFields::UFF::AtomicParams::x1
double x1
vdW characteristic length
Definition: UFF/Params.h:75
ForceFields::UFF::UFFVdW::x_ij
double x_ij
Definition: UFF/Params.h:66
ForceFields::UFF::AtomicParams::GMP_Hardness
double GMP_Hardness
GMP Hardness.
Definition: UFF/Params.h:82
ForceFields::UFF::UFFBond::r0
double r0
Definition: UFF/Params.h:41
ForceFields::UFF::AtomicParams::Z1
double Z1
effective charge
Definition: UFF/Params.h:78
ForceFields::UFF::UFFTor
class to store UFF parameters for torsions
Definition: UFF/Params.h:52
ForceFields::UFF::UFFTor::V
double V
Definition: UFF/Params.h:54
ForceFields::UFF::UFFBond::kb
double kb
Definition: UFF/Params.h:40
ForceFields::UFF::AtomicParams::GMP_Radius
double GMP_Radius
GMP Radius value.
Definition: UFF/Params.h:83
ForceFields::UFF::AtomicParams::D1
double D1
vdW atomic energy
Definition: UFF/Params.h:76
ForceFields::UFF::clipToOne
void clipToOne(double &x)
Definition: UFF/Params.h:29
ForceFields::UFF::AtomicParams::zeta
double zeta
vdW scaling term
Definition: UFF/Params.h:77