Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Andrew Schultz
2019-06-19 18:52:47 -04:00
123 changed files with 9368 additions and 3009 deletions

View File

@ -157,6 +157,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
// this looks excessive
// the price of vectorization (all reactions in one command)?
memory->create(rxn_name,nreacts,MAXLINE,"bond/react:rxn_name");
memory->create(nevery,nreacts,"bond/react:nevery");
memory->create(cutsq,nreacts,2,"bond/react:cutsq");
memory->create(unreacted_mol,nreacts,"bond/react:unreacted_mol");
@ -207,8 +208,7 @@ FixBondReact::FixBondReact(LAMMPS *lmp, int narg, char **arg) :
iarg++;
iarg++; // read in reaction name here
//for example, rxn_name[rxn] = ...
rxn_name[rxn] = arg[iarg++];
int igroup = group->find(arg[iarg++]);
if (igroup == -1) error->all(FLERR,"Could not find fix group ID");
@ -1720,8 +1720,11 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
// bad molecule templates check
// if atoms change types, but aren't landlocked, that's bad
for (int i = 0; i < twomol->natoms; i++) {
if (twomol->type[i] != onemol->type[equivalences[i][1][myrxn]-1] && landlocked_atoms[i][myrxn] == 0)
error->one(FLERR,"Bond/react: Atom affected by reaction too close to template edge");
if (twomol->type[i] != onemol->type[equivalences[i][1][myrxn]-1] && landlocked_atoms[i][myrxn] == 0) {
char str[128];
snprintf(str,128,"Bond/react: Atom affected by reaction %s too close to template edge",rxn_name[myrxn]);
error->all(FLERR,str);
}
}
// additionally, if a bond changes type, but neither involved atom is landlocked, bad
@ -1737,7 +1740,9 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
onemol_batom = onemol->bond_atom[onemol_atomi-1][m];
if (onemol_batom == equivalences[twomol_atomj-1][1][myrxn]) {
if (twomol->bond_type[i][j] != onemol->bond_type[onemol_atomi-1][m]) {
error->one(FLERR,"Bond/react: Bond type affected by reaction too close to template edge");
char str[128];
snprintf(str,128,"Bond/react: Atom affected by reaction %s too close to template edge",rxn_name[myrxn]);
error->all(FLERR,str);
}
}
}
@ -1747,7 +1752,9 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
onemol_batom = onemol->bond_atom[onemol_atomj-1][m];
if (onemol_batom == equivalences[i][1][myrxn]) {
if (twomol->bond_type[i][j] != onemol->bond_type[onemol_atomj-1][m]) {
error->one(FLERR,"Bond/react: Bond type affected by reaction too close to template edge");
char str[128];
snprintf(str,128,"Bond/react: Atom affected by reaction %s too close to template edge",rxn_name[myrxn]);
error->all(FLERR,str);
}
}
}
@ -1763,7 +1770,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
int ii = reverse_equiv[i][1][myrxn] - 1;
for (int j = 0; j < twomol_nxspecial[ii][0]; j++) {
if (delete_atoms[equivalences[twomol_xspecial[ii][j]-1][1][myrxn]-1][myrxn] == 0) {
error->one(FLERR,"Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted");
error->all(FLERR,"Bond/react: A deleted atom cannot remain bonded to an atom that is not deleted");
}
}
}
@ -1774,7 +1781,7 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
for (int i = 0; i < twomol->natoms; i++) {
if (twomol_nxspecial[i][0] != onemol_nxspecial[equivalences[i][1][myrxn]-1][0] && landlocked_atoms[i][myrxn] == 0) {
char str[128];
sprintf(str,"Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type",myrxn+1);
snprintf(str,128,"Bond/react: Atom affected by reaction %s too close to template edge",rxn_name[myrxn]);
error->warning(FLERR,str);
break;
}

View File

@ -67,6 +67,7 @@ class FixBondReact : public Fix {
int *groupbits;
int rxnID; // integer ID for identifying current bond/react
char **rxn_name; // name of reaction
int *reaction_count;
int *reaction_count_total;
int nmax; // max num local atoms
@ -213,14 +214,14 @@ E: Bond/react: Unknown section in map file
Please ensure reaction map files are properly formatted.
E: Bond/react: Atom affected by reaction too close to template edge
E or W: Bond/react: Atom affected by reaction %s too close to template edge
This means an atom which changes type during the reaction is too close
to an 'edge' atom defined in the superimpose file. This could cause
incorrect assignment of bonds, angle, etc. Generally, this means you
must include more atoms in your templates, such that there are at
least two atoms between each atom involved in the reaction and an edge
atom.
This means an atom which changes type or connectivity during the
reaction is too close to an 'edge' atom defined in the superimpose
file. This could cause incorrect assignment of bonds, angle, etc.
Generally, this means you must include more atoms in your templates,
such that there are at least two atoms between each atom involved in
the reaction and an edge atom.
E: Bond/react: Fix bond/react needs ghost atoms from farther away
@ -233,11 +234,6 @@ E: Bond/react: A deleted atom cannot remain bonded to an atom that is not delete
Self-explanatory.
W: Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type
You may want to double-check that all atom types are properly assigned
in the post-reaction template.
E: Bond/react special bond generation overflow
The number of special bonds per-atom created by a reaction exceeds the