Skip to content
Snippets Groups Projects
Commit 7d9670bc authored by DallasTrinkle's avatar DallasTrinkle
Browse files

Addition of potential, code modifications to incorporate multicomponent spline...

Addition of potential, code modifications to incorporate multicomponent spline MEAM in pair_meam_spline.

Backwards compatible with previous version of pair_meam_spline.
parent 2f32fb7f
No related branches found
No related tags found
No related merge requests found
# Ti-O cubic spline potential where O is in the dilute limit. DATE: 2016-06-05 CONTRIBUTOR: Pinchao Zhang, Dallas R. Trinkle
meam/spline 2 Ti O
spline3eq
13
-20 0
1.742692837 3.744277175966 99.4865081627958
2.05580176725 0.910839730906 10.8702523265355
2.3689106975 0.388045896634 -1.55322418749562
2.68201962775 -0.018840906533 2.43630041329215
2.995128558 -0.248098929639 2.67912713976835
3.30823748825 -0.264489550297 -0.125056384603077
3.6213464185 -0.227196189283 1.10662555360438
3.93445534875 -0.129293090176 -0.592053676745914
4.247564279 -0.059685366933 -0.470123414607672
4.56067320925 -0.031100025561 -0.0380739973059663
4.8737821395 -0.013847363202 -0.0711547960695406
5.18689106975 -0.003203412728 -0.081768292420175
5.5 0 -0.0571422964883619
spline3eq
5
0.155001355787331 0
1.9 0.533321679606674 0
2.8 0.456402081843862 -1.60311717015859
3.7 -0.324281383502201 1.19940299483249
4.6 -0.474029826906675 1.47909794595154
5.5 0 -2.49521499855605
spline3eq
13
0 0
1.742692837 0 0
2.05580176725 0 0
2.3689106975 0 0
2.68201962775 0 0
2.995128558 0 0
3.30823748825 0 0
3.6213464185 0 0
3.93445534875 0 0
4.247564279 0 0
4.56067320925 0 0
4.8737821395 0 0
5.18689106975 0 0
5.5 0 0
spline3eq
11
-1 0
2.055801767 1.7475279661 -525.869786904802
2.2912215903 -5.8677963945 252.796316927755
2.5266414136 -8.3376288737 71.7318388721015
2.7620612369 -5.8398712842 -1.93587742753693
2.9974810602 -3.1140648231 -39.2999192667503
3.2329008835 -1.7257245065 14.3424136002004
3.4683207068 -0.4428977017 -29.4925534559498
3.7037405301 -0.1466643003 -3.18010534572236
3.9391603534 -0.2095507945 3.33490838803603
4.1745801767 -0.1442384563 3.71918691359508
4.41 0 -9.66717019857564
spline3eq
5
-61.9827585211652 0
1.9 11.2293641315584 0
2.8 -27.9976343076148 122.648031332411
3.7 -8.32979773113248 -54.3340881766381
4.6 -1.00863195297399 3.23150064581724
5.5 0 -5.3514242228123
spline3eq
4
0.00776934946045395 0.105197706160344
-55.14233165 -0.29745568008 0.00152870603877451
-44.7409899033333 -0.15449458722 0.00038933722543571
-34.3396481566667 0.05098657168 0.00038124926922248
-23.93830641 0.57342694704 0.0156639264890892
spline3eq
5
-0.00676745157022662 -0.0159520381982146
-23.9928 0.297607384684645 0
-15.9241175 0.216691597077105 -0.0024248755353942
-7.855435 0.0637598673719069 0.00306245895013358
0.213247499999998 -0.00183450621970427 -0.00177588407633909
8.28193 -0.111277018874367 0
spline3eq
10
2.77327511656661 0
2.055801767 -0.1485215264 72.2010867146919
2.31737934844444 1.6845304918 -47.2744689053404
2.57895692988889 2.0113365977 -15.1859578405326
2.84053451133333 1.1444092747 3.33978204841873
3.10211209277778 0.2861606803 2.587867603808
3.36368967422222 -0.3459281126 6.14070694084556
3.62526725566667 -0.6257480601 3.7397696717154
3.88684483711111 -0.6119510826 4.64749084871402
4.14842241855556 -0.3112059651 2.83275746415936
4.41 0 -15.0612086827734
spline3eq
5
12.3315547862781 0
1.9 2.62105440156724 0
2.8 10.2850803058354 -25.439802988016
3.7 3.23933763743897 -7.20203673434025
4.6 -5.79049355858613 39.5509978688682
5.5 0 -41.221771373642
spline3eq
8
8.33642274810572 -60.4024574736564
-1 0.07651409193 -110.652321293778
-0.724509054371429 0.14155824541 44.8853405500508
-0.449018108742857 0.75788697341 -25.3065115342002
-0.173527163114286 0.63011570378 -2.48510144915082
0.101963782514286 0.09049597305 2.68769386908235
0.377454728142857 -0.35741586657 -1.01558570129633
0.652945673771428 -0.65293217647 13.4224786001212
0.9284366194 -6.00912190653 -452.752542694929
spline3eq
5
0.137191606537625 -1.55094230968985
-1 0.0513843442016519 0
-0.5 0.0179024412245673 -2.44986494990154
0 -0.260650876879273 3.91774583656401
0.5 -0.190163791764901 -4.84414871911743
1 -0.763795416646599 0
spline3eq
8
0 0
-1 0 0
-0.724509054371429 0 0
-0.449018108742857 0 0
-0.173527163114286 0 0
0.101963782514286 0 0
0.377454728142857 0 0
0.652945673771428 0 0
0.9284366194 0 0
This diff is collapsed.
/* -*- c++ -*- ----------------------------------------------------------
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
......@@ -43,10 +43,24 @@ public:
virtual void compute(int, int);
void settings(int, char **);
void coeff(int, char **);
void get_coeff(double *, double *);
double pair_density(int );
double three_body_density(int );
void init_style();
void init_list(int, class NeighList *);
double init_one(int, int);
// helper functions for compute()
double compute_three_body_contrib_to_charge_density(int i, int& numBonds); // returns rho_value and returns numBonds by reference
double compute_embedding_energy_and_deriv(int eflag, int i, double rho_value); // returns the derivative of the embedding energy Uprime_i
void compute_three_body_contrib_to_forces(int i, int numBonds, double Uprime_i);
void compute_two_body_pair_interactions();
int ij_to_potl(int i, int j);
int i_to_potl(int i);
int pack_forward_comm(int, int *, double *, int, int *);
void unpack_forward_comm(int, int, double *);
int pack_reverse_comm(int, int, double *);
......@@ -74,15 +88,15 @@ protected:
}
/// Initialization of spline function.
void init(int _n, double _deriv0, double _derivN) {
N = _n;
void init(int _N, double _deriv0, double _derivN) {
N = _N;
deriv0 = _deriv0;
derivN = _derivN;
delete[] X;
delete[] Xs;
delete[] Y;
delete[] Y2;
delete[] Ydelta;
// if (X) delete[] X;
// if (Xs) delete[] Xs;
// if (Y) delete[] Y;
// if (Y2) delete[] Y2;
// if (Ydelta) delete[] Ydelta;
X = new double[N];
Xs = new double[N];
Y = new double[N];
......@@ -97,7 +111,7 @@ protected:
int numKnots() const { return N; }
/// Parses the spline knots from a text file.
void parse(FILE* fp, Error* error);
void parse(FILE* fp, Error* error, bool isNewFormat);
/// Calculates the second derivatives of the cubic spline.
void prepareSpline(Error* error);
......@@ -209,18 +223,18 @@ protected:
/// Helper data structure for potential routine.
struct MEAM2Body {
int tag;
int tag; // holds the index of the second atom (j)
double r;
double f, fprime;
double del[3];
};
SplineFunction phi; // Phi(r_ij)
SplineFunction rho; // Rho(r_ij)
SplineFunction f; // f(r_ij)
SplineFunction U; // U(rho)
SplineFunction g; // g(cos_theta)
double zero_atom_energy; // Shift embedding energy by this value to make it zero for a single atom in vacuum.
SplineFunction* phis; // Phi_i(r_ij)
SplineFunction* rhos; // Rho_ij(r_ij)
SplineFunction* fs; // f_i(r_ij)
SplineFunction* Us; // U_i(rho)
SplineFunction* gs; // g_ij(cos_theta)
double* zero_atom_energies; // Shift embedding energy by this value to make it zero for a single atom in vacuum.
double cutoff; // The cutoff radius
......@@ -231,6 +245,8 @@ protected:
void read_file(const char* filename);
void allocate();
};
}
......@@ -279,3 +295,5 @@ protected:
*
* See file 'pair_spline_meam.cpp' for history of changes.
------------------------------------------------------------------------- */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment