Unverified Commit 8f431b0f authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1716 from akohlmey/topology-interaction-check

Add topology interaction check to Force::init()
parents cd0e408d 29574eaa
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -47,6 +47,11 @@ too far away. :dd

Self-explanatory. :dd

{Angles are defined but no angle style is set} :dt

The topology contains angles, but there are no angle forces computed
since there was no angle_style command. :dd

{Atom style in data file differs from currently defined atom style} :dt

Self-explanatory. :dd
@@ -73,6 +78,11 @@ short or the bond has blown apart and an atom is too far away. :dd

Self-explanatory. :dd

{Bonds are defined but no bond style is set} :dt

The topology contains bonds, but there are no bond forces computed
since there was no bond_style command. :dd

{Bond/angle/dihedral extent > half of periodic box length} :dt

This is a restriction because LAMMPS can be confused about which image
@@ -186,6 +196,11 @@ to check your simulation geometry. :dd

Self-explanatory. :dd

{Dihedrals are defined but no dihedral style is set} :dt

The topology contains dihedrals, but there are no dihedral forces computed
since there was no dihedral_style command. :dd

{Dump dcd/xtc timestamp may be wrong with fix dt/reset} :dt

If the fix changes the timestep, the dump dcd file will not
@@ -352,6 +367,11 @@ to check your simulation geometry. :dd

Self-explanatory. :dd

{Impropers are defined but no improper style is set} :dt

The topology contains impropers, but there are no improper forces computed
since there was no improper_style command. :dd

{Inconsistent image flags} :dt

The image flags for a pair on bonded atoms appear to be inconsistent.
@@ -407,6 +427,30 @@ This library function cannot be used if atom IDs are not defined or
are not consecutively numbered, or if no atom map is defined.  See the
atom_modify command for details about atom maps. :dd

{Likewise 1-2 special neighbor interactions != 1.0} :dt

The topology contains bonds, but there is no bond style defined
and a 1-2 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the bond style. :dd

{Likewise 1-3 special neighbor interactions != 1.0} :dt

The topology contains angles, but there is no angle style defined
and a 1-3 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the angle style. :dd

{Likewise 1-4 special neighbor interactions != 1.0} :dt

The topology contains dihedrals, but there is no dihedral style defined
and a 1-4 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the dihedral style. :dd

{Lost atoms via change_box: original %ld current %ld} :dt

The command options you have used caused atoms to be lost. :dd
+22 −0
Original line number Diff line number Diff line
@@ -196,6 +196,28 @@ void Force::init()
  if (angle) angle->init();
  if (dihedral) dihedral->init();
  if (improper) improper->init();

  // print warnings if topology and force field are inconsistent

  if (comm->me == 0) {
    if (!bond && (atom->nbonds > 0)) {
      error->warning(FLERR,"Bonds are defined but no bond style is set");
      if ((special_lj[1] != 1.0) || (special_coul[1] != 1.0))
	error->warning(FLERR,"Likewise 1-2 special neighbor interactions != 1.0");
    }
    if (!angle && (atom->nangles > 0)) {
      error->warning(FLERR,"Angles are defined but no angle style is set");
      if ((special_lj[2] != 1.0) || (special_coul[2] != 1.0))
	error->warning(FLERR,"Likewise 1-3 special neighbor interactions != 1.0");
    }
    if (!dihedral && (atom->ndihedrals > 0)) {
      error->warning(FLERR,"Dihedrals are defined but no dihedral style is set");
      if ((special_lj[3] != 1.0) || (special_coul[3] != 1.0))
	error->warning(FLERR,"Likewise 1-4 special neighbor interactions != 1.0");
    }
    if (!improper && (atom->nimpropers > 0))
      error->warning(FLERR,"Impropers are defined but no improper style is set");
  }
}

/* ---------------------------------------------------------------------- */
+44 −0
Original line number Diff line number Diff line
@@ -226,4 +226,48 @@ A command with an argument that specifies an integer or range of
integers is using a value that is less than 1 or greater than the
maximum allowed limit.

W: Bonds are defined but no bond style is set

The topology contains bonds, but there are no bond forces computed
since there was no bond_style command.

W: Angles are defined but no angle style is set

The topology contains angles, but there are no angle forces computed
since there was no angle_style command.

W: Dihedrals are defined but no dihedral style is set

The topology contains dihedrals, but there are no dihedral forces computed
since there was no dihedral_style command.

W: Impropers are defined but no improper style is set

The topology contains impropers, but there are no improper forces computed
since there was no improper_style command.

W: Likewise 1-2 special neighbor interactions != 1.0

The topology contains bonds, but there is no bond style defined
and a 1-2 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the bond style.

W: Likewise 1-3 special neighbor interactions != 1.0

The topology contains angles, but there is no angle style defined
and a 1-3 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the angle style.

W: Likewise 1-4 special neighbor interactions != 1.0

The topology contains dihedrals, but there is no dihedral style defined
and a 1-4 special neighbor scaling factor was not 1.0. This
means that pair style interactions may have scaled or missing
pairs in the neighbor list in expectation of interactions for
those pairs being computed from the dihedral style.

*/
+2 −2

File changed.

Contains only whitespace changes.