Commit 87af3b1f authored by sjplimp's avatar sjplimp Committed by GitHub
Browse files

Merge pull request #564 from lammps/fix-external

bugfix for fix msst
parents be8360ac 04239712
Loading
Loading
Loading
Loading
+14 −21
Original line number Diff line number Diff line
@@ -434,6 +434,7 @@ void FixMSST::setup(int vflag)

  // trigger virial computation on next timestep

  pe->addstep(update->ntimestep+1);
  pressure->addstep(update->ntimestep+1);
}

@@ -468,7 +469,7 @@ void FixMSST::initial_integrate(int vflag)
  // must convert energy to mv^2 units

  if (dftb) {
    TS_dftb = fix_external->compute_vector(0);
    double TS_dftb = fix_external->compute_vector(0);
    TS = force->ftm2v*TS_dftb;
    if (update->ntimestep == 1) T0S0 = TS;
  } else {
@@ -668,7 +669,7 @@ void FixMSST::final_integrate()
{
  int i;
  double p_msst;                  // MSST driving pressure
  double TS,TS_term,escale_term;
  double TS_term,escale_term;

  // v update only for atoms in MSST group

@@ -682,14 +683,6 @@ void FixMSST::final_integrate()

  int sd = direction;

  // for DFTB, extract TS_dftb from fix external
  // must convert energy to mv^2 units

  if (dftb) {
    TS_dftb = fix_external->compute_vector(0);
    TS = force->ftm2v*TS_dftb;
  } else TS = 0.0;

  // compute etot + extra terms for conserved quantity

  double e_scale = compute_etotal() + compute_scalar();
+6 −7
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@ class FixMSST : public Fix {
  double beta;                     // Energy conservation scaling factor

  int maxold;                      // allocated size of old_velocity
  double TS_dftb;                  // value needed from DFTB+ via fix external
  class FixExternal *fix_external; // ptr to fix external

  // functions
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ void Fix::modify_params(int narg, char **arg)
/* ----------------------------------------------------------------------
   setup for energy, virial computation
   see integrate::ev_set() for values of eflag (0-3) and vflag (0-6)
   fixes call this if use ev_tally()
   fixes call this if they use ev_tally()
------------------------------------------------------------------------- */

void Fix::ev_setup(int eflag, int vflag)