RDKit
Open-source cheminformatics and machine learning.
MMFF/PositionConstraint.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2013 Paolo Tosco
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_MMFFPOSITIONCONSTRAINT_H__
14
#define __RD_MMFFPOSITIONCONSTRAINT_H__
15
#include <iostream>
16
#include <
ForceField/Contrib.h
>
17
#include <
Geometry/point.h
>
18
19
namespace
ForceFields
{
20
namespace
MMFF {
21
22
//! A position constraint of the type 0.5k * deltaX^2
23
class
RDKIT_FORCEFIELD_EXPORT
PositionConstraintContrib
24
:
public
ForceFieldContrib
{
25
public
:
26
PositionConstraintContrib
() : d_atIdx(-1){};
27
//! Constructor
28
/*!
29
\param owner pointer to the owning ForceField
30
\param idx index of the atom in the ForceField's positions
31
\param minDispl minimum displacement
32
\param maxDispl maximum displacement
33
\param forceConst force constant
34
35
*/
36
PositionConstraintContrib
(
ForceField
*owner,
unsigned
int
idx,
37
double
maxDispl,
double
forceConst);
38
39
~PositionConstraintContrib
() {}
40
double
getEnergy(
double
*pos)
const
;
41
42
void
getGrad(
double
*pos,
double
*grad)
const
;
43
virtual
PositionConstraintContrib
*
copy
()
const
{
44
return
new
PositionConstraintContrib
(*
this
);
45
};
46
47
private
:
48
int
d_atIdx;
//!< index of the restrained atom
49
double
d_maxDispl;
//!< maximum allowed displacement
50
RDGeom::Point3D
d_pos0;
//!< reference position
51
double
d_forceConstant;
//!< force constant of the bond
52
};
53
}
// namespace MMFF
54
}
// namespace ForceFields
55
#endif
point.h
RDGeom::Point3D
Definition:
point.h:46
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition:
ForceField.h:79
ForceFields::MMFF::PositionConstraintContrib::PositionConstraintContrib
PositionConstraintContrib()
Definition:
MMFF/PositionConstraint.h:26
ForceFields::MMFF::PositionConstraintContrib
A position constraint of the type 0.5k * deltaX^2.
Definition:
MMFF/PositionConstraint.h:23
ForceFields::ForceFieldContrib
abstract base class for contributions to ForceFields
Definition:
Contrib.h:18
RDKIT_FORCEFIELD_EXPORT
#define RDKIT_FORCEFIELD_EXPORT
Definition:
export.h:255
ForceFields::MMFF::PositionConstraintContrib::~PositionConstraintContrib
~PositionConstraintContrib()
Definition:
MMFF/PositionConstraint.h:39
ForceFields
Definition:
TorsionAngleM6.h:24
Contrib.h
ForceFields::MMFF::PositionConstraintContrib::copy
virtual PositionConstraintContrib * copy() const
return a copy
Definition:
MMFF/PositionConstraint.h:43
export.h
ForceField
MMFF
PositionConstraint.h
Generated on Fri Jun 12 2020 19:04:45 for RDKit by
1.8.17