Commit fd0fae48 authored by Charlles Abreu's avatar Charlles Abreu
Browse files

Langevin thermostat applied only at post_force in rigid-body fixes

parent cccd6c44
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -1082,10 +1082,8 @@ void FixRigid::compute_forces_and_torques()

void FixRigid::post_force(int vflag)
{
  if (earlyflag) {
  if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (earlyflag) compute_forces_and_torques();
}

/* ---------------------------------------------------------------------- */
@@ -1095,10 +1093,7 @@ void FixRigid::final_integrate()
  int ibody;
  double dtfm;

  if (!earlyflag) {
    if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (!earlyflag) compute_forces_and_torques();

  // update vcm and angmom
  // fflag,tflag = 0 for some dimensions in 2d
+1 −4
Original line number Diff line number Diff line
@@ -622,10 +622,7 @@ void FixRigidNH::final_integrate()

  // late calculation of forces and torques (if requested)

  if (!earlyflag) {
    if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (!earlyflag) compute_forces_and_torques();

  // update vcm and angmom
  // fflag,tflag = 0 for some dimensions in 2d
+1 −4
Original line number Diff line number Diff line
@@ -645,10 +645,7 @@ void FixRigidNHSmall::final_integrate()

  // late calculation of forces and torques (if requested)

  if (!earlyflag) {
    if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (!earlyflag) compute_forces_and_torques();

  // update vcm and angmom
  // include Langevin thermostat forces
+3 −8
Original line number Diff line number Diff line
@@ -936,10 +936,8 @@ void FixRigidSmall::compute_forces_and_torques()

void FixRigidSmall::post_force(int vflag)
{
  if (earlyflag) {
  if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (earlyflag) compute_forces_and_torques();
}

/* ---------------------------------------------------------------------- */
@@ -950,10 +948,7 @@ void FixRigidSmall::final_integrate()

  //check(3);

  if (!earlyflag) {
    if (langflag) apply_langevin_thermostat();
    compute_forces_and_torques();
  }
  if (!earlyflag) compute_forces_and_torques();

  // update vcm and angmom, recompute omega