git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8226 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
@ -52,113 +52,113 @@ ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
if (strcmp(arg[iarg],"natom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_patom1;
|
||||
if (kindflag != NONE && kindflag != NEIGH)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != NEIGH)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = NEIGH;
|
||||
} else if (strcmp(arg[iarg],"natom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_patom2;
|
||||
if (kindflag != NONE && kindflag != NEIGH)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != NEIGH)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = NEIGH;
|
||||
|
||||
} else if (strcmp(arg[iarg],"patom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_patom1;
|
||||
if (kindflag != NONE && kindflag != PAIR)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != PAIR)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = PAIR;
|
||||
} else if (strcmp(arg[iarg],"patom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_patom2;
|
||||
if (kindflag != NONE && kindflag != PAIR)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != PAIR)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = PAIR;
|
||||
|
||||
} else if (strcmp(arg[iarg],"batom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_batom1;
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = BOND;
|
||||
} else if (strcmp(arg[iarg],"batom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_batom2;
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = BOND;
|
||||
} else if (strcmp(arg[iarg],"btype") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_btype;
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != BOND)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = BOND;
|
||||
|
||||
} else if (strcmp(arg[iarg],"aatom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_aatom1;
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = ANGLE;
|
||||
} else if (strcmp(arg[iarg],"aatom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_aatom2;
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = ANGLE;
|
||||
} else if (strcmp(arg[iarg],"aatom3") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_aatom3;
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = ANGLE;
|
||||
} else if (strcmp(arg[iarg],"atype") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_atype;
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != ANGLE)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = ANGLE;
|
||||
|
||||
} else if (strcmp(arg[iarg],"datom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_datom1;
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = DIHEDRAL;
|
||||
} else if (strcmp(arg[iarg],"datom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_datom2;
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = DIHEDRAL;
|
||||
} else if (strcmp(arg[iarg],"datom3") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_datom3;
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = DIHEDRAL;
|
||||
} else if (strcmp(arg[iarg],"datom4") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_datom4;
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = DIHEDRAL;
|
||||
} else if (strcmp(arg[iarg],"dtype") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_dtype;
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != DIHEDRAL)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = DIHEDRAL;
|
||||
|
||||
} else if (strcmp(arg[iarg],"iatom1") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_iatom1;
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = IMPROPER;
|
||||
} else if (strcmp(arg[iarg],"iatom2") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_iatom2;
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = IMPROPER;
|
||||
} else if (strcmp(arg[iarg],"iatom3") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_iatom3;
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = IMPROPER;
|
||||
} else if (strcmp(arg[iarg],"iatom4") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_iatom4;
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = IMPROPER;
|
||||
} else if (strcmp(arg[iarg],"itype") == 0) {
|
||||
pack_choice[i] = &ComputePropertyLocal::pack_itype;
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
if (kindflag != NONE && kindflag != IMPROPER)
|
||||
error->all(FLERR,"Compute property/local cannot use these inputs together");
|
||||
kindflag = IMPROPER;
|
||||
|
||||
} else error->all(FLERR,"Invalid keyword in compute property/local command");
|
||||
@ -196,7 +196,7 @@ ComputePropertyLocal::~ComputePropertyLocal()
|
||||
void ComputePropertyLocal::init()
|
||||
{
|
||||
if (kindflag == NEIGH || kindflag == PAIR) {
|
||||
if (force->pair == NULL)
|
||||
if (force->pair == NULL)
|
||||
error->all(FLERR,"No pair style is defined for compute property/local");
|
||||
if (force->pair->single_enable == 0)
|
||||
error->all(FLERR,"Pair style does not support compute property/local");
|
||||
@ -333,8 +333,8 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag)
|
||||
if (forceflag && rsq >= cutsq[itype][jtype]) continue;
|
||||
|
||||
if (allflag) {
|
||||
indices[m][0] = tag[i];
|
||||
indices[m][1] = tag[j];
|
||||
indices[m][0] = tag[i];
|
||||
indices[m][1] = tag[j];
|
||||
}
|
||||
m++;
|
||||
}
|
||||
@ -374,8 +374,8 @@ int ComputePropertyLocal::count_bonds(int flag)
|
||||
if (bond_type[atom1][i] == 0) continue;
|
||||
|
||||
if (flag) {
|
||||
indices[m][0] = atom1;
|
||||
indices[m][1] = i;
|
||||
indices[m][0] = atom1;
|
||||
indices[m][1] = i;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
@ -418,8 +418,8 @@ int ComputePropertyLocal::count_angles(int flag)
|
||||
if (angle_type[atom2][i] == 0) continue;
|
||||
|
||||
if (flag) {
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
@ -461,8 +461,8 @@ int ComputePropertyLocal::count_dihedrals(int flag)
|
||||
if (atom4 < 0 || !(mask[atom4] & groupbit)) continue;
|
||||
|
||||
if (flag) {
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
@ -504,8 +504,8 @@ int ComputePropertyLocal::count_impropers(int flag)
|
||||
if (atom4 < 0 || !(mask[atom4] & groupbit)) continue;
|
||||
|
||||
if (flag) {
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
indices[m][0] = atom2;
|
||||
indices[m][1] = i;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user