UNITS TIME=0.1 LENGTH=0.1 ENERGY=10
g1: GROUP ATOMS=1-10
g2: GROUP ATOMS=30-40,5
c1: CENTER   ATOMS=g1
c2: CENTER   ATOMS=g2 NOPBC

d1: DISTANCE ATOMS=1,10 COMPONENTS
d2: DISTANCE ATOMS=c1,50
d3: DISTANCE ATOMS=50,c2

RESTRAINT ARG=d2 AT=9 KAPPA=0.003

PRINT ...
  ARG=d1.x,d2,d3
  STRIDE=1
  _ROTATE=2
  FILE=COLVAR FMT=%6.3f
... PRINT

ENDPLUMED

