<div dir="ltr">Dear Mengzi, <div><br></div><div>The variable as you defined it takes the average of the coordination of the ATOMS_FROM.</div><div>If you want to use the sum of the coordinations of each of the specified atoms in ATOMS_FROM, you need to define a COMBINED collective variable, where you set the sum of coordinations of single atoms.</div><div>Kind regards</div><div>Marcella</div><div><br><br>On Thursday, June 7, 2018 at 10:53:32 AM UTC+2, Mengzi Zhou wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Dear all,<div>          Recently I use CN as the constraint for free energy calculation for Mg2+ ---  sulfate anion ----Mg2+ in water. CN is defined as the coordination number of two Mg atoms to four O atoms in SO4(2-). The below is related part in input file</div><div>&COORDINATION</div><div>          ATOMS_FROM 7 25</div><div>          ATOMS_TO 15 16 17 18</div><div>          ND 18</div><div>          NN 10</div><div>          R0 [angstrom] 2.7</div><div>&END COORDINATION</div><div>…………</div><div>&CONSTRAINT</div><div>         &COLLECTIVE</div><div>                    TARGET 1.0</div><div>                    INTERMOLECULAR</div><div>                    COLVAR 1</div><div>         &END COLLECTIVE</div><div>         &LAGRANGE_MUTIPLIERS</div><div>                     FILENAME=force1.0</div><div>                     &EACH</div><div>                             MD 1</div><div>                     &END EACG</div><div>         &END LAGRANGE_MUTIPLIERS</div><div>&END CONSTRAINT</div><div><br></div><div>At first, I set TARGET 1.9, because I thought this constraint is for the sum of both Mg, and by a free AIMD run two Mg are both collected to SO4. But I checked the result of TARGET 1.9 and found SO4 structure got distorted largely. It seems that each Mg is under the constraint of 1.9 not the sum of 2 Mg. So I retry with TARGET 1.0. This time, the trajectory is realistic. Both Mg are collected to SO4 just like what happens in free AIMD run. </div><div>I want to ask when several atoms are in ATOMS_FORM or KINDS_FROM section, whether the TARGET constant is for each one of them or the sum of them? From my tests, it seems the former one. If so, what should I do to make the sum of them be the constraint? or it cannot be done by methodology due to more than one degree of freedom? </div><div><br></div><div>Sincerely,</div><div>Mengzi.</div><div><br></div><div><br></div></div></blockquote></div></div>