g1: GROUP ATOMS=1-10
g2: GROUP ATOMS=30-40,5
c1: CENTER   ATOMS=g1
c2: CENTER   ATOMS=g2 NOPBC

c1x0: CENTER ATOMS=g1
c1x1: CENTER ATOMS=g1 WEIGHTS=1,1,1,1,1,1,1,1,1,1
c1x2: CENTER ATOMS=g1 WEIGHTS=0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1
c3x0: CENTER    ATOMS=5,5,5,20,20,3 NOPBC
c3x1: CENTER ATOMS=3,20,5 WEIGHTS=1,2,3 NOPBC

# these should be zero
ddcheck1: DISTANCE ATOMS=c1x0,c1x1
ddcheck2: DISTANCE ATOMS=c1x0,c1x2
ddcheck3: DISTANCE ATOMS=c3x0,c3x1

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

MOVINGRESTRAINT ...
  ARG=d2 VERSE=B
   STEP0=-100 AT0=0.0 KAPPA0=0.0
   STEP1=0 AT1=0.9 KAPPA1=3.0
   STEP2=200 AT2=1.5
   STEP3=400 KAPPA3=1.0
   LABEL=mr
...

PRINT ...
  STRIDE=1
  ARG=d1,d2,d3,mr.bias,mr.force2,mr.d2_work
  FILE=COLVAR FMT=%6.3f
... PRINT

PRINT STRIDE=1 ARG=ddcheck1,ddcheck2,ddcheck3 FILE=COLVAR2 FMT=%6.3f

DUMPFORCES STRIDE=1 ARG=d2 FILE=ff

ENDPLUMED

