apply clang-format

This commit is contained in:
Axel Kohlmeyer
2024-06-25 20:07:34 -04:00
parent e3fb1f24bd
commit e5250a76ac
6 changed files with 191 additions and 185 deletions

View File

@ -32,8 +32,8 @@ class ComputePODAtom : public Compute {
void init_list(int, class NeighList *) override;
void compute_peratom() override;
double memory_usage() override;
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype, int *numneigh,
double rcutsq, int i);
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype,
int *numneigh, double rcutsq, int i);
void map_element2type(int narg, char **arg, int nelements);
private:
@ -45,14 +45,14 @@ class ComputePODAtom : public Compute {
int nij;
int nijmax;
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
char **elements;
int *map;
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
};
} // namespace LAMMPS_NS

View File

@ -32,8 +32,8 @@ class ComputePODGlobal : public Compute {
void init_list(int, class NeighList *) override;
void compute_array() override;
double memory_usage() override;
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype, int *numneigh,
double rcutsq, int i);
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype,
int *numneigh, double rcutsq, int i);
void map_element2type(int narg, char **arg, int nelements);
private:
@ -44,14 +44,14 @@ class ComputePODGlobal : public Compute {
int nij;
int nijmax;
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
char **elements;
int *map;
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
};
} // namespace LAMMPS_NS

View File

@ -32,8 +32,8 @@ class ComputePODLocal : public Compute {
void init_list(int, class NeighList *) override;
void compute_array() override;
double memory_usage() override;
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype, int *numneigh,
double rcutsq, int i);
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype,
int *numneigh, double rcutsq, int i);
void map_element2type(int narg, char **arg, int nelements);
private:
@ -44,14 +44,14 @@ class ComputePODLocal : public Compute {
int nij;
int nijmax;
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
char **elements;
int *map;
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
};
} // namespace LAMMPS_NS

View File

@ -32,8 +32,8 @@ class ComputePODDAtom : public Compute {
void init_list(int, class NeighList *) override;
void compute_peratom() override;
double memory_usage() override;
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype, int *numneigh,
double rcutsq, int i);
void lammpsNeighborList(double **x, int **firstneigh, tagint *atomid, int *atomtype,
int *numneigh, double rcutsq, int i);
void map_element2type(int narg, char **arg, int nelements);
private:
@ -45,14 +45,14 @@ class ComputePODDAtom : public Compute {
int nij;
int nijmax;
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
double *tmpmem; // temporary memory
double *rij; // (xj - xi) for all pairs (I, J)
char **elements;
int *map;
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
};
} // namespace LAMMPS_NS

View File

