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
fanntwoparticleforce.h
Go to the documentation of this file.
1
#ifndef FANNTWOPARTICLEFORCE_H
2
#define FANNTWOPARTICLEFORCE_H
3
4
#include <vector>
5
#include "
atomtype.h
"
6
#include <
force/twoparticleforce.h
>
7
struct
fann;
8
typedef
double
fann_type
;
9
10
using
std::vector;
11
12
class
FannTwoParticleNetwork
{
13
public
:
14
fann*
ann
;
15
double
r12Min
;
16
double
r12Max
;
17
double
tailCorrectionMin
;
18
double
tailCorrectionMax
;
19
double
headCorrectionMax
;
20
double
energyMin
;
21
double
energyMax
;
22
AtomType
atomType1
;
23
AtomType
atomType2
;
24
double
headCorrectionMaxDerivative
;
25
double
tailCorrectionMinDerivative
;
26
double
headCorrectionMaxEnergy
;
27
double
tailCorrectionMinEnergy
;
28
double
energyOffset
;
29
30
double
rescaleDistance
(
double
r12)
const
;
31
32
double
rescaleEnergy
(
double
energy)
const
;
33
34
double
rescaleEnergyDerivative
(
double
value)
const
;
35
36
double
tailCorrectionDampingFactor
(
double
l12)
const
;
37
double
tailCorrectionDampingFactorDerivative
(
double
l12)
const
;
38
double
headCorrectionEnergy
(
double
l12)
const
;
39
double
headCorrectionForce
(
double
l12)
const
;
40
};
41
42
class
FannTwoParticleForce
:
public
TwoParticleForce
43
{
44
public
:
45
FannTwoParticleForce
();
46
47
void
addNetwork
(
const
AtomType
& atomType1,
const
AtomType
& atomType2,
const
std::string& fileName,
const
std::string& boundsFilename);
48
49
// TwoParticleForce interface
50
public
:
51
virtual
void
calculateAndApplyForce
(
Atom
*atom1,
Atom
*atom2);
52
virtual
void
calculateAndApplyForce
(
Atom
*atom1,
Atom
*atom2,
const
Vector3
&atom2Offset);
53
54
private
:
55
void
warnAboutMissingNetwork();
56
fann_type
m_fanntmp;
57
bool
m_hasWarnedAboutMissingNetwork;
58
vector<FannTwoParticleNetwork> m_networks;
59
};
60
61
#endif // FANNTWOPARTICLEFORCE_H
Generated on Sun Jun 22 2014 13:59:20 for Emdee by
1.8.4