Commit 0c6a7517 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

may check for 1-4 scaling factors in CHARMM dihedral styles only when...

may check for 1-4 scaling factors in CHARMM dihedral styles only when "weightflag" is set, since they may be used with amber
parent 612b44a8
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -380,14 +380,16 @@ void DihedralCharmm::init_style()
                 " r-RESPA level as 'outer'");
  }

  if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0))
    error->all(FLERR,"Must use 'special_bonds charmm' with"
               " dihedral style charmm");

  // insure use of CHARMM pair_style if any weight factors are non-zero
  // set local ptrs to LJ 14 arrays setup by Pair
  // also verify that the correct 1-4 scaling is set

  if (weightflag) {

    if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0))
      error->all(FLERR,"Must use 'special_bonds charmm' with"
                 " dihedral style charmm for use with CHARMM pair styles");

    int itmp;
    if (force->pair == NULL)
      error->all(FLERR,"Dihedral charmm is incompatible with Pair style");
+6 −4
Original line number Diff line number Diff line
@@ -398,14 +398,16 @@ void DihedralCharmmfsw::init_style()
        " r-RESPA level as 'outer'");
  }

  if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0))
    error->all(FLERR,"Must use 'special_bonds charmm' with"
               " dihedral style charmmfsw");

  // insure use of CHARMM pair_style if any weight factors are non-zero
  // set local ptrs to LJ 14 arrays setup by Pair
  // also verify that the correct 1-4 scaling is set

  if (weightflag) {

    if ((force->special_lj[3] != 0.0) || (force->special_coul[3] != 0.0))
      error->all(FLERR,"Must use 'special_bonds charmm' with"
                 " dihedral style charmm for use with CHARMM pair styles");

    int itmp;
    if (force->pair == NULL)
      error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style");