RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
UFF/Nonbonded.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2004-2006 Rational Discovery LLC
3
//
4
// @@ All Rights Reserved @@
5
// This file is part of the RDKit.
6
// The contents are covered by the terms of the BSD license
7
// which is included in the file license.txt, found at the root
8
// of the RDKit source tree.
9
//
10
#include <
RDGeneral/export.h
>
11
#ifndef __RD_NONBONDED_H__
12
#define __RD_NONBONDED_H__
13
#include <
ForceField/Contrib.h
>
14
15
namespace
ForceFields
{
16
namespace
UFF
{
17
class
AtomicParams
;
18
19
//! the van der Waals term for the Universal Force Field
20
/*!
21
<b>The Distance Threshold</b>
22
For the sake of efficiency, each vdwContrib maintains a threshold
23
distance. When the distance between the two atoms exceeds this
24
threshold, the vdwContrib makes no contribution to either the
25
energy or the gradient.
26
27
The threshold is set to a multiple of the vdW distance's preferred
28
length. This multiplier can be supplied to the constructor.
29
30
*/
31
class
RDKIT_FORCEFIELD_EXPORT
vdWContrib
:
public
ForceFieldContrib
{
32
public
:
33
vdWContrib
() {}
34
35
//! Constructor
36
/*!
37
\param owner pointer to the owning ForceField
38
\param idx1 index of end1 in the ForceField's positions
39
\param idx2 index of end2 in the ForceField's positions
40
\param at1Params pointer to the parameters for end1
41
\param at2Params pointer to the parameters for end2
42
\param threshMultiplier (optional) multiplier for the threshold
43
calculation. See class documentation for details.
44
45
*/
46
vdWContrib
(
ForceField
*owner,
unsigned
int
idx1,
unsigned
int
idx2,
47
const
AtomicParams
*at1Params,
const
AtomicParams
*at2Params,
48
double
threshMultiplier = 10.0);
49
double
getEnergy
(
double
*pos)
const override
;
50
void
getGrad
(
double
*pos,
double
*grad)
const override
;
51
vdWContrib
*
copy
()
const override
{
return
new
vdWContrib
(*
this
); }
52
53
private
:
54
int
d_at1Idx{-1};
55
int
d_at2Idx{-1};
56
double
d_xij;
//!< the preferred length of the contact
57
double
d_wellDepth;
//!< the vdW well depth (strength of the interaction)
58
double
d_thresh;
//!< the distance threshold
59
};
60
namespace
Utils
{
61
//! calculates and returns the UFF minimum position for a vdW contact
62
/*!
63
64
\param at1Params pointer to the parameters for end1
65
\param at2Params pointer to the parameters for end2
66
67
\return the position of the minimum
68
69
*/
70
RDKIT_FORCEFIELD_EXPORT
double
calcNonbondedMinimum
(
71
const
AtomicParams
*at1Params,
const
AtomicParams
*at2Params);
72
73
//! calculates and returns the UFF well depth for a vdW contact
74
/*!
75
76
\param at1Params pointer to the parameters for end1
77
\param at2Params pointer to the parameters for end2
78
79
\return the depth of the well
80
81
*/
82
RDKIT_FORCEFIELD_EXPORT
double
calcNonbondedDepth
(
83
const
AtomicParams
*at1Params,
const
AtomicParams
*at2Params);
84
}
// namespace Utils
85
}
// namespace UFF
86
}
// namespace ForceFields
87
#endif
Contrib.h
ForceFields::ForceFieldContrib::ForceField
friend class ForceField
Definition
Contrib.h:20
ForceFields::ForceFieldContrib::ForceFieldContrib
ForceFieldContrib()
Definition
Contrib.h:22
ForceFields::UFF::AtomicParams
class to store atomic parameters for the Universal Force Field
Definition
UFF/Params.h:68
ForceFields::UFF::vdWContrib::vdWContrib
vdWContrib()
Definition
UFF/Nonbonded.h:33
ForceFields::UFF::vdWContrib::getEnergy
double getEnergy(double *pos) const override
returns our contribution to the energy of a position
ForceFields::UFF::vdWContrib::vdWContrib
vdWContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, const AtomicParams *at1Params, const AtomicParams *at2Params, double threshMultiplier=10.0)
Constructor.
ForceFields::UFF::vdWContrib::getGrad
void getGrad(double *pos, double *grad) const override
calculates our contribution to the gradients of a position
ForceFields::UFF::vdWContrib::copy
vdWContrib * copy() const override
return a copy
Definition
UFF/Nonbonded.h:51
export.h
RDKIT_FORCEFIELD_EXPORT
#define RDKIT_FORCEFIELD_EXPORT
Definition
export.h:251
ForceFields::UFF::Utils
Definition
UFF/AngleBend.h:68
ForceFields::UFF::Utils::calcNonbondedMinimum
RDKIT_FORCEFIELD_EXPORT double calcNonbondedMinimum(const AtomicParams *at1Params, const AtomicParams *at2Params)
calculates and returns the UFF minimum position for a vdW contact
ForceFields::UFF::Utils::calcNonbondedDepth
RDKIT_FORCEFIELD_EXPORT double calcNonbondedDepth(const AtomicParams *at1Params, const AtomicParams *at2Params)
calculates and returns the UFF well depth for a vdW contact
ForceFields::UFF
Definition
UFF/AtomTyper.h:19
ForceFields
Definition
GaussianTorsionAngleContribs.h:22
ForceField
UFF
Nonbonded.h
Generated on
for RDKit by
1.17.0