d: DISTANCE ATOMS=1,2
p1: POSITION ATOM=1
p2: POSITION ATOM=2

# different coefficients in different replicas
f: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@replicas:{{1,2,3} {0,0,0} {2,4,6}} PERIODIC=NO

PRINT ARG=f FILE=colvar

# equivalent syntax:
#g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS=@replicas:{{1,2,3} {1,0,3} {1,4,3}} PERIODIC=NO
g: COMBINE ARG=d,p1.x,p2.y COEFFICIENTS={1 @replicas:{2 0 4} 3} PERIODIC=NO
PRINT ARG=g FILE=colvarg

# different arguments in different replicas
PRINT ARG=@replicas:{d,p1.x,p2.x} FILE=multi

# typical umbrella sampling stuff
RESTRAINT ARG=d AT=@replicas:{1,2,3} KAPPA=100

