energy is not an array
This commit is contained in:
@ -897,9 +897,9 @@ void PairRANN::compute(int eflag, int vflag)
|
||||
}
|
||||
//run fingerprints through network
|
||||
if (dospin) {
|
||||
propagateforwardspin(&energy,force,fm,ii,jnum);
|
||||
propagateforwardspin(energy,force,fm,ii,jnum);
|
||||
} else {
|
||||
propagateforward(&energy,force,ii,jnum);
|
||||
propagateforward(energy,force,ii,jnum);
|
||||
}
|
||||
}
|
||||
if (vflag_fdotr) virial_fdotr_compute();
|
||||
@ -1071,7 +1071,7 @@ void PairRANN::screening(int ii,int sid,int jnum)
|
||||
|
||||
|
||||
//Called by getproperties. Propagate features and dfeatures through network. Updates force and energy
|
||||
void PairRANN::propagateforward(double *energy,double **force,int ii,int jnum) {
|
||||
void PairRANN::propagateforward(double &energy,double **force,int ii,int jnum) {
|
||||
int i,j,k,jj,j1,itype,i1;
|
||||
int *ilist;
|
||||
ilist = listfull->ilist;
|
||||
@ -1097,7 +1097,7 @@ void PairRANN::propagateforward(double *energy,double **force,int ii,int jnum) {
|
||||
dsum1 = activation[itype][i]->dactivation_function(sum[j]);
|
||||
sum[j] = activation[itype][i]->activation_function(sum[j]);
|
||||
if (i==L-1) {
|
||||
energy[j] = sum[j];
|
||||
energy = sum[j];
|
||||
if (eflag_atom) eatom[i1]=sum[j];
|
||||
if (eflag_global) eng_vdwl +=sum[j];
|
||||
}
|
||||
@ -1148,7 +1148,7 @@ void PairRANN::propagateforward(double *energy,double **force,int ii,int jnum) {
|
||||
}
|
||||
|
||||
//Called by getproperties. Propagate features and dfeatures through network. Updates force and energy
|
||||
void PairRANN::propagateforwardspin(double * energy,double **force,double **fm,int ii,int jnum) {
|
||||
void PairRANN::propagateforwardspin(double &energy,double **force,double **fm,int ii,int jnum) {
|
||||
int i,j,k,jj,j1,itype,i1;
|
||||
int *ilist;
|
||||
ilist = listfull->ilist;
|
||||
@ -1174,7 +1174,7 @@ void PairRANN::propagateforwardspin(double * energy,double **force,double **fm,i
|
||||
dsum1 = activation[itype][i]->dactivation_function(sum[j]);
|
||||
sum[j] = activation[itype][i]->activation_function(sum[j]);
|
||||
if (i==L-1) {
|
||||
energy[j] = sum[j];
|
||||
energy = sum[j];
|
||||
if (eflag_atom) eatom[i1]=sum[j];
|
||||
if (eflag_global) eng_vdwl +=sum[j];
|
||||
}
|
||||
|
||||
@ -158,9 +158,9 @@ class PairRANN : public Pair {
|
||||
void read_mass(const std::vector<std::string> &, const std::vector<std::string> &, const char *,
|
||||
int);
|
||||
bool check_potential(); //after finishing reading potential file
|
||||
void propagateforward(double *, double **, int,
|
||||
void propagateforward(double &, double **, int,
|
||||
int); //called by compute to get force and energy
|
||||
void propagateforwardspin(double *, double **, double **, int,
|
||||
void propagateforwardspin(double &, double **, double **, int,
|
||||
int); //called by compute to get force and energy
|
||||
void screening(int, int, int);
|
||||
void cull_neighbor_list(int *, int, int);
|
||||
|
||||
Reference in New Issue
Block a user