@ -25,26 +25,26 @@
#define DPOSV dposv_
extern "C" {
double DDOT(int *, double *, int *, double *, int *);
void DGEMV(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *,
int *);
void DGEMM(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *,
double *, double *, int *);
void DGETRF(int *, int *, double *, int *, int *, int *);
void DGETRI(int *, double *, int *, int *, double *, int *, int *);
void DSYEV(char *, char *, int *, double *, int *, double *, double *, int *, int *);
void DPOSV(char *, int *, int *, double *, int *, double *, int *, int *);
double DDOT(int *, double *, int *, double *, int *);
void DGEMV(char *, int *, int *, double *, double *, int *, double *, int *, double *, double *,
int *);
void DGEMM(char *, char *, int *, int *, int *, double *, double *, int *, double *, int *,
double *, double *, int *);
void DGETRF(int *, int *, double *, int *, int *, int *);
void DGETRI(int *, double *, int *, int *, double *, int *, int *);
void DSYEV(char *, char *, int *, double *, int *, double *, double *, int *, int *);
void DPOSV(char *, int *, int *, double *, int *, double *, int *, int *);
}
namespace LAMMPS_NS {
class EAPOD : protected Pointers {
private:
private:
int indexmap3(int *indx, int n1, int n2, int n3, int N1, int N2);
int crossindices(int *dabf1, int nabf1, int nrbf1, int nebf1,
int *dabf2, int nabf2, int nrbf2, int nebf2, int dabf12, int nrbf12);
int crossindices(int *ind1, int *ind2, int *dabf1, int nabf1, int nrbf1, int nebf1,
int *dabf2, int nabf2, int nrbf2, int nebf2, int dabf12, int nrbf12);
int crossindices(int *dabf1, int nabf1, int nrbf1, int nebf1, int *dabf2, int nabf2, int nrbf2,
int nebf2, int dabf12, int nrbf12);
int crossindices(int *ind1, int *ind2, int *dabf1, int nabf1, int nrbf1, int nebf1, int *dabf2,
int nabf2, int nrbf2, int nebf2, int dabf12, int nrbf12);
void init3bodyarray(int *np, int *pq, int *pc, int Pa3);
@ -60,17 +60,19 @@ private:
void eigenvaluedecomposition(double *Phi, double *Lambda, int N);
void myneighbors(double *rij, double *x, int *ai, int *aj, int *ti, int *tj,
int *jlist, int *pairnumsum, int *atomtype, int *alist, int i);
void myneighbors(double *rij, double *x, int *ai, int *aj, int *ti, int *tj, int *jlist,
int *pairnumsum, int *atomtype, int *alist, int i);
void radialbasis(double *rbf, double *rbfx, double *rbfy, double *rbfz, double *rij, double *besselparams, double rin,
double rmax, int besseldegree, int inversedegree, int nbesselpars, int N);
void radialbasis(double *rbf, double *rbfx, double *rbfy, double *rbfz, double *rij,
double *besselparams, double rin, double rmax, int besseldegree,
int inversedegree, int nbesselpars, int N);
void angularbasis(double *abf, double *abfx, double *abfy, double *abfz, double *rij, double *tm, int *pq, int N, int K);
void angularbasis(double *abf, double *abfx, double *abfy, double *abfz, double *rij, double *tm,
int *pq, int N, int K);
void radialangularbasis(double *sumU, double *U, double *Ux, double *Uy, double *Uz,
double *rbf, double *rbfx, double *rbfy, double *rbfz, double *abf,
double *abfx, double *abfy, double *abfz, int *atomtype, int N, int K, int M, int Ne);
void radialangularbasis(double *sumU, double *U, double *Ux, double *Uy, double *Uz, double *rbf,
double *rbfx, double *rbfy, double *rbfz, double *abf, double *abfx,
double *abfy, double *abfz, int *atomtype, int N, int K, int M, int Ne);
void MatMul(double *c, double *a, double *b, int r1, int c1, int c2);
@ -80,19 +82,18 @@ private:
void mvproduct(double *fij, double *c, double *dd, int N, int ndesc);
public:
public:
std::vector<std::string> species;
double rin;
double rcut;
int true4BodyDesc;
int nelements; // number of elements
int nelements; // number of elements
int pbc[3];
int *elemindex ;
int *elemindex;
int onebody; // one-body descriptors
int onebody; // one-body descriptors
int besseldegree;
int inversedegree;
int pdegree[2];
@ -100,44 +101,45 @@ public:
int timing;
double comptime[20];
double besselparams[3];
double *Phi ; // eigenvectors
double *Lambda ; // eigenvalues
double *coeff; // coefficients
double *Phi; // eigenvectors
double *Lambda; // eigenvalues
double *coeff; // coefficients
//double *newcoeff ; // coefficients
double *tmpmem;
// environmental variables
int nClusters; // number of environment clusters
int nComponents; // number of principal components
int nClusters; // number of environment clusters
int nComponents; // number of principal components
//int nNeighbors; // numbe of neighbors
int Mdesc; // number of base descriptors
int Mdesc; // number of base descriptors
double *Proj; // PCA Projection matrix
double *Centroids; // centroids of the clusters
double *bd; // base descriptors
double *bdd; // derivatives of the base descriptors with respect to the atomic positions
double *pd; // multi-environment descriptors
double *pdd; // derivative of the multi-environment descriptors with respect to the atomic positions
double *Proj; // PCA Projection matrix
double *Centroids; // centroids of the clusters
double *bd; // base descriptors
double *bdd; // derivatives of the base descriptors with respect to the atomic positions
double *pd; // multi-environment descriptors
double *
pdd; // derivative of the multi-environment descriptors with respect to the atomic positions
int nproj; // number of elements in projection matrix (nComponents * Mdesc * nelements)
int ncentroids; // number of centroids (nComponents * nClusters * nelements)
int nproj; // number of elements in projection matrix (nComponents * Mdesc * nelements)
int ncentroids; // number of centroids (nComponents * nClusters * nelements)
int Njmax;
int nCoeffPerElement; // number of coefficients per element = (nl1 + Mdesc*nClusters)
int nCoeffAll; // number of coefficients for all elements = (nl1 + Mdesc*nClusters)*nelements
int ncoeff; // number of coefficients in the input file
int ns; // number of snapshots for radial basis functions
int nd1, nd2, nd3, nd4, nd5, nd6, nd7, nd; // number of global descriptors
int nl1, nl2, nl3, nl4, nl5, nl6, nl7, nl; // number of local descriptors
int nrbf2, nrbf3, nrbf4, nrbfmax; // number of radial basis functions
int nabf3, nabf4; // number of angular basis functions
int P3, P4; // angular polynomial degrees
int K3, K4, Q4; // number of monomials
int *pn3, *pq3, *pc3; // arrays to compute 3-body angular basis functions
int *pq4, *pa4, *pb4, *pc4; // arrays to compute 3-body angular basis functions
int nCoeffPerElement; // number of coefficients per element = (nl1 + Mdesc*nClusters)
int nCoeffAll; // number of coefficients for all elements = (nl1 + Mdesc*nClusters)*nelements
int ncoeff; // number of coefficients in the input file
int ns; // number of snapshots for radial basis functions
int nd1, nd2, nd3, nd4, nd5, nd6, nd7, nd; // number of global descriptors
int nl1, nl2, nl3, nl4, nl5, nl6, nl7, nl; // number of local descriptors
int nrbf2, nrbf3, nrbf4, nrbfmax; // number of radial basis functions
int nabf3, nabf4; // number of angular basis functions
int P3, P4; // angular polynomial degrees
int K3, K4, Q4; // number of monomials
int *pn3, *pq3, *pc3; // arrays to compute 3-body angular basis functions
int *pq4, *pa4, *pb4, *pc4; // arrays to compute 3-body angular basis functions
int *tmpint;
int nintmem; // number of integers in tmpint array
int ndblmem; // number of doubles in tmpmem array
int nintmem; // number of integers in tmpint array
int ndblmem; // number of doubles in tmpmem array
// four-body descriptors
int *ind23, *ind32, nrbf23, nabf23, P23, n23, n32, nl23, nd23;
@ -174,62 +176,64 @@ public:
void mknewcoeff(double *c, int nc);
void twobodydesc(double *d2, double *rbf, int *tj, int N);
void twobodydescderiv(double *d2, double *dd2, double *rbf, double *rbfx,
double *rbfy, double *rbfz, int *tj, int N);
void twobody_forces(double *fij, double *cb2, double *rbfx, double *rbfy, double *rbfz, int *tj, int Nj);
void twobodydescderiv(double *d2, double *dd2, double *rbf, double *rbfx, double *rbfy,
double *rbfz, int *tj, int N);
void twobody_forces(double *fij, double *cb2, double *rbfx, double *rbfy, double *rbfz, int *tj,
int Nj);
void threebodydesc(double *d3, double *sumU);
void threebodydescderiv(double *dd3, double *sumU, double *Ux, double *Uy, double *Uz,
int *atomtype, int N);
int *atomtype, int N);
void threebody_forcecoeff(double *fb3, double *cb3, double *sumU);
void fourbodydesc(double *d4, double *sumU);
void fourbodydescderiv(double *d4, double *dd4, double *sumU, double *Ux, double *Uy, double *Uz,
int *atomtype, int N);
int *atomtype, int N);
void fourbody_forcecoeff(double *fb4, double *cb4, double *sumU);
void allbody_forces(double *fij, double *forcecoeff, double *rbf, double *rbfx, double *rbfy, double *rbfz,
double *abf, double *abfx, double *abfy, double *abfz, int *tj, int Nj);
void allbody_forces(double *fij, double *forcecoeff, double *Ux, double *Uy, double *Uz, int *tj, int Nj);
void allbody_forces(double *fij, double *forcecoeff, double *rbf, double *rbfx, double *rbfy,
double *rbfz, double *abf, double *abfx, double *abfy, double *abfz, int *tj,
int Nj);
void allbody_forces(double *fij, double *forcecoeff, double *Ux, double *Uy, double *Uz, int *tj,
int Nj);
void descriptors(double *gd, double *gdd, double *basedesc, double *probdesc, double *x, int *atomtype, int *alist,
int *jlist, int *pairnumsum, int natom);
void descriptors(double *gd, double *gdd, double *basedesc, double *probdesc, double *x,
int *atomtype, int *alist, int *jlist, int *pairnumsum, int natom);
void descriptors(double *gd, double *gdd, double *basedesc, double *x, int *atomtype, int *alist,
int *jlist, int *pairnumsum, int natom);
int *jlist, int *pairnumsum, int natom);
void peratombase_descriptors(double *bd, double *bdd, double *rij, double *temp,
int *tj, int Nj);
void peratombase_descriptors(double *bd, double *bdd, double *rij, double *temp, int *tj, int Nj);
double peratombase_coefficients(double *cb, double *bd, int *ti);
double peratom_environment_descriptors(double *cb, double *bd, double *tm, int *ti);
void peratomenvironment_descriptors(double *P, double *dP_dR, double *B, double *dB_dR, double *tmp, int elem, int nNeighbors);
void peratomenvironment_descriptors(double *P, double *dP_dR, double *B, double *dB_dR,
double *tmp, int elem, int nNeighbors);
void base_descriptors(double *basedesc, double *x, int *atomtype, int *alist,
int *jlist, int *pairnumsum, int natom);
void base_descriptors(double *basedesc, double *x, int *atomtype, int *alist, int *jlist,
int *pairnumsum, int natom);
void descriptors(double *basedesc, double *probdesc, double *x, int *atomtype, int *alist,
int *jlist, int *pairnumsum, int natom);
int *jlist, int *pairnumsum, int natom);
double peratomenergyforce(double *fij, double *rij, double *temp, int *ti, int *tj, int Nj);
double peratomenergyforce2(double *fij, double *rij, double *temp, int *ti, int *tj, int Nj);
double energyforce(double *force, double *x, int *atomtype, int *alist,
int *jlist, int *pairnumsum, int natom);
double energyforce(double *force, double *x, int *atomtype, int *alist, int *jlist,
int *pairnumsum, int natom);
void tallyforce(double *force, double *fij, int *ai, int *aj, int N);
void tallyforce(double *force, double *fij, int *ai, int *aj, int N);
void fourbodydesc23(double* d23, double* d2, double *d3);
void fourbodydescderiv23(double* dd23, double* d2, double *d3, double* dd2, double *dd3, int N);
void fourbodydesc23(double *d23, double *d2, double *d3);
void fourbodydescderiv23(double *dd23, double *d2, double *d3, double *dd2, double *dd3, int N);
void crossdesc(double *d12, double *d1, double *d2, int *ind1, int *ind2, int n12);
void crossdescderiv(double *dd12, double *d1, double *d2, double *dd1, double *dd2,
int *ind1, int *ind2, int n12, int N);
void crossdesc_reduction(double *cb1, double *cb2, double *c12, double *d1,
double *d2, int *ind1, int *ind2, int n12);
void crossdescderiv(double *dd12, double *d1, double *d2, double *dd1, double *dd2, int *ind1,
int *ind2, int n12, int N);
void crossdesc_reduction(double *cb1, double *cb2, double *c12, double *d1, double *d2, int *ind1,
int *ind2, int n12);
};
} // namespace LAMMPS_NS
#endif

