Emdee
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
libs
force
fannthreeparticleforce.h
Go to the documentation of this file.
1
#ifndef FANNFORCE_H
2
#define FANNFORCE_H
3
4
#include <
force/threeparticleforce.h
>
5
#include <
atom.h
>
6
struct
fann;
7
typedef
double
fann_type
;
8
9
class
FannThreeParticleNetwork
{
10
public
:
11
fann*
ann
;
12
double
r12Min
;
13
double
r12Max
;
14
double
r13Min
;
15
double
r13Max
;
16
double
minDistance
;
17
double
energyMin
;
18
double
energyMax
;
19
AtomType
atomType1
;
20
AtomType
atomType2
;
21
AtomType
atomType3
;
22
double
headCorrectionMaxDerivative
;
23
double
tailCorrectionMinDerivative
;
24
double
headCorrectionMaxEnergy
;
25
double
tailCorrectionMinEnergy
;
26
double
energyOffset
;
27
double
angleMin
= M_PI / 10;
28
double
angleMax
= M_PI;
29
30
double
rescaleDistance12
(
double
r12)
const
;
31
double
rescaleDistance13
(
double
r12)
const
;
32
double
rescaleAngle
(
double
angle)
const
;
33
double
rescaleEnergy
(
double
energy)
const
;
34
// double rescaleEnergyDerivative(double value) const;
35
// double tailCorrectionDampingFactor(double l12) const;
36
// double tailCorrectionDampingFactorDerivative(double l12) const;
37
// double headCorrectionEnergy(double l12) const;
38
// double headCorrectionForce(double l12) const;
39
double
rescaleEnergyDerivativeR12
(
double
value)
const
;
40
double
rescaleEnergyDerivativeR13
(
double
value)
const
;
41
double
rescaleEnergyDerivativeAngle
(
double
value)
const
;
42
};
43
44
class
FannThreeParticleForce
:
public
ThreeParticleForce
45
{
46
public
:
47
FannThreeParticleForce
();
48
49
void
loadNetwork
(
const
std::string &fileName,
const
std::string &boundsFilename,
double
minDistance = 0.0);
50
51
// ThreeParticleForce interface
52
public
:
53
void
calculateAndApplyForce
(
Atom
*atom1,
Atom
*atom2,
Atom
*atom3);
54
void
calculateAndApplyForce
(
Atom
*atom1,
Atom
*atom2,
Atom
*atom3,
const
Vector3
&atom2Offset,
const
Vector3
&atom3Offset);
55
56
private
:
57
void
warnAboutMissingNetwork();
58
59
fann *m_ann;
60
fann_type
m_fanntmp;
61
bool
m_hasWarnedAboutMissingNetwork;
62
fann_type
*testForce(
fann_type
*input);
63
vector<FannThreeParticleNetwork> m_networks;
64
};
65
66
#endif // FANNFORCE_H
Generated on Sun Jun 22 2014 13:59:20 for Emdee by
1.8.4