RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
TorsionAngleM6.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2015 Sereina Riniker and other RDKit contributors
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_TORSIONANGLEM6_H
12
#define RD_TORSIONANGLEM6_H
13
14
#include <
ForceField/Contrib.h
>
15
#include <tuple>
16
#include <vector>
17
18
namespace
RDGeom
{
19
class
Point3D
;
20
}
21
22
namespace
ForceFields
{
23
class
ForceField
;
24
class
ForceFieldContrib
;
25
}
// namespace ForceFields
26
27
namespace
ForceFields
{
28
namespace
CrystalFF
{
29
30
//! the torsion term for multiplicity m = 1 - 6
31
class
RDKIT_FORCEFIELDHELPERS_EXPORT
TorsionAngleContribM6
32
:
public
ForceFields::ForceFieldContrib
{
33
public
:
34
TorsionAngleContribM6
() {}
35
//! Constructor
36
/*!
37
The torsion is between atom1 - atom2 - atom3 - atom4
38
(i.e the angle between bond atom1-atom2 and bond atom3-atom4
39
while looking down bond atom2-atom3)
40
41
\param owner pointer to the owning ForceField
42
\param idx1 index of atom1 in the ForceField's positions
43
\param idx2 index of atom2 in the ForceField's positions
44
\param idx3 index of atom3 in the ForceField's positions
45
\param idx4 index of atom4 in the ForceField's positions
46
\param V list of 6 force constants
47
\param signs list of 6 signs (+1 or -1)
48
*/
49
TorsionAngleContribM6
(
ForceFields::ForceField
*owner,
unsigned
int
idx1,
50
unsigned
int
idx2,
unsigned
int
idx3,
unsigned
int
idx4,
51
std::vector<double> V, std::vector<int> signs);
52
double
getEnergy
(
double
*pos)
const override
;
53
void
getGrad
(
double
*pos,
double
*grad)
const override
;
54
TorsionAngleContribM6
*
copy
()
const override
{
55
return
new
TorsionAngleContribM6
(*
this
);
56
}
57
58
private
:
59
int
d_at1Idx{-1}, d_at2Idx{-1}, d_at3Idx{-1}, d_at4Idx{-1};
60
std::vector<double> d_V;
61
std::vector<int> d_sign;
62
};
63
64
//! calculates and returns the torsional energy
65
RDKIT_FORCEFIELDHELPERS_EXPORT
double
calcTorsionEnergyM6
(
66
const
std::vector<double> &V,
const
std::vector<int> &signs,
67
const
double
cosPhi);
68
}
// namespace CrystalFF
69
}
// namespace ForceFields
70
#endif
Contrib.h
ForceFields::CrystalFF::TorsionAngleContribM6::getEnergy
double getEnergy(double *pos) const override
returns our contribution to the energy of a position
ForceFields::CrystalFF::TorsionAngleContribM6::getGrad
void getGrad(double *pos, double *grad) const override
calculates our contribution to the gradients of a position
ForceFields::CrystalFF::TorsionAngleContribM6::copy
TorsionAngleContribM6 * copy() const override
return a copy
Definition
TorsionAngleM6.h:54
ForceFields::CrystalFF::TorsionAngleContribM6::TorsionAngleContribM6
TorsionAngleContribM6()
Definition
TorsionAngleM6.h:34
ForceFields::CrystalFF::TorsionAngleContribM6::TorsionAngleContribM6
TorsionAngleContribM6(ForceFields::ForceField *owner, unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, std::vector< double > V, std::vector< int > signs)
Constructor.
ForceFields::ForceFieldContrib
abstract base class for contributions to ForceFields
Definition
Contrib.h:18
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition
ForceField.h:79
RDGeom::Point3D
Definition
point.h:53
export.h
RDKIT_FORCEFIELDHELPERS_EXPORT
#define RDKIT_FORCEFIELDHELPERS_EXPORT
Definition
export.h:261
ForceFields::CrystalFF
Definition
GaussianTorsionAngleContribs.h:28
ForceFields::CrystalFF::calcTorsionEnergyM6
RDKIT_FORCEFIELDHELPERS_EXPORT double calcTorsionEnergyM6(const std::vector< double > &V, const std::vector< int > &signs, const double cosPhi)
calculates and returns the torsional energy
ForceFields
Definition
GaussianTorsionAngleContribs.h:22
RDGeom
Definition
Embedder.h:30
GraphMol
ForceFieldHelpers
CrystalFF
TorsionAngleM6.h
Generated on
for RDKit by
1.17.0