git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5942 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -339,17 +339,18 @@ void PairGayBerne::init_style()
|
||||
|
||||
// per-type shape precalculations
|
||||
// require that atom shapes are identical within each type
|
||||
// if shape = 0 for point particle, set shape = 1 as required by Gay-Berne
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
if (!atom->shape_consistency(i,shape1[i][0],shape1[i][1],shape1[i][2]))
|
||||
error->all("Pair gayberne requires atoms with same type have same shape");
|
||||
if (setwell[i]) {
|
||||
shape2[i][0] = shape1[i][0]*shape1[i][0];
|
||||
shape2[i][1] = shape1[i][1]*shape1[i][1];
|
||||
shape2[i][2] = shape1[i][2]*shape1[i][2];
|
||||
lshape[i] = (shape1[i][0]*shape1[i][1]+shape1[i][2]*shape1[i][2]) *
|
||||
sqrt(shape1[i][0]*shape1[i][1]);
|
||||
}
|
||||
if (shape1[i][0] == 0.0)
|
||||
shape1[i][0] = shape1[i][1] = shape1[i][2] = 1.0;
|
||||
shape2[i][0] = shape1[i][0]*shape1[i][0];
|
||||
shape2[i][1] = shape1[i][1]*shape1[i][1];
|
||||
shape2[i][2] = shape1[i][2]*shape1[i][2];
|
||||
lshape[i] = (shape1[i][0]*shape1[i][1]+shape1[i][2]*shape1[i][2]) *
|
||||
sqrt(shape1[i][0]*shape1[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -139,17 +139,18 @@ void PairGayBerneGPU::init_style()
|
||||
|
||||
// per-type shape precalculations
|
||||
// require that atom shapes are identical within each type
|
||||
// if shape = 0 for point particle, set shape = 1 as required by Gay-Berne
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++) {
|
||||
if (!atom->shape_consistency(i,shape1[i][0],shape1[i][1],shape1[i][2]))
|
||||
error->all("Pair gayberne requires atoms with same type have same shape");
|
||||
if (setwell[i]) {
|
||||
shape2[i][0] = shape1[i][0]*shape1[i][0];
|
||||
shape2[i][1] = shape1[i][1]*shape1[i][1];
|
||||
shape2[i][2] = shape1[i][2]*shape1[i][2];
|
||||
lshape[i] = (shape1[i][0]*shape1[i][1]+shape1[i][2]*shape1[i][2]) *
|
||||
sqrt(shape1[i][0]*shape1[i][1]);
|
||||
}
|
||||
if (shape1[i][0] == 0.0)
|
||||
shape1[i][0] = shape1[i][1] = shape1[i][2] = 1.0;
|
||||
shape2[i][0] = shape1[i][0]*shape1[i][0];
|
||||
shape2[i][1] = shape1[i][1]*shape1[i][1];
|
||||
shape2[i][2] = shape1[i][2]*shape1[i][2];
|
||||
lshape[i] = (shape1[i][0]*shape1[i][1]+shape1[i][2]*shape1[i][2]) *
|
||||
sqrt(shape1[i][0]*shape1[i][1]);
|
||||
}
|
||||
|
||||
// Repeat cutsq calculation because done after call to init_style
|
||||
@ -452,5 +453,3 @@ void PairGayBerneGPU::cpu_compute(int *nbors, int start, int eflag, int vflag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user