Hi all,
I would like to apply a custom potential (piecewise linear in z) to specific atoms, not just compute a collective variable. Right now my PLUMED snippet looks like this:
c1693: POSITION ATOM=1693
fz1693: CUSTOM ARG=c1693.z VAR=z FUNC={85.5015 + (-3*z)*step(65-z) + (-195)*step(z-65)*step(75-z) + (-step(75-z)+step(142-z))*((z-75)*3.2687+(-195)) + (-step(142-z)+step(150-z))*(-3*z-(-450))} PERIODIC=NO
As far as I can tell, this only calculates the value of fz1693 but does not actually apply any force to atom 1693. In the manual I mostly see harmonic restraints or linear biases (RESTRAINT).
What I would like is something closer to OpenMM’s CustomExternalForce, i.e. using this expression directly as a potential acting on the atom(s). Is there a recommended way to turn this CUSTOM expression into an actual biasing potential in PLUMED, so that forces are really applied to the specified atoms?