simplify and reformat
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
/* -*- c++ -*- ----------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||||
https://www.lammps.org/ Sandia National Laboratories
|
https://www.lammps.org/ Sandia National Laboratories
|
||||||
Steve Plimpton, sjplimp@sandia.gov
|
Steve Plimpton, sjplimp@sandia.gov
|
||||||
@ -43,51 +43,16 @@ Fingerprint::Fingerprint(PairRANN *_pair)
|
|||||||
pair = _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.
|
||||||
|
|
||||||
}
|
double Fingerprint::cutofffunction(double r, double rc, double dr)
|
||||||
|
{
|
||||||
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 out;
|
double out;
|
||||||
if (r < (rc -dr))out=1;
|
if (r < (rc - dr))
|
||||||
else if (r>rc)out=0;
|
out = 1;
|
||||||
|
else if (r > rc)
|
||||||
|
out = 0;
|
||||||
else {
|
else {
|
||||||
out = 1 - (rc - r) / dr;
|
out = 1 - (rc - r) / dr;
|
||||||
out *= out;
|
out *= out;
|
||||||
@ -98,7 +63,8 @@ double Fingerprint::cutofffunction(double r,double rc, double dr) {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fingerprint::generate_rinvssqrttable() {
|
void Fingerprint::generate_rinvssqrttable()
|
||||||
|
{
|
||||||
int buf = 5;
|
int buf = 5;
|
||||||
int m;
|
int m;
|
||||||
double r1;
|
double r1;
|
||||||
@ -110,7 +76,3 @@ void Fingerprint::generate_rinvssqrttable() {
|
|||||||
rinvsqrttable[m] = 1 / sqrt(r1);
|
rinvsqrttable[m] = 1 / sqrt(r1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -39,17 +39,42 @@ namespace LAMMPS_NS {
|
|||||||
class Fingerprint {
|
class Fingerprint {
|
||||||
public:
|
public:
|
||||||
Fingerprint(PairRANN *);
|
Fingerprint(PairRANN *);
|
||||||
virtual ~Fingerprint();
|
virtual ~Fingerprint() {}
|
||||||
virtual bool parse_values(std::string,std::vector<std::string>);
|
|
||||||
virtual void write_values(FILE *);
|
virtual bool parse_values(std::string, std::vector<std::string>) { return false; }
|
||||||
virtual void init(int*,int);
|
virtual void write_values(FILE *) {}
|
||||||
virtual void allocate();
|
|
||||||
|
virtual void init(int *, int) {}
|
||||||
|
virtual void allocate() {}
|
||||||
|
|
||||||
void init_screen(int);
|
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
|
//no screen,no spin
|
||||||
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 *, int, int, double *,
|
||||||
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
|
double *, double *, int *, int, int *)
|
||||||
virtual int get_length();
|
{
|
||||||
|
}
|
||||||
|
//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 double cutofffunction(double, double, double);
|
||||||
virtual void generate_rinvssqrttable();
|
virtual void generate_rinvssqrttable();
|
||||||
bool spin;
|
bool spin;
|
||||||
@ -65,8 +90,7 @@ namespace LAMMPS_NS {
|
|||||||
double rc;
|
double rc;
|
||||||
PairRANN *pair;
|
PairRANN *pair;
|
||||||
};
|
};
|
||||||
}
|
} // namespace RANN
|
||||||
}
|
} // namespace LAMMPS_NS
|
||||||
|
|
||||||
|
|
||||||
#endif /* RANN_FINGERPRINT_H_ */
|
#endif /* RANN_FINGERPRINT_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user