# the distance between C-Cl' and C-Cl
d1: DISTANCE ATOMS=1,3
d2: DISTANCE ATOMS=2,3
# difference of distances 
MATHEVAL ...
 LABEL=diff
 ARG=d1,d2
 VAR=x1,x2
 FUNC=x1-x2
 PERIODIC=NO 
... MATHEVAL
MOVINGRESTRAINT ...
ARG=diff
STEP0=0     AT0=-0.124808  KAPPA0=200000.0
STEP1=5000  AT1=0.124808
LABEL=steer
... MOVINGRESTRAINT
# distance between the two Cl
d3: DISTANCE ATOMS=1,2
wall: UPPER_WALLS ARG=d3 AT=0.44 KAPPA=5000.0
PRINT FILE=COLVAR ARG=d1,d2,d3,diff,steer.diff_cntr,steer.diff_work,wall.bias STRIDE=1
ENDPLUMED
