forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6415 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
f7198bf0f8
commit
70ed1e623d
|
@ -3,7 +3,7 @@
|
|||
if (test $1 = 1) then
|
||||
|
||||
cp fix_qeq_comb.cpp ..
|
||||
cp pair_adp.cpp ..
|
||||
//cp pair_adp.cpp ..
|
||||
cp pair_airebo.cpp ..
|
||||
cp pair_comb.cpp ..
|
||||
cp pair_eam.cpp ..
|
||||
|
@ -16,7 +16,7 @@ if (test $1 = 1) then
|
|||
cp pair_tersoff_zbl.cpp ..
|
||||
|
||||
cp fix_qeq_comb.h ..
|
||||
cp pair_adp.h ..
|
||||
//cp pair_adp.h ..
|
||||
cp pair_airebo.h ..
|
||||
cp pair_comb.h ..
|
||||
cp pair_eam.h ..
|
||||
|
@ -31,7 +31,7 @@ if (test $1 = 1) then
|
|||
elif (test $1 = 0) then
|
||||
|
||||
rm -f ../fix_qeq_comb.cpp
|
||||
rm -f ../pair_adp.cpp
|
||||
//rm -f ../pair_adp.cpp
|
||||
rm -f ../pair_airebo.cpp
|
||||
rm -f ../pair_comb.cpp
|
||||
rm -f ../pair_eam.cpp
|
||||
|
@ -44,7 +44,7 @@ elif (test $1 = 0) then
|
|||
rm -f ../pair_tersoff_zbl.cpp
|
||||
|
||||
rm -f ../fix_qeq_comb.h
|
||||
rm -f ../pair_adp.h
|
||||
//rm -f ../pair_adp.h
|
||||
rm -f ../pair_airebo.h
|
||||
rm -f ../pair_comb.h
|
||||
rm -f ../pair_eam.h
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,94 @@
|
|||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
http://lammps.sandia.gov, Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef PAIR_CLASS
|
||||
|
||||
PairStyle(adp,PairADP)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef LMP_PAIR_ADP_H
|
||||
#define LMP_PAIR_ADP_H
|
||||
|
||||
#include "pair.h"
|
||||
|
||||
namespace LAMMPS_NS {
|
||||
|
||||
class PairADP : public Pair {
|
||||
public:
|
||||
PairADP(class LAMMPS *);
|
||||
~PairADP();
|
||||
void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double init_one(int, int);
|
||||
|
||||
int pack_comm(int, int *, double *, int, int *);
|
||||
void unpack_comm(int, int, double *);
|
||||
int pack_reverse_comm(int, int, double *);
|
||||
void unpack_reverse_comm(int, int *, double *);
|
||||
double memory_usage();
|
||||
|
||||
private:
|
||||
int nmax; // allocated size of per-atom arrays
|
||||
double cutforcesq,cutmax;
|
||||
|
||||
// per-atom arrays
|
||||
|
||||
double *rho,*fp;
|
||||
double **mu, **lambda;
|
||||
|
||||
// potentials as array data
|
||||
|
||||
int nrho,nr;
|
||||
int nfrho,nrhor,nz2r;
|
||||
int nu2r, nw2r;
|
||||
double **frho,**rhor,**z2r;
|
||||
double **u2r, **w2r;
|
||||
int *type2frho,**type2rhor,**type2z2r;
|
||||
int **type2u2r,**type2w2r;
|
||||
|
||||
// potentials in spline form used for force computation
|
||||
|
||||
double dr,rdr,drho,rdrho;
|
||||
double ***rhor_spline,***frho_spline,***z2r_spline;
|
||||
double ***u2r_spline, ***w2r_spline;
|
||||
|
||||
// potentials as file data
|
||||
|
||||
int *map; // which element each atom type maps to
|
||||
|
||||
struct Setfl {
|
||||
char **elements;
|
||||
int nelements,nrho,nr;
|
||||
double drho,dr,cut;
|
||||
double *mass;
|
||||
double **frho,**rhor,***z2r;
|
||||
double ***u2r, ***w2r;
|
||||
};
|
||||
Setfl *setfl;
|
||||
|
||||
void allocate();
|
||||
void array2spline();
|
||||
void interpolate(int, double, double *, double **);
|
||||
void grab(FILE *, int, double *);
|
||||
|
||||
void read_file(char *);
|
||||
void file2array();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue