forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4320 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
8190e79a1c
commit
9600268de9
|
@ -1336,7 +1336,7 @@ void Atom::first_reorder()
|
|||
|
||||
void Atom::sort()
|
||||
{
|
||||
int i,m,n,ix,iy,iz,ibin,empty,ndone;
|
||||
int i,m,n,ix,iy,iz,ibin,empty;
|
||||
|
||||
// re-setup sort bins if needed
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ void ChangeBox::command(int narg, char **arg)
|
|||
int style;
|
||||
if (strcmp(arg[0],"ortho") == 0) style = ORTHO;
|
||||
else if (strcmp(arg[0],"triclinic") == 0) style = TRICLINIC;
|
||||
else error->all("Illegal change_box command");
|
||||
|
||||
if (style == ORTHO && domain->triclinic == 0)
|
||||
error->all("Change_box operation is invalid");
|
||||
|
|
|
@ -102,12 +102,14 @@ double ComputeERotateSphere::compute_scalar()
|
|||
omega[i][2]*omega[i][2]) * radius[i]*radius[i]*rmass[i];
|
||||
} else {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit)
|
||||
if (mask[i] & groupbit) {
|
||||
itype = type[i];
|
||||
erotate += (omega[i][0]*omega[i][0] + omega[i][1]*omega[i][1] +
|
||||
omega[i][2]*omega[i][2]) *
|
||||
radius[i]*radius[i]*mass[itype];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (rmass) {
|
||||
for (i = 0; i < nlocal; i++)
|
||||
|
|
|
@ -117,7 +117,6 @@ int ComputeImproperLocal::compute_impropers(int flag)
|
|||
int **improper_atom2 = atom->improper_atom2;
|
||||
int **improper_atom3 = atom->improper_atom3;
|
||||
int **improper_atom4 = atom->improper_atom4;
|
||||
int **improper_type = atom->improper_type;
|
||||
int *tag = atom->tag;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
|
|
@ -281,7 +281,7 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
|
|||
{
|
||||
int i,j,m,n,ii,jj,inum,jnum,itype,jtype;
|
||||
double xtmp,ytmp,ztmp,delx,dely,delz;
|
||||
double rsq,eng,fpair,factor_coul,factor_lj;
|
||||
double rsq,factor_coul,factor_lj;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double **x = atom->x;
|
||||
|
@ -306,7 +306,6 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
|
|||
// loop over neighbors of my atoms
|
||||
// skip if I or J are not in group
|
||||
|
||||
Pair *pair = force->pair;
|
||||
double **cutsq = force->pair->cutsq;
|
||||
|
||||
m = n = 0;
|
||||
|
@ -453,7 +452,6 @@ int ComputePropertyLocal::count_dihedrals(int flag)
|
|||
int **dihedral_atom2 = atom->dihedral_atom2;
|
||||
int **dihedral_atom3 = atom->dihedral_atom3;
|
||||
int **dihedral_atom4 = atom->dihedral_atom4;
|
||||
int **dihedral_type = atom->dihedral_type;
|
||||
int *tag = atom->tag;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
@ -497,7 +495,6 @@ int ComputePropertyLocal::count_impropers(int flag)
|
|||
int **improper_atom2 = atom->improper_atom2;
|
||||
int **improper_atom3 = atom->improper_atom3;
|
||||
int **improper_atom4 = atom->improper_atom4;
|
||||
int **improper_type = atom->improper_type;
|
||||
int *tag = atom->tag;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
|
|
@ -171,7 +171,6 @@ double ComputeTempProfile::compute_scalar()
|
|||
|
||||
bin_average();
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double *mass = atom->mass;
|
||||
double *rmass = atom->rmass;
|
||||
|
@ -215,7 +214,6 @@ void ComputeTempProfile::compute_vector()
|
|||
|
||||
bin_average();
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double *mass = atom->mass;
|
||||
double *rmass = atom->rmass;
|
||||
|
@ -277,7 +275,6 @@ void ComputeTempProfile::remove_bias(int i, double *v)
|
|||
|
||||
void ComputeTempProfile::remove_bias_all()
|
||||
{
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
@ -367,7 +364,6 @@ void ComputeTempProfile::bin_average()
|
|||
|
||||
// sum each particle's velocity to appropriate bin
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
|
|
@ -481,10 +481,6 @@ void ReadRestart::header()
|
|||
}
|
||||
}
|
||||
|
||||
int flag = 0;
|
||||
if ((xperiodic != domain->xperiodic || yperiodic != domain->yperiodic ||
|
||||
zperiodic != domain->zperiodic)) flag = 1;
|
||||
|
||||
domain->boundary[0][0] = boundary[0][0];
|
||||
domain->boundary[0][1] = boundary[0][1];
|
||||
domain->boundary[1][0] = boundary[1][0];
|
||||
|
|
|
@ -181,8 +181,6 @@ int Region::dynamic_check()
|
|||
|
||||
int Region::match(double x, double y, double z)
|
||||
{
|
||||
double a[3],b[3],c[3],d[3];
|
||||
|
||||
if (dynamic) {
|
||||
double delta = (update->ntimestep - time_origin) * dt;
|
||||
if (dynamic == VELOCITY) {
|
||||
|
|
|
@ -197,7 +197,6 @@ int RegBlock::surface_interior(double *x, double cutoff)
|
|||
int RegBlock::surface_exterior(double *x, double cutoff)
|
||||
{
|
||||
double xp,yp,zp;
|
||||
double delta;
|
||||
|
||||
// x is far enough from block that there is no contact
|
||||
// x is interior to block
|
||||
|
|
|
@ -262,18 +262,18 @@ int RegCone::surface_interior(double *x, double cutoff)
|
|||
}
|
||||
|
||||
} else if (axis == 'y') {
|
||||
delx = x[0] - c1;
|
||||
delz = x[2] - c2;
|
||||
r = sqrt(delx*delx + delz*delz);
|
||||
del1 = x[0] - c1;
|
||||
del2 = x[2] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
currentradius = radiuslo + (x[1]-lo)*(radiushi-radiuslo)/(hi-lo);
|
||||
|
||||
// x is exterior to cone
|
||||
// y is exterior to cone
|
||||
|
||||
if (r > currentradius || x[1] < lo || x[1] > hi) return 0;
|
||||
|
||||
// x is interior to cone or on its surface
|
||||
// surflo = pt on outer circle of bottom end plane, same dir as x vs axis
|
||||
// surfhi = pt on outer circle of top end plane, same dir as x vs axis
|
||||
// y is interior to cone or on its surface
|
||||
// surflo = pt on outer circle of bottom end plane, same dir as y vs axis
|
||||
// surfhi = pt on outer circle of top end plane, same dir as y vs axis
|
||||
|
||||
if (r > 0.0) {
|
||||
surflo[0] = c1 + del1*radiuslo/r;
|
||||
|
@ -312,18 +312,18 @@ int RegCone::surface_interior(double *x, double cutoff)
|
|||
}
|
||||
|
||||
} else {
|
||||
delx = x[0] - c1;
|
||||
dely = x[1] - c2;
|
||||
r = sqrt(delx*delx + dely*dely);
|
||||
del1 = x[0] - c1;
|
||||
del2 = x[1] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
currentradius = radiuslo + (x[2]-lo)*(radiushi-radiuslo)/(hi-lo);
|
||||
|
||||
// x is exterior to cone
|
||||
|
||||
if (r > currentradius || x[2] < lo || x[2] > hi) return 0;
|
||||
|
||||
// x is interior to cone or on its surface
|
||||
// surflo = pt on outer circle of bottom end plane, same dir as x vs axis
|
||||
// surfhi = pt on outer circle of top end plane, same dir as x vs axis
|
||||
// z is interior to cone or on its surface
|
||||
// surflo = pt on outer circle of bottom end plane, same dir as z vs axis
|
||||
// surfhi = pt on outer circle of top end plane, same dir as z vs axis
|
||||
|
||||
if (r > 0.0) {
|
||||
surflo[0] = c1 + del1*radiuslo/r;
|
||||
|
@ -427,17 +427,17 @@ int RegCone::surface_exterior(double *x, double cutoff)
|
|||
r = sqrt(del1*del1 + del2*del2);
|
||||
currentradius = radiuslo + (x[1]-lo)*(radiushi-radiuslo)/(hi-lo);
|
||||
|
||||
// x is far enough from cone that there is no contact
|
||||
// x is interior to cone
|
||||
// y is far enough from cone that there is no contact
|
||||
// y is interior to cone
|
||||
|
||||
if (r >= maxradius+cutoff ||
|
||||
x[1] <= lo-cutoff || x[1] >= hi+cutoff) return 0;
|
||||
if (r < currentradius && x[1] > lo && x[1] < hi) return 0;
|
||||
|
||||
// x is exterior to cone or on its surface
|
||||
// corner1234 = 4 corner pts of half trapezoid = cone surf in plane of x
|
||||
// y is exterior to cone or on its surface
|
||||
// corner1234 = 4 corner pts of half trapezoid = cone surf in plane of y
|
||||
// project x to 3 line segments in half trapezoid (4th is axis of cone)
|
||||
// nearest = point on surface of cone that x is closest to
|
||||
// nearest = point on surface of cone that y is closest to
|
||||
// could be edge of cone
|
||||
// do not add contact point if r >= cutoff
|
||||
|
||||
|
@ -472,17 +472,17 @@ int RegCone::surface_exterior(double *x, double cutoff)
|
|||
r = sqrt(del1*del1 + del2*del2);
|
||||
currentradius = radiuslo + (x[2]-lo)*(radiushi-radiuslo)/(hi-lo);
|
||||
|
||||
// x is far enough from cone that there is no contact
|
||||
// x is interior to cone
|
||||
// z is far enough from cone that there is no contact
|
||||
// z is interior to cone
|
||||
|
||||
if (r >= maxradius+cutoff ||
|
||||
x[2] <= lo-cutoff || x[2] >= hi+cutoff) return 0;
|
||||
if (r < currentradius && x[2] > lo && x[2] < hi) return 0;
|
||||
|
||||
// x is exterior to cone or on its surface
|
||||
// corner1234 = 4 corner pts of half trapezoid = cone surf in plane of x
|
||||
// z is exterior to cone or on its surface
|
||||
// corner1234 = 4 corner pts of half trapezoid = cone surf in plane of z
|
||||
// project x to 3 line segments in half trapezoid (4th is axis of cone)
|
||||
// nearest = point on surface of cone that x is closest to
|
||||
// nearest = point on surface of cone that z is closest to
|
||||
// could be edge of cone
|
||||
// do not add contact point if r >= cutoff
|
||||
|
||||
|
|
|
@ -231,11 +231,11 @@ int RegCylinder::surface_interior(double *x, double cutoff)
|
|||
del2 = x[2] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
|
||||
// x is exterior to cylinder
|
||||
// y is exterior to cylinder
|
||||
|
||||
if (r > radius || x[1] < lo || x[1] > hi) return 0;
|
||||
|
||||
// x is interior to cylinder or on its surface
|
||||
// y is interior to cylinder or on its surface
|
||||
|
||||
delta = radius - r;
|
||||
if (delta < cutoff && r > 0.0) {
|
||||
|
@ -265,11 +265,11 @@ int RegCylinder::surface_interior(double *x, double cutoff)
|
|||
del2 = x[1] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
|
||||
// x is exterior to cylinder
|
||||
// z is exterior to cylinder
|
||||
|
||||
if (r > radius || x[2] < lo || x[2] > hi) return 0;
|
||||
|
||||
// x is interior to cylinder or on its surface
|
||||
// z is interior to cylinder or on its surface
|
||||
|
||||
delta = radius - r;
|
||||
if (delta < cutoff && r > 0.0) {
|
||||
|
@ -306,7 +306,7 @@ int RegCylinder::surface_interior(double *x, double cutoff)
|
|||
|
||||
int RegCylinder::surface_exterior(double *x, double cutoff)
|
||||
{
|
||||
double del1,del2,r,delta;
|
||||
double del1,del2,r;
|
||||
double xp,yp,zp;
|
||||
|
||||
if (axis == 'x') {
|
||||
|
@ -345,13 +345,13 @@ int RegCylinder::surface_exterior(double *x, double cutoff)
|
|||
del2 = x[2] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
|
||||
// x is far enough from cylinder that there is no contact
|
||||
// x is interior to cylinder
|
||||
// y is far enough from cylinder that there is no contact
|
||||
// y is interior to cylinder
|
||||
|
||||
if (r >= radius+cutoff || x[1] <= lo-cutoff || x[1] >= hi+cutoff) return 0;
|
||||
if (r < radius && x[1] > lo && x[1] < hi) return 0;
|
||||
|
||||
// x is exterior to cylinder or on its surface
|
||||
// y is exterior to cylinder or on its surface
|
||||
// xp,yp,zp = point on surface of cylinder that x is closest to
|
||||
// could be edge of cylinder
|
||||
// do not add contact point if r >= cutoff
|
||||
|
@ -376,13 +376,13 @@ int RegCylinder::surface_exterior(double *x, double cutoff)
|
|||
del2 = x[1] - c2;
|
||||
r = sqrt(del1*del1 + del2*del2);
|
||||
|
||||
// x is far enough from cylinder that there is no contact
|
||||
// x is interior to cylinder
|
||||
// z is far enough from cylinder that there is no contact
|
||||
// z is interior to cylinder
|
||||
|
||||
if (r >= radius+cutoff || x[2] <= lo-cutoff || x[2] >= hi+cutoff) return 0;
|
||||
if (r < radius && x[2] > lo && x[2] < hi) return 0;
|
||||
|
||||
// x is exterior to cylinder or on its surface
|
||||
// z is exterior to cylinder or on its surface
|
||||
// xp,yp,zp = point on surface of cylinder that x is closest to
|
||||
// could be edge of cylinder
|
||||
// do not add contact point if r >= cutoff
|
||||
|
|
|
@ -304,7 +304,7 @@ int RegPrism::surface_interior(double *x, double cutoff)
|
|||
int RegPrism::surface_exterior(double *x, double cutoff)
|
||||
{
|
||||
int i;
|
||||
double dot,delta;
|
||||
double dot;
|
||||
double *corner;
|
||||
double xp,yp,zp;
|
||||
|
||||
|
|
|
@ -705,7 +705,6 @@ void Special::dihedral_trim()
|
|||
MPI_Request request;
|
||||
MPI_Status status;
|
||||
|
||||
int *tag = atom->tag;
|
||||
int *num_dihedral = atom->num_dihedral;
|
||||
int **dihedral_atom1 = atom->dihedral_atom1;
|
||||
int **dihedral_atom4 = atom->dihedral_atom4;
|
||||
|
|
|
@ -176,7 +176,7 @@ void Temper::command(int narg, char **arg)
|
|||
// setup tempering runs
|
||||
|
||||
int i,which,partner,swap,partner_set_temp,partner_world;
|
||||
double pe,pe_partner,ke,boltz_factor,new_temp;
|
||||
double pe,pe_partner,boltz_factor,new_temp;
|
||||
MPI_Status status;
|
||||
|
||||
if (me_universe == 0 && universe->uscreen)
|
||||
|
|
Loading…
Reference in New Issue