1 // EMTDefaultParameterProvider.h  --  provides the default EMT parameters.
2 //
3 // Copyright (C) 2001-2011 Jakob Schiotz and Center for Individual
4 // Nanoparticle Functionality, Department of Physics, Technical
5 // University of Denmark.  Email: schiotz@fysik.dtu.dk
6 //
7 // This file is part of Asap version 3.
8 // Asap is released under the GNU Lesser Public License (LGPL) version 3.
9 // However, the parts of Asap distributed within the OpenKIM project
10 // (including this file) are also released under the Common Development
11 // and Distribution License (CDDL) version 1.0.
12 //
13 // This program is free software: you can redistribute it and/or
14 // modify it under the terms of the GNU Lesser General Public License
15 // version 3 as published by the Free Software Foundation.  Permission
16 // to use other versions of the GNU Lesser General Public License may
17 // granted by Jakob Schiotz or the head of department of the
18 // Department of Physics, Technical University of Denmark, as
19 // described in section 14 of the GNU General Public License.
20 //
21 // This program is distributed in the hope that it will be useful,
22 // but WITHOUT ANY WARRANTY; without even the implied warranty of
23 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 // GNU General Public License for more details.
25 //
26 // You should have received a copy of the GNU General Public License
27 // and the GNU Lesser Public License along with this program.  If not,
28 // see <http://www.gnu.org/licenses/>.
29 
30 #ifndef _EMTDEFAULTPARAMETERPROVIDER_H
31 #define _EMTDEFAULTPARAMETERPROVIDER_H
32 
33 #include "EMTParameterProvider.h"
34 #include <vector>
35 using std::vector;
36 
37 namespace ASAPSPACE {
38 
39 class EMTDefaultParameterProvider : public EMTParameterProvider
40 {
41 public:
42   EMTDefaultParameterProvider();
43   virtual ~EMTDefaultParameterProvider();
GetName()44   virtual string GetName() const {return "EMTDefaultParameterProvider";}
45   virtual const emt_parameters *GetParameters(int element);
46   virtual void CalcGammaEtc();
47   // Can the cutoff be made element-dependent?
GetCutoffDistance()48   virtual double GetCutoffDistance() {return cutoff;}
GetListCutoffDistance()49   virtual double GetListCutoffDistance() {return cutoff * listcutofffactor;}
50   virtual double GetMaxListCutoffDistance();  // Max value, useful before initialization.
GetCutoffSlope()51   virtual double GetCutoffSlope() {return cutslope;}
52   // The potential delegates GetLengthScale to the provider.
53   // What should be done for multiple elements?
GetLengthScale()54   virtual double GetLengthScale() {return params[0]->lengthscale;}
GetNumberOfElements()55   virtual int GetNumberOfElements() {return params.size();}
GetChi()56   virtual const TinyDoubleMatrix *GetChi() {return chi;}
57   virtual void Debug();
58 
59 protected:
60   virtual emt_parameters *GetNewParameters(int element);
61   virtual void calc_cutoff();
62   virtual void calc_gammas();
63   virtual void calc_chi();
64 
65   std::vector<emt_parameters *> params;
66   TinyDoubleMatrix *chi;
67   double maxseq;
68   double cutoff;
69   double cutslope;
70   double listcutofffactor;
71 
72   // Two constants: the last shell included in interaction range, and in nb list
73   static const int shell0;
74   static const int shell1;
75 
76   // The length unit original used by EMT
77   static const double bohr;
78 };
79 
80 } // end namespace
81 
82 #endif // ! _EMTDEFAULTPARAMETERPROVIDER_H
83