simplify and reformat
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/ Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
@ -43,51 +43,16 @@ Fingerprint::Fingerprint(PairRANN *_pair)
|
||||
pair = _pair;
|
||||
}
|
||||
|
||||
Fingerprint::~Fingerprint() {
|
||||
// Smooth cutoff, goes from 1 to zero over the interval rc-dr to rc.
|
||||
// Same as MEAM uses. Used by generateradialtable and generatexpcuttable.
|
||||
|
||||
}
|
||||
|
||||
bool Fingerprint::parse_values(std::string line,std::vector<std::string> line1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Fingerprint::init(int *i,int id) {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::allocate() {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::compute_fingerprint(double *features,double *dfeaturesx,double *dfeaturesy,double * dfeaturesz, int ii,int sid,double *xn,double *yn,double*zn,int *tn,int jnum,int *jl) {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::compute_fingerprint(double *features,double *dfeaturesx,double *dfeaturesy,double * dfeaturesz,double *Sik, double *dSikx, double*dSiky, double *dSikz, double *dSijkx, double *dSijky, double *dSijkz, bool *Bij, int ii,int sid,double *xn,double *yn,double*zn,int *tn,int jnum,int *jl) {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::compute_fingerprint(double *features,double *dfeaturesx,double *dfeaturesy,double * dfeaturesz,double *sx, double *sy, double *sz, int ii,int sid,double *xn,double *yn,double*zn,int *tn,int jnum,int *jl) {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::compute_fingerprint(double *features,double *dfeaturesx,double *dfeaturesy,double * dfeaturesz,double *sx, double *sy, double *sz, double *Sik, double *dSikx, double*dSiky, double *dSikz, double *dSijkx, double *dSijky, double *dSijkz, bool *Bij, int ii,int sid,double *xn,double *yn,double*zn,int *tn,int jnum,int *jl) {
|
||||
|
||||
}
|
||||
|
||||
void Fingerprint::write_values(FILE *fid) {
|
||||
|
||||
}
|
||||
|
||||
int Fingerprint::get_length() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Smooth cutoff, goes from 1 to zero over the interval rc-dr to rc. Same as MEAM uses. Used by generateradialtable and generatexpcuttable.
|
||||
double Fingerprint::cutofffunction(double r,double rc, double dr) {
|
||||
double Fingerprint::cutofffunction(double r, double rc, double dr)
|
||||
{
|
||||
double out;
|
||||
if (r < (rc -dr))out=1;
|
||||
else if (r>rc)out=0;
|
||||
if (r < (rc - dr))
|
||||
out = 1;
|
||||
else if (r > rc)
|
||||
out = 0;
|
||||
else {
|
||||
out = 1 - (rc - r) / dr;
|
||||
out *= out;
|
||||
@ -98,7 +63,8 @@ double Fingerprint::cutofffunction(double r,double rc, double dr) {
|
||||
return out;
|
||||
}
|
||||
|
||||
void Fingerprint::generate_rinvssqrttable() {
|
||||
void Fingerprint::generate_rinvssqrttable()
|
||||
{
|
||||
int buf = 5;
|
||||
int m;
|
||||
double r1;
|
||||
@ -110,7 +76,3 @@ void Fingerprint::generate_rinvssqrttable() {
|
||||
rinvsqrttable[m] = 1 / sqrt(r1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -39,17 +39,42 @@ namespace LAMMPS_NS {
|
||||
class Fingerprint {
|
||||
public:
|
||||
Fingerprint(PairRANN *);
|
||||
virtual ~Fingerprint();
|
||||
virtual bool parse_values(std::string,std::vector<std::string>);
|
||||
virtual void write_values(FILE *);
|
||||
virtual void init(int*,int);
|
||||
virtual void allocate();
|
||||
virtual ~Fingerprint() {}
|
||||
|
||||
virtual bool parse_values(std::string, std::vector<std::string>) { return false; }
|
||||
virtual void write_values(FILE *) {}
|
||||
|
||||
virtual void init(int *, int) {}
|
||||
virtual void allocate() {}
|
||||
|
||||
void init_screen(int);
|
||||
virtual void compute_fingerprint(double*,double*,double*,double*,int,int,double*,double*,double*,int*,int,int*);//no screen,no spin
|
||||
virtual void compute_fingerprint(double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,bool*,int,int,double*,double*,double*,int*,int,int*);//screen
|
||||
virtual void compute_fingerprint(double*,double*,double*,double*,double*,double*,double*,int,int,double*,double*,double*,int*,int,int*);//spin
|
||||
virtual void compute_fingerprint(double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,double*,bool*,int,int,double*,double*,double*,int*,int,int*);//spin,screen
|
||||
virtual int get_length();
|
||||
|
||||
//no screen,no spin
|
||||
virtual void compute_fingerprint(double *, double *, double *, double *, int, int, double *,
|
||||
double *, double *, int *, int, int *)
|
||||
{
|
||||
}
|
||||
//screen
|
||||
virtual void compute_fingerprint(double *, double *, double *, double *, double *, double *,
|
||||
double *, double *, double *, double *, double *, bool *, int,
|
||||
int, double *, double *, double *, int *, int, int *)
|
||||
{
|
||||
}
|
||||
//spin
|
||||
virtual void compute_fingerprint(double *, double *, double *, double *, double *, double *,
|
||||
double *, int, int, double *, double *, double *, int *, int,
|
||||
int *)
|
||||
{
|
||||
}
|
||||
//spin,screen
|
||||
virtual void compute_fingerprint(double *, double *, double *, double *, double *, double *,
|
||||
double *, double *, double *, double *, double *, double *,
|
||||
double *, double *, bool *, int, int, double *, double *,
|
||||
double *, int *, int, int *)
|
||||
{
|
||||
}
|
||||
|
||||
virtual int get_length(){return 0};
|
||||
virtual double cutofffunction(double, double, double);
|
||||
virtual void generate_rinvssqrttable();
|
||||
bool spin;
|
||||
@ -65,8 +90,7 @@ namespace LAMMPS_NS {
|
||||
double rc;
|
||||
PairRANN *pair;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace RANN
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
#endif /* RANN_FINGERPRINT_H_ */
|
||||
|
||||
Reference in New Issue
Block a user