Dear Bai<div><br></div><div>In the first approach that you propose, you are assuming that the coordinates of atom 5 remain fixed at X0 Y0 and Z0 during the simulation. </div><div>Is this really the case? If not, the effect of the external potential is to keep atom 9 within a certain distance from a fixed point in the space, with Cartesian coordinates (X0,Y0,Z0).</div><div><br></div><div>The second approach could work, if you correctly define the collective variable. </div><div>According to what you wrote, there is a wall acting on a coordination number, not on a distance. </div><div>This means that it should prevent the coordination number to become larger than 3, not the distance. </div><div>This is not going to produce the effect you want. </div><div><br></div><div>Regards</div><div>Marcella</div><div><br></div><div><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Wednesday, March 9, 2022 at 5:06:41 AM UTC+1 lb90...@gmail.com wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Dear CP2K Users,<br><div><br></div><div>I want to do a MD simulation about a reaction of two molecules, <span style="white-space:pre-wrap">where the two molecules contain a O and a C respectively. I needed to prevent these two atoms (O and C in two molecules respectively) moving more than 3 angstrom </span><span style="white-space:pre-wrap">from each other. So I find two </span>methods that might work, but I don't know which one is applicative or I need to connect both of the following methods together.</div><div><br></div><div>5 and 9 is the atom O and C. X0, Y0, Z0 in external potential section is the coordinates of atom 5.<br></div><div>1. Using External potential section. </div><div> &EXTERNAL_POTENTIAL<br> ATOMS_LIST 9<br> FUNCTION A*(Z-Z0)^8<br> PARAMETERS A Z0<br> VALUES 0.001 0.347<br> UNITS eV angstrom<br> &END<br> &EXTERNAL_POTENTIAL<br> ATOMS_LIST 9<br> FUNCTION A*(X-X0)^8<br> PARAMETERS A X0<br> VALUES 0.001 1.091<br> UNITS eV angstrom<br> &END<br> &EXTERNAL_POTENTIAL<br> ATOMS_LIST 9<br> FUNCTION A*(Y-Y0)^8<br> PARAMETERS A Y0<br> VALUES 0.001 0.062<br> UNITS eV angstrom<br></div><div><br></div><div>For the second methods, I just want to <span style="white-space:pre-wrap">apply the Wall without doing Meta-MD, so I close the DO_HILLS</span><span style="white-space:pre-wrap"> </span></div><div>2. Using Meta-MD Wall section.</div><div> &METADYN<br> DO_HILLS .FALSE.<br> NT_HILLS 10000<br> &METAVAR<br> SCALE 0.2<br> COLVAR 1<br> &WALL<br> POSITION [angstrom] 3.0<br> TYPE QUARTIC<br> &QUARTIC<br> DIRECTION WALL_PLUS<br> K [kcalmol] 40.0<br> &END QUARTIC<br> &END WALL<br> &END METAVAR<br></div><div>...........</div><div> &COLVAR<br> &COORDINATION<br> ATOMS_FROM 5<br> ATOMS_TO 9<br> R_0 [angstrom] 3.0<br> NN 8<br> ND 14<br> &END COORDINATION<br> &END COLVAR<br> &END SUBSYS<br></div><div><br></div><div><div>If someone have time to give me some advices, i would appreciate it.</div><div>Best regards</div><div><br></div><div>Bai</div></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/291e5d7a-354b-4895-bb27-17d9f7ee48f0n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/291e5d7a-354b-4895-bb27-17d9f7ee48f0n%40googlegroups.com</a>.<br />