Commit 035fba10 authored by David Nicholson's avatar David Nicholson
Browse files

fixed special_bonds requirements

parent 923ccaaf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@ or :doc:`read_restart <read_restart>` commands:

This style has strict requirements on the :doc:`special_bonds <special_bonds>`
setting. 1-2 interactions must have weights of zero. 1-3 interactions must
either have weights of zero or the *angle* setting must be turned on. 1-4
interactions must have weights of zero or the *dihedral* setting must be turned
either have weights of one or the *angle* setting must be turned on. 1-4
interactions must have weights of one or the *dihedral* setting must be turned
on. These requirements ensure that the new bonds created by this style do not
create spurious 1-2, 1-3 or 1-4 interactions.

+4 −4
Original line number Diff line number Diff line
@@ -53,12 +53,12 @@ void BondSpecial::init_style()
  if (force->special_lj[1] != 0.0 || force->special_coul[1] != 0)
    error->all(FLERR,"Invalid 1-2 setting for bond style special.");

  if (force->special_angle != 1 && (force->special_lj[2] != 0.0 ||
                                    force->special_coul[2] != 0.0))
  if (force->special_angle != 1 && (force->special_lj[2] != 1.0 ||
                                    force->special_coul[2] != 1.0))
    error->all(FLERR,"Invalid 1-3 setting for bond style special.");

  if (force->special_dihedral != 1 && (force->special_lj[3] != 0.0 ||
                                       force->special_coul[3] != 0.0))
  if (force->special_dihedral != 1 && (force->special_lj[3] != 1.0 ||
                                       force->special_coul[3] != 1.0))
    error->all(FLERR,"Invalid 1-4 setting for bond style special.");

}
+4 −4
Original line number Diff line number Diff line
@@ -63,12 +63,12 @@ Bond style special must be used with zero factors for 1-2 special bonds.

E: Invalid 1-3 setting for bond style special.

Bond style special must be used with either zero factors for 1-3 special bonds
or the angle keyword.
Bond style special must be used with 1.0 factors for 1-3 special bonds or the
angle keyword set to yes.

E: Invalid 1-4 setting for bond style special.

Bond style special must be used with either zero factors for 1-4 special bonds
or the dihedral keyword.
Bond style special must be used with 1.0 factors for 1-4 special bonds or the
dihedral keyword set to yes.

*/