RDKit
Open-source cheminformatics and machine learning.
TorsionAngleM6.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2015 Sereina Riniker
3
//
4
// Copyright (C) 2004-2006 Rational Discovery LLC
5
//
6
// @@ All Rights Reserved @@
7
// This file is part of the RDKit.
8
// The contents are covered by the terms of the BSD license
9
// which is included in the file license.txt, found at the root
10
// of the RDKit source tree.
11
//
12
#include <
RDGeneral/export.h
>
13
#ifndef RD_TORSIONANGLEM6_H
14
#define RD_TORSIONANGLEM6_H
15
16
#include <
ForceField/Contrib.h
>
17
#include <boost/tuple/tuple.hpp>
18
#include <vector>
19
20
namespace
RDGeom
{
21
class
Point3D
;
22
}
23
24
namespace
ForceFields
{
25
class
ForceField
;
26
class
ForceFieldContrib
;
27
}
// namespace ForceFields
28
29
namespace
ForceFields
{
30
namespace
CrystalFF {
31
32
//! the torsion term for multiplicity m = 1 - 6
33
class
RDKIT_FORCEFIELDHELPERS_EXPORT
TorsionAngleContribM6
34
:
public
ForceFields::ForceFieldContrib
{
35
public
:
36
TorsionAngleContribM6
()
37
: d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1), d_at4Idx(-1){};
38
//! Constructor
39
/*!
40
The torsion is between atom1 - atom2 - atom3 - atom4
41
(i.e the angle between bond atom1-atom2 and bond atom3-atom4
42
while looking down bond atom2-atom3)
43
44
\param owner pointer to the owning ForceField
45
\param idx1 index of atom1 in the ForceField's positions
46
\param idx2 index of atom2 in the ForceField's positions
47
\param idx3 index of atom3 in the ForceField's positions
48
\param idx4 index of atom4 in the ForceField's positions
49
\param V list of 6 force constants
50
\param signs list of 6 signs (+1 or -1)
51
*/
52
TorsionAngleContribM6
(
ForceFields::ForceField
*owner,
unsigned
int
idx1,
53
unsigned
int
idx2,
unsigned
int
idx3,
unsigned
int
idx4,
54
std::vector<double> V, std::vector<int> signs);
55
double
getEnergy(
double
*pos)
const
;
56
void
getGrad(
double
*pos,
double
*grad)
const
;
57
virtual
TorsionAngleContribM6
*
copy
()
const
{
58
return
new
TorsionAngleContribM6
(*
this
);
59
};
60
61
private
:
62
int
d_at1Idx, d_at2Idx, d_at3Idx, d_at4Idx;
63
std::vector<double> d_V;
64
std::vector<int> d_sign;
65
};
66
67
//! calculates and returns the torsional energy
68
RDKIT_FORCEFIELDHELPERS_EXPORT
double
calcTorsionEnergyM6
(
69
const
std::vector<double> &V,
const
std::vector<int> &signs,
70
const
double
cosPhi);
71
}
// namespace CrystalFF
72
}
// namespace ForceFields
73
#endif
ForceFields::CrystalFF::TorsionAngleContribM6::copy
virtual TorsionAngleContribM6 * copy() const
return a copy
Definition:
TorsionAngleM6.h:57
ForceFields::CrystalFF::TorsionAngleContribM6
the torsion term for multiplicity m = 1 - 6
Definition:
TorsionAngleM6.h:33
RDGeom
Definition:
TorsionAngleM6.h:20
RDGeom::Point3D
Definition:
point.h:46
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition:
ForceField.h:79
ForceFields::ForceFieldContrib
abstract base class for contributions to ForceFields
Definition:
Contrib.h:18
ForceFields
Definition:
TorsionAngleM6.h:24
Contrib.h
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::CrystalFF::TorsionAngleContribM6::TorsionAngleContribM6
TorsionAngleContribM6()
Definition:
TorsionAngleM6.h:36
RDKIT_FORCEFIELDHELPERS_EXPORT
#define RDKIT_FORCEFIELDHELPERS_EXPORT
Definition:
export.h:268
export.h
GraphMol
ForceFieldHelpers
CrystalFF
TorsionAngleM6.h
Generated on Fri Jun 12 2020 19:04:45 for RDKit by
1.8.17