d1: DISTANCE ATOMS=1,2
d2: DISTANCE ATOMS=2,3
d3: DISTANCE ATOMS=3,4
d4: DISTANCE ATOMS=4,5

p:  PIECEWISE ARG=d1 POINT0=1.2,10 POINT1=1.3,0 POINT2=1.4,5
pp:  PIECEWISE ARG=d1,d2 POINT0=1.2,10 POINT1=1.3,0 POINT2=1.4,5

RESTRAINT ARG=p AT=5.0 KAPPA=1.0
RESTRAINT ARG=pp.d2_pfunc AT=5.0 KAPPA=1.0

PRINT ...
  STRIDE=1
  ARG=d1,d2,pp.d1_pfunc,pp.d2_pfunc
  FILE=COLVAR FMT=%6.3f
... PRINT

ENDPLUMED
