Loading...
Searching...
No Matches
EMTParameterProvider.h
Go to the documentation of this file.
1// EMTParameterProvider.h -- Abstract class for objects providing EMT
2// parameters.
3
4#ifndef _EMTPARAMETERPROVIDER_H
5#define _EMTPARAMETERPROVIDER_H
6
7#include "TinyMatrix.h"
8#include <string>
9using std::string;
10
11// The stucture used to for store EMT parameters.
14 double gamma1, gamma2;
15 // double pairA, pairD;
16 double
17 lengthscale; // Not an EMT parameter. 1/sqrt(2) of the lattice constant.
18 int Z;
19 std::string name;
20 int index; // An index into various arrays. Counts the elements in the
21 // simulation.
22};
23
24// A geometric constant.
25// static const double Beta = 1.80939979; // ((16*pi/3)^(1/3))/sqrt(2)
26static const double Beta = 1.809; // Preserve same rounding as in ARTwork.
27
28// An EMTParameterProvider provides the EMT parameters to the
29// potential. The GetParameters() method returns the parameters for a
30// given element. If it is called multiple times with the same
31// element it must return a pointer to the same emt_parameters struct.
32// The Provider owns the parameters, they are deleted when the
33// provider is deleted. After getting _all_ the elements,
34// CalcGammaEtc() should be called to calculate the cutoff radius, the
35// gammas and other quantities that cannot be calculated before it is
36// known which elements are in the simulation. The gammas and the
37// cutoff are determined by the Provider since changing the way they
38// are determined corresponds to changing the EMT potential.
40public:
42 virtual const emt_parameters *GetParameters(int element) = 0;
43 virtual void CalcGammaEtc() = 0;
44 virtual double GetCutoffDistance() = 0; // Can it be made element-dependent?
45 virtual double GetCutoffSlope() = 0;
46 virtual double GetListCutoffDistance() = 0; // Cutoff for neighbor list.
47 virtual double
48 GetLengthScale() = 0; // The potential delegates this to the provider.
49 virtual const TinyDoubleMatrix *GetChi() = 0;
50 virtual int GetNumberOfElements() = 0;
51};
52
53#endif // ! _EMTPARAMETERPROVIDER_H
static const double Beta
TinyMatrix< double > TinyDoubleMatrix
Definition TinyMatrix.h:24
virtual double GetCutoffDistance()=0
virtual const emt_parameters * GetParameters(int element)=0
virtual double GetCutoffSlope()=0
virtual void CalcGammaEtc()=0
virtual double GetLengthScale()=0
virtual double GetListCutoffDistance()=0
virtual int GetNumberOfElements()=0
virtual const TinyDoubleMatrix * GetChi()=0