Skip to content
Snippets Groups Projects
Commit 9ef1bfe8 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

whitespace cleanup

parent 76b85e4d
No related branches found
No related tags found
No related merge requests found
...@@ -50,10 +50,10 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) : ...@@ -50,10 +50,10 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
" of arguments"); " of arguments");
// Arguments are: sigma cutoff avg yes/no cutoff2 local yes/no // Arguments are: sigma cutoff avg yes/no cutoff2 local yes/no
// sigma is the gaussian width // sigma is the gaussian width
// cutoff is the cutoff for the calculation of g(r) // cutoff is the cutoff for the calculation of g(r)
// avg is optional and allows averaging the pair entropy over neighbors // avg is optional and allows averaging the pair entropy over neighbors
// the next argument should be yes or no // the next argument should be yes or no
// cutoff2 is the cutoff for the averaging // cutoff2 is the cutoff for the averaging
// local is optional and allows using the local density to normalize // local is optional and allows using the local density to normalize
// the g(r) // the g(r)
...@@ -102,8 +102,8 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) : ...@@ -102,8 +102,8 @@ ComputePairEntropyAtom(LAMMPS *lmp, int narg, char **arg) :
// Number of bins above and below the central one that will be // Number of bins above and below the central one that will be
// considered as affected by the gaussian kernel // considered as affected by the gaussian kernel
// 2 seems a good compromise between speed and good mollification // 2 seems a good compromise between speed and good mollification
deltabin = 2; deltabin = 2;
deltar = sigma; deltar = sigma;
peratom_flag = 1; peratom_flag = 1;
size_peratom_cols = 0; size_peratom_cols = 0;
} }
...@@ -124,9 +124,9 @@ void ComputePairEntropyAtom::init() ...@@ -124,9 +124,9 @@ void ComputePairEntropyAtom::init()
error->all(FLERR,"Compute centro/atom requires a pair style be" error->all(FLERR,"Compute centro/atom requires a pair style be"
" defined"); " defined");
if ( (cutoff+cutoff2) > (force->pair->cutforce + neighbor->skin) ) if ( (cutoff+cutoff2) > (force->pair->cutforce + neighbor->skin) )
{ {
error->all(FLERR,"Compute pentropy/atom cutoff is longer than the" error->all(FLERR,"Compute pentropy/atom cutoff is longer than the"
" pairwise cutoff. Increase the neighbor list skin" " pairwise cutoff. Increase the neighbor list skin"
" distance."); " distance.");
} }
...@@ -220,16 +220,16 @@ void ComputePairEntropyAtom::compute_peratom() ...@@ -220,16 +220,16 @@ void ComputePairEntropyAtom::compute_peratom()
// If local density is used, calculate it // If local density is used, calculate it
if (local_flag) { if (local_flag) {
double neigh_cutoff = force->pair->cutforce + neighbor->skin; double neigh_cutoff = force->pair->cutforce + neighbor->skin;
double volume = double volume =
(4./3.)*MY_PI*neigh_cutoff*neigh_cutoff*neigh_cutoff; (4./3.)*MY_PI*neigh_cutoff*neigh_cutoff*neigh_cutoff;
density = jnum / volume; density = jnum / volume;
} }
// calculate kernel normalization // calculate kernel normalization
// Normalization of g(r) // Normalization of g(r)
double normConstantBase = 4*MY_PI*density; double normConstantBase = 4*MY_PI*density;
// Normalization of gaussian // Normalization of gaussian
normConstantBase *= sqrt(2.*MY_PI)*sigma; normConstantBase *= sqrt(2.*MY_PI)*sigma;
double invNormConstantBase = 1./normConstantBase; double invNormConstantBase = 1./normConstantBase;
// loop over list of all neighbors within force cutoff // loop over list of all neighbors within force cutoff
...@@ -259,7 +259,7 @@ void ComputePairEntropyAtom::compute_peratom() ...@@ -259,7 +259,7 @@ void ComputePairEntropyAtom::compute_peratom()
for(int k=minbin;k<maxbin+1;k++) { for(int k=minbin;k<maxbin+1;k++) {
double invNormKernel=invNormConstantBase/rbinsq[k]; double invNormKernel=invNormConstantBase/rbinsq[k];
double distance = r - rbin[k]; double distance = r - rbin[k];
gofr[k] += invNormKernel*exp(-distance*distance/sigmasq2); gofr[k] += invNormKernel*exp(-distance*distance/sigmasq2);
} }
} }
} }
...@@ -298,7 +298,7 @@ void ComputePairEntropyAtom::compute_peratom() ...@@ -298,7 +298,7 @@ void ComputePairEntropyAtom::compute_peratom()
ztmp = x[i][2]; ztmp = x[i][2];
jlist = firstneigh[i]; jlist = firstneigh[i];
jnum = numneigh[i]; jnum = numneigh[i];
pair_entropy_avg[i] = pair_entropy[i]; pair_entropy_avg[i] = pair_entropy[i];
double counter = 1; double counter = 1;
...@@ -306,7 +306,7 @@ void ComputePairEntropyAtom::compute_peratom() ...@@ -306,7 +306,7 @@ void ComputePairEntropyAtom::compute_peratom()
for (jj = 0; jj < jnum; jj++) { for (jj = 0; jj < jnum; jj++) {
j = jlist[jj]; j = jlist[jj];
j &= NEIGHMASK; j &= NEIGHMASK;
delx = xtmp - x[j][0]; delx = xtmp - x[j][0];
dely = ytmp - x[j][1]; dely = ytmp - x[j][1];
delz = ztmp - x[j][2]; delz = ztmp - x[j][2];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment