g1: GROUP ATOMS=1-9:2,2-10:2
g2: GROUP ATOMS=30-40,5
ndx1: GROUP NDX_FILE=test.ndx
ndx2: GROUP NDX_FILE=test.ndx NDX_GROUP=second

c1:  CENTER  ATOMS=g1 NOPBC
c2:  CENTER  ATOMS=g2 NOPBC
c1n: CENTER  ATOMS=ndx1
c2n: CENTER  ATOMS=ndx2

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

d1n: DISTANCE ATOMS=1,10
d2n: DISTANCE ATOMS=c1n,50
d3n: DISTANCE ATOMS=50,c2n

RESTRAINT ARG=d2 AT=0.9 KAPPA=3.0

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

PRINT ...
  STRIDE=1
  ARG=d1n,d2n,d3n
  FILE=COLVARN FMT=%6.3f
... PRINT


ENDPLUMED

