RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
UFF/BondStretch.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_BONDSTRETCH_H__
12
#define __RD_BONDSTRETCH_H__
13
#include <
ForceField/Contrib.h
>
14
15
namespace
ForceFields
{
16
namespace
UFF
{
17
class
AtomicParams
;
18
19
//! The bond-stretch term for the Universal Force Field
20
class
RDKIT_FORCEFIELD_EXPORT
BondStretchContrib
:
public
ForceFieldContrib
{
21
public
:
22
BondStretchContrib
() {}
23
//! Constructor
24
/*!
25
\param owner pointer to the owning ForceField
26
\param idx1 index of end1 in the ForceField's positions
27
\param idx2 index of end2 in the ForceField's positions
28
\param bondOrder order of the bond (as a double)
29
\param end1Params pointer to the parameters for end1
30
\param end2Params pointer to the parameters for end2
31
32
*/
33
BondStretchContrib
(
ForceField
*owner,
unsigned
int
idx1,
unsigned
int
idx2,
34
double
bondOrder,
const
AtomicParams
*end1Params,
35
const
AtomicParams
*end2Params);
36
37
double
getEnergy
(
double
*pos)
const override
;
38
39
void
getGrad
(
double
*pos,
double
*grad)
const override
;
40
41
BondStretchContrib
*
copy
()
const override
{
42
return
new
BondStretchContrib
(*
this
);
43
}
44
45
private
:
46
int
d_end1Idx{-1};
//!< indices of end points
47
int
d_end2Idx{-1};
//!< indices of end points
48
double
d_restLen;
//!< rest length of the bond
49
double
d_forceConstant;
//!< force constant of the bond
50
};
51
52
namespace
Utils
{
53
//! calculates and returns the UFF rest length for a bond
54
/*!
55
56
\param bondOrder the order of the bond (as a double)
57
\param end1Params pointer to the parameters for end1
58
\param end2Params pointer to the parameters for end2
59
60
\return the rest length
61
62
*/
63
RDKIT_FORCEFIELD_EXPORT
double
calcBondRestLength
(
64
double
bondOrder,
const
AtomicParams
*end1Params,
65
const
AtomicParams
*end2Params);
66
67
//! calculates and returns the UFF force constant for a bond
68
/*!
69
70
\param restLength the rest length of the bond
71
\param end1Params pointer to the parameters for end1
72
\param end2Params pointer to the parameters for end2
73
74
\return the force constant
75
76
*/
77
RDKIT_FORCEFIELD_EXPORT
double
calcBondForceConstant
(
78
double
restLength,
const
AtomicParams
*end1Params,
79
const
AtomicParams
*end2Params);
80
}
// namespace Utils
81
}
// namespace UFF
82
}
// namespace ForceFields
83
#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::BondStretchContrib::BondStretchContrib
BondStretchContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, double bondOrder, const AtomicParams *end1Params, const AtomicParams *end2Params)
Constructor.
ForceFields::UFF::BondStretchContrib::getGrad
void getGrad(double *pos, double *grad) const override
calculates our contribution to the gradients of a position
ForceFields::UFF::BondStretchContrib::copy
BondStretchContrib * copy() const override
return a copy
Definition
UFF/BondStretch.h:41
ForceFields::UFF::BondStretchContrib::BondStretchContrib
BondStretchContrib()
Definition
UFF/BondStretch.h:22
ForceFields::UFF::BondStretchContrib::getEnergy
double getEnergy(double *pos) const override
returns our contribution to the energy of a position
export.h
RDKIT_FORCEFIELD_EXPORT
#define RDKIT_FORCEFIELD_EXPORT
Definition
export.h:251
ForceFields::UFF::Utils
Definition
UFF/AngleBend.h:68
ForceFields::UFF::Utils::calcBondForceConstant
RDKIT_FORCEFIELD_EXPORT double calcBondForceConstant(double restLength, const AtomicParams *end1Params, const AtomicParams *end2Params)
calculates and returns the UFF force constant for a bond
ForceFields::UFF::Utils::calcBondRestLength
RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(double bondOrder, const AtomicParams *end1Params, const AtomicParams *end2Params)
calculates and returns the UFF rest length for a bond
ForceFields::UFF
Definition
UFF/AtomTyper.h:19
ForceFields
Definition
GaussianTorsionAngleContribs.h:22
ForceField
UFF
BondStretch.h
Generated on
for RDKit by
1.17.0