Unverified Commit 1452d3d2 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1516 from gtribello/master

Using PLUMED to compute committor with LAMMPS
parents 2dea4eb0 75e2981b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#include "modify.h"
#include "pair.h"
#include "utils.h"
#include "timer.h"

#include "plumed/wrapper/Plumed.h"

@@ -406,6 +407,8 @@ void FixPlumed::post_force(int /* vflag */)

  // pass all pointers to plumed:
  p->cmd("setStep",&step);
  int plumedStopCondition=0; 
  p->cmd("setStopFlag",&plumedStopCondition);
  p->cmd("setPositions",&atom->x[0][0]);
  p->cmd("setBox",&box[0][0]);
  p->cmd("setForces",&atom->f[0][0]);
@@ -478,6 +481,8 @@ void FixPlumed::post_force(int /* vflag */)
  // do the real calculation:
  p->cmd("performCalc");

  if(plumedStopCondition) timer->force_timeout();

  // retransform virial to lammps representation and assign it to this
  // fix's virial. If the energy is biased, Plumed is giving back the full
  // virial and therefore we have to subtract the initial virial i.e. virial_lmp.