RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
Inversion.h
Go to the documentation of this file.
1//
2// Copyright (C) 2013 Paolo Tosco 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_UFFINVERSION_H
12#define RD_UFFINVERSION_H
13#include <ForceField/Contrib.h>
14#include <tuple>
15#include <Geometry/point.h>
16
17namespace ForceFields {
18namespace UFF {
19class AtomicParams;
20
21//! The inversion term for the Universal Force Field
23 public:
25 //! Constructor
26 /*!
27 \param owner pointer to the owning ForceField
28 \param idx1 index of atom1 in the ForceField's positions
29 \param idx2 index of atom2 in the ForceField's positions
30 \param idx3 index of atom3 in the ForceField's positions
31 \param idx4 index of atom4 in the ForceField's positions
32 \param at2AtomicNum atomic number for atom 2
33 \param isCBoundToO boolean flag; true if atom 2 is sp2 carbon bound to
34 sp2 oxygen
35
36 */
37 InversionContrib(ForceField *owner, unsigned int idx1, unsigned int idx2,
38 unsigned int idx3, unsigned int idx4, int at2AtomicNum,
39 bool isCBoundToO, double oobForceScalingFactor = 1.0);
40
41 double getEnergy(double *pos) const override;
42
43 void getGrad(double *pos, double *grad) const override;
44 InversionContrib *copy() const override {
45 return new InversionContrib(*this);
46 }
47
48 private:
49 int d_at1Idx{-1};
50 int d_at2Idx{-1};
51 int d_at3Idx{-1};
52 int d_at4Idx{-1};
53 double d_forceConstant, d_C0, d_C1, d_C2;
54};
55} // namespace UFF
56} // namespace ForceFields
57#endif
abstract base class for contributions to ForceFields
Definition Contrib.h:18
A class to store forcefields and handle minimization.
Definition ForceField.h:79
The inversion term for the Universal Force Field.
Definition Inversion.h:22
InversionContrib * copy() const override
return a copy
Definition Inversion.h:44
void getGrad(double *pos, double *grad) const override
calculates our contribution to the gradients of a position
InversionContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, unsigned int idx3, unsigned int idx4, int at2AtomicNum, bool isCBoundToO, double oobForceScalingFactor=1.0)
Constructor.
double getEnergy(double *pos) const override
returns our contribution to the energy of a position
#define RDKIT_FORCEFIELD_EXPORT
Definition export.h:185