View File

@ -25,7 +25,7 @@ PairStyle(pod,PairPOD);
namespace LAMMPS_NS {
class PairPOD : public Pair {
public:
public:
PairPOD(class LAMMPS *);
~PairPOD() override;
void compute(int, int) override;
@ -36,14 +36,16 @@ public:
double init_one(int, int) override;
double memory_usage() override;
void lammpsNeighborList(double *rij1, int *ai1, int *aj1, int *ti1, int *tj1, double **x, int **firstneigh, int *atomtype, int *map, int *numneigh,
double rcutsq, int i);
void NeighborCount(double **x, int **firstneigh, int *ilist, int *numneigh, double rcutsq, int i1);
void NeighborList(double **x, int **firstneigh, int *atomtype, int *map, int *ilist, int *numneigh,
double rcutsq, int i1);
void lammpsNeighborList(double *rij1, int *ai1, int *aj1, int *ti1, int *tj1, double **x,
int **firstneigh, int *atomtype, int *map, int *numneigh, double rcutsq,
int i);
void NeighborCount(double **x, int **firstneigh, int *ilist, int *numneigh, double rcutsq,
int i1);
void NeighborList(double **x, int **firstneigh, int *atomtype, int *map, int *ilist,
int *numneigh, double rcutsq, int i1);
void tallyenergy(double *ei, int istart, int Ni);
void tallystress(double *fij, double *rij, int *ai, int *aj, int nlocal, int N);
void tallyforce(double **force, double *fij, int *ai, int *aj, int N);
void tallyforce(double **force, double *fij, int *ai, int *aj, int N);
void divideInterval(int *intervals, int N, int M);
int calculateNumberOfIntervals(int N, int intervalSize);
int numberOfNeighbors();
@ -63,13 +65,13 @@ public:
void fourbodydesc(double *d4, int Ni);
void fourbodydescderiv(double *dd4, int Nij);
void crossdesc(double *d12, double *d1, double *d2, int *ind1, int *ind2, int n12, int Ni);
void crossdescderiv(double *dd12, double *d1, double *d2, double *dd1, double *dd2,
int *ind1, int *ind2, int *idxi, int n12, int Ni, int Nij);
void crossdescderiv(double *dd12, double *d1, double *d2, double *dd1, double *dd2, int *ind1,
int *ind2, int *idxi, int n12, int Ni, int Nij);
void blockatombase_descriptors(double *bd1, double *bdd1, int Ni, int Nij);
void blockatomenergyforce(double *ei, double *fij, int Ni, int Nij);
void crossdesc_reduction(double *cb1, double *cb2, double *c12, double *d1,
double *d2, int *ind1, int *ind2, int n12, int Ni);
void crossdesc_reduction(double *cb1, double *cb2, double *c12, double *d1, double *d2, int *ind1,
int *ind2, int n12, int Ni);
void blockatom_base_descriptors(double *bd1, int Ni, int Nij);
void blockatom_base_coefficients(double *ei, double *cb, double *B, int Ni);
void blockatom_environment_descriptors(double *ei, double *cb, double *B, int Ni);
@ -89,79 +91,79 @@ public:
void saveintmatrix2binfile(std::string filename, int *A, int nrows, int ncols);
void savedatafordebugging();
protected:
protected:
class EAPOD *fastpodptr;
virtual void allocate();
void grow_atoms(int Ni);
void grow_pairs(int Nij);
int atomBlockSize; // size of each atom block
int nAtomBlocks; // number of atoms blocks
int atomBlocks[101]; // atom blocks
int atomBlockSize; // size of each atom block
int nAtomBlocks; // number of atoms blocks
int atomBlocks[101]; // atom blocks
int ni; // total number of atoms i
int nij; // total number of pairs (i,j)
int nimax; // maximum number of atoms i
int nijmax; // maximum number of pairs (i,j)
int ni; // total number of atoms i
int nij; // total number of pairs (i,j)
int nimax; // maximum number of atoms i
int nijmax; // maximum number of pairs (i,j)
int nelements; // number of elements
int onebody; // one-body descriptors
int besseldegree; // degree of Bessel functions
int inversedegree; // degree of inverse functions
int nbesselpars; // number of Bessel parameters
int nCoeffPerElement; // number of coefficients per element = (nl1 + Mdesc*nClusters)
int ns; // number of snapshots for radial basis functions
int nl1, nl2, nl3, nl4, nl23, nl33, nl34, nl44, nl; // number of local descriptors
int nrbf2, nrbf3, nrbf4, nrbfmax; // number of radial basis functions
int nabf3, nabf4; // number of angular basis functions
int K3, K4, Q4; // number of monomials
int nelements; // number of elements
int onebody; // one-body descriptors
int besseldegree; // degree of Bessel functions
int inversedegree; // degree of inverse functions
int nbesselpars; // number of Bessel parameters
int nCoeffPerElement; // number of coefficients per element = (nl1 + Mdesc*nClusters)
int ns; // number of snapshots for radial basis functions
int nl1, nl2, nl3, nl4, nl23, nl33, nl34, nl44, nl; // number of local descriptors
int nrbf2, nrbf3, nrbf4, nrbfmax; // number of radial basis functions
int nabf3, nabf4; // number of angular basis functions
int K3, K4, Q4; // number of monomials
// environmental variables
int nClusters; // number of environment clusters
int nComponents; // number of principal components
int Mdesc; // number of base descriptors
int nClusters; // number of environment clusters
int nComponents; // number of principal components
int Mdesc; // number of base descriptors
double rin; // inner cut-off radius
double rcut; // outer cut-off radius
double rmax; // rcut - rin
double rin; // inner cut-off radius
double rcut; // outer cut-off radius
double rmax; // rcut - rin
double *rij; // (xj - xi) for all pairs (I, J)
double *fij; // force for all pairs (I, J)
double *ei; // energy for each atom I
int *typeai; // types of atoms I only
int *numij; // number of pairs (I, J) for each atom I
int *idxi; // storing linear indices of atom I for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
double *rij; // (xj - xi) for all pairs (I, J)
double *fij; // force for all pairs (I, J)
double *ei; // energy for each atom I
int *typeai; // types of atoms I only
int *numij; // number of pairs (I, J) for each atom I
int *idxi; // storing linear indices of atom I for all pairs (I, J)
int *ai; // IDs of atoms I for all pairs (I, J)
int *aj; // IDs of atoms J for all pairs (I, J)
int *ti; // types of atoms I for all pairs (I, J)
int *tj; // types of atoms J for all pairs (I, J)
double besselparams[3];
double *Phi ; // eigenvectors matrix ns x ns
double *rbf; // radial basis functions nij x nrbfmax
double *rbfx; // x-derivatives of radial basis functions nij x nrbfmax
double *rbfy; // y-derivatives of radial basis functions nij x nrbfmax
double *rbfz; // z-derivatives of radial basis functions nij x nrbfmax
double *abf; // angular basis functions nij x K3
double *abfx; // x-derivatives of angular basis functions nij x K3
double *abfy; // y-derivatives of angular basis functions nij x K3
double *abfz; // z-derivatives of angular basis functions nij x K3
double *abftm ; // angular basis functions 4 x K3
double *sumU; // sum of radial basis functions ni x K3 x nrbfmax x nelements
double *forcecoeff; // force coefficients ni x K3 x nrbfmax x nelements
double *Proj; // PCA Projection matrix
double *Centroids; // centroids of the clusters
double *bd; // base descriptors ni x Mdesc
double *cb; // force coefficients for base descriptors ni x Mdesc
double *pd; // environment probability descriptors ni x nClusters
double *bdd; // base descriptors derivatives 3 x nij x Mdesc
double *pdd; // environment probability descriptors derivatives 3 x nij x nClusters
double *coefficients; // coefficients nCoeffPerElement x nelements
int *pq3, *pn3, *pc3; // arrays to compute 3-body angular basis functions
int *pa4, *pb4, *pc4; // arrays to compute 4-body angular basis functions
int *ind33l, *ind33r; // nl33
int *ind34l, *ind34r; // nl34
int *ind44l, *ind44r; // nl44
double *Phi; // eigenvectors matrix ns x ns
double *rbf; // radial basis functions nij x nrbfmax
double *rbfx; // x-derivatives of radial basis functions nij x nrbfmax
double *rbfy; // y-derivatives of radial basis functions nij x nrbfmax
double *rbfz; // z-derivatives of radial basis functions nij x nrbfmax
double *abf; // angular basis functions nij x K3
double *abfx; // x-derivatives of angular basis functions nij x K3
double *abfy; // y-derivatives of angular basis functions nij x K3
double *abfz; // z-derivatives of angular basis functions nij x K3
double *abftm; // angular basis functions 4 x K3
double *sumU; // sum of radial basis functions ni x K3 x nrbfmax x nelements
double *forcecoeff; // force coefficients ni x K3 x nrbfmax x nelements
double *Proj; // PCA Projection matrix
double *Centroids; // centroids of the clusters
double *bd; // base descriptors ni x Mdesc
double *cb; // force coefficients for base descriptors ni x Mdesc
double *pd; // environment probability descriptors ni x nClusters
double *bdd; // base descriptors derivatives 3 x nij x Mdesc
double *pdd; // environment probability descriptors derivatives 3 x nij x nClusters
double *coefficients; // coefficients nCoeffPerElement x nelements
int *pq3, *pn3, *pc3; // arrays to compute 3-body angular basis functions
int *pa4, *pb4, *pc4; // arrays to compute 4-body angular basis functions
int *ind33l, *ind33r; // nl33
int *ind34l, *ind34r; // nl34
int *ind44l, *ind44r; // nl44
int *elemindex;
bool peratom_warn; // print warning about missing per-atom energies or stresses