Commit c5430b0a authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

print info messages when changing qqr2e constant in fully CHARMM compatible pair styles

parent 60c3f3d6
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -65,9 +65,13 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp)

  // switch qqr2e from LAMMPS value to CHARMM value

  if (strcmp(update->unit_style,"real") == 0)
  if (strcmp(update->unit_style,"real") == 0) {
    if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real))
      error->message(FLERR,"Switching to CHARMM coulomb energy"
                     " conversion constant");
    force->qqr2e = force->qqr2e_charmm_real;
  }
}

/* ---------------------------------------------------------------------- */

@@ -96,9 +100,13 @@ PairLJCharmmfswCoulLong::~PairLJCharmmfswCoulLong()

  // switch qqr2e back from CHARMM value to LAMMPS value

  if (strcmp(update->unit_style,"real") == 0)
  if (update && strcmp(update->unit_style,"real") == 0) {
    if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real))
      error->message(FLERR,"Restoring original LAMMPS coulomb energy"
                     " conversion constant");
    force->qqr2e = force->qqr2e_lammps_real;
  }
}

/* ---------------------------------------------------------------------- */

+10 −2
Original line number Diff line number Diff line
@@ -50,9 +50,13 @@ PairLJCharmmfswCoulCharmmfsh::PairLJCharmmfswCoulCharmmfsh(LAMMPS *lmp) :

  // switch qqr2e from LAMMPS value to CHARMM value

  if (strcmp(update->unit_style,"real") == 0)
  if (strcmp(update->unit_style,"real") == 0) {
    if ((comm->me == 0) && (force->qqr2e != force->qqr2e_charmm_real))
      error->message(FLERR,"Switching to CHARMM coulomb energy"
                     " conversion constant");
    force->qqr2e = force->qqr2e_charmm_real;
  }
}

/* ---------------------------------------------------------------------- */

@@ -80,9 +84,13 @@ PairLJCharmmfswCoulCharmmfsh::~PairLJCharmmfswCoulCharmmfsh()

  // switch qqr2e back from CHARMM value to LAMMPS value

  if (strcmp(update->unit_style,"real") == 0)
  if (update && strcmp(update->unit_style,"real") == 0) {
    if ((comm->me == 0) && (force->qqr2e == force->qqr2e_charmm_real))
      error->message(FLERR,"Restoring original LAMMPS coulomb energy"
                     " conversion constant");
    force->qqr2e = force->qqr2e_lammps_real;
  }
}

/* ---------------------------------------------------------------------- */