git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7003 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-09-23 18:06:55 +00:00
parent 2d99de131d
commit 19e8c92a90
468 changed files with 4628 additions and 5204 deletions

View File

@ -35,7 +35,7 @@ enum{NONE,NEIGH,PAIR,BOND,ANGLE,DIHEDRAL,IMPROPER};
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg)
{
if (narg < 4) error->all("Illegal compute property/local command");
if (narg < 4) error->all(FLERR,"Illegal compute property/local command");
local_flag = 1;
nvalues = narg - 3;
@ -53,127 +53,127 @@ 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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
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("Compute property/local cannot use these inputs together");
error->all(FLERR,"Compute property/local cannot use these inputs together");
kindflag = IMPROPER;
} else error->all("Invalid keyword in compute property/local command");
} else error->all(FLERR,"Invalid keyword in compute property/local command");
}
// error check
if (kindflag == BOND && atom->avec->bonds_allow == 0)
error->all("Compute property/local for property that isn't allocated");
error->all(FLERR,"Compute property/local for property that isn't allocated");
if (kindflag == ANGLE && atom->avec->angles_allow == 0)
error->all("Compute property/local for property that isn't allocated");
error->all(FLERR,"Compute property/local for property that isn't allocated");
if (kindflag == DIHEDRAL && atom->avec->dihedrals_allow == 0)
error->all("Compute property/local for property that isn't allocated");
error->all(FLERR,"Compute property/local for property that isn't allocated");
if (kindflag == IMPROPER && atom->avec->impropers_allow == 0)
error->all("Compute property/local for property that isn't allocated");
error->all(FLERR,"Compute property/local for property that isn't allocated");
nmax = 0;
vector = NULL;
@ -197,9 +197,9 @@ void ComputePropertyLocal::init()
{
if (kindflag == NEIGH || kindflag == PAIR) {
if (force->pair == NULL)
error->all("No pair style is defined for compute property/local");
error->all(FLERR,"No pair style is defined for compute property/local");
if (force->pair->single_enable == 0)
error->all("Pair style does not support compute property/local");
error->all(FLERR,"Pair style does not support compute property/local");
}
// for NEIGH/PAIR need an occasional half neighbor list