Hello
I have found a problem. As you know your system better would you mind
testing how this works with your restraints and reporting back.
The problem is with COORDINATION. If you write:
COORDINATION GROUPA=1-2 GROUPB=1-2 etc
Then the coordination is calculated as:
s(r_11) + s(r_12) + s(r_22)
where r_11 is the distance between atom 1 and itself (i.e. zero), r_12
is the distance between atoms 1 and 2 and r_22 is the distance between
atom 2 and itself (i.e. zero). As a consequence if atoms 1 and 2 are
within the cutoff of your switching function the coordination is
measured (in my view wrongly) as 3.
By contrast if you use COORDINATIONNUMBER you correctly find that the
average coordination numbers of atoms 1 and 2 is 1. This is regardless
of whether or not you use SPECIES or SPECIESA/SPECIESB.
This is why if I take your plumed.dat file:
AA: COORDINATION GROUPA=1-200 GROUPB=1-200 R_0=0.1 D_0=0.55
AAn: COORDINATIONNUMBER SPECIES=1-200 R_0=0.1 D_0=0.55 MEAN
and do the calculation you suggest:
AA / AAn.mean
you don't get the expected 200. To get 200 you have to do the following:
(AA - 200 ) / AAn.mean
The 200 is removing all the spurious bonds between atom 1 and itself,
atom 2 and itself and so on. (I tried this - it works).
I think this is a bug but it is one that I am not certain how to fix. (I
didn't write COORDINATION I wrote COORDINATIONNUMBER). Unfortunately I
think the fix we come up with might be to put a warning or error in the
output if you try to do this. I can't see anyway to make COORDINATION
ignore bonds between atoms and themselves, which wont affect the
performance of the routine. Also I don't think the majority of users
don't do this sort of thing).
Anyway, point is if you set the AT values for these sort of restraints to:
200*5.5 + 200
The behaviour with COORDINATION and COORDINATIONNUMBER should be the same.
Thanks for pointing this out
Gareth