RDKit
Open-source cheminformatics and machine learning.
DistViolationContrib.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_DISTVIOLATIONCONTRIB_H__
12
#define __RD_DISTVIOLATIONCONTRIB_H__
13
14
#include <
ForceField/Contrib.h
>
15
16
namespace
DistGeom
{
17
//! A term to capture the violation of the upper and lower bounds by
18
//! distance between two points
19
class
RDKIT_DISTGEOMETRY_EXPORT
DistViolationContrib
20
:
public
ForceFields::ForceFieldContrib
{
21
public
:
22
DistViolationContrib
()
23
: d_end1Idx(0), d_end2Idx(0), d_ub(1000.0), d_lb(0.0), d_weight(1.0){};
24
25
//! Constructor
26
/*!
27
\param owner pointer to the owning ForceField
28
\param idx1 index of end1 in the ForceField's positions
29
\param idx2 index of end2 in the ForceField's positions
30
\param ub Upper bound on the distance
31
\param lb Lower bound on the distance
32
\param weight optional weight for this contribution
33
*/
34
DistViolationContrib
(
ForceFields::ForceField
*owner,
unsigned
int
idx1,
35
unsigned
int
idx2,
double
ub,
double
lb,
36
double
weight = 1.0);
37
38
double
getEnergy(
double
*pos)
const
;
39
40
void
getGrad(
double
*pos,
double
*grad)
const
;
41
virtual
DistViolationContrib
*
copy
()
const
{
42
return
new
DistViolationContrib
(*
this
);
43
};
44
45
private
:
46
unsigned
int
d_end1Idx, d_end2Idx;
//!< indices of end points
47
double
d_ub;
//!< upper bound on the distance between d_end1Idx,d_end2Idx
48
double
d_lb;
//!< lower bound on the distance between d_end1Idx,d_end2Idx
49
double
d_weight;
//!< used to adjust relative contribution weights
50
};
51
}
// namespace DistGeom
52
53
#endif
RDKIT_DISTGEOMETRY_EXPORT
#define RDKIT_DISTGEOMETRY_EXPORT
Definition:
export.h:164
DistGeom::DistViolationContrib::DistViolationContrib
DistViolationContrib()
Definition:
DistViolationContrib.h:22
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
DistGeom::DistViolationContrib
Definition:
DistViolationContrib.h:19
DistGeom::DistViolationContrib::copy
virtual DistViolationContrib * copy() const
return a copy
Definition:
DistViolationContrib.h:41
Contrib.h
DistGeom
Definition:
BoundsMatrix.h:20
export.h
DistGeom
DistViolationContrib.h
Generated on Fri Jun 12 2020 19:04:45 for RDKit by
1.8.17