<div>Hi Edwin,</div><div><br /></div><div>If you have compiled CP2K with PLUMED, you can also add the following to your input:</div><div>&FREE_ENERGY<br />  &METADYN<br />    USE_PLUMED .TRUE.<br />    PLUMED_INPUT_FILE ./plumed.dat<br />  &END METADYN<br />&END FREE_ENERGY</div><div><br /></div><div>and create a file plumed.dat containing for example:</div><div><span style="font-family: Times New Roman;"># vim:ft=plumed<br />UNITS LENGTH=A ENERGY=kcal/mol time=ps<br />FLUSH STRIDE=100<br /><br />t: TORSION ATOMS=1,2,3,4<br /><br />lwall: LOWER_WALLS ARG=t AT=0.5pi KAPPA=250.0<br />uwall: UPPER_WALLS ARG=t AT=1.0pi KAPPA=250.0<br /><br />PRINT ARG=t,lwall.bias,uwall.bias FILE=COLVAR STRIDE=100</span></div><div><span style="font-family: Times New Roman;"><br /></span></div><div><br /></div><br /><div class="gmail_quote"><div dir="auto" class="gmail_attr">Op donderdag 19 juni 2025 om 14:58:41 UTC+2 schreef Marcella Iannuzzi:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Edwin, <div><br></div><div>It should be  possible by setting an external potential. </div><div>Then any functional form is allowed. </div><div>For example </div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  &</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(255,255,255);background-color:rgb(203,0,206)">EXTER</span><span style="font-variant-ligatures:no-common-ligatures">NAL_POTENTIAL</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">     ATOMS_LIST  1..237</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  </span><span style="font-variant-ligatures:no-common-ligatures">   FUNCTION   K*(SQRT(X^2+Y^2+Z^2)/R)^10</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">     PARAMETERS   K   R</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">     UNITS        hartree  angstrom</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">     VALUES       0.1   25</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  &END </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(255,255,255);background-color:rgb(203,0,206)">EXTER</span><span style="font-variant-ligatures:no-common-ligatures">NAL_POTENTIAL</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Regards</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">Marcella</span></p></div><div><br><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Thursday, June 19, 2025 at 11:09:44 AM UTC+2 <a href data-email-masked rel="nofollow">helb...@gmail.com</a> 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 All,
<br>
<br>I would really appreciate an answer to this question, even if it is
<br>that it is not possible to do this with CP2K.
<br>
<br>Kind Regards,
<br>Edwin.
<br>
<br>El dom, 15 jun 2025 a las 2:44, Edwin Helbert Aponte Angarita
<br>(<<a rel="nofollow">helb...@gmail.com</a>>) escribió:
<br>>
<br>> Dear CP2K users,
<br>>
<br>> Is there any way to specify a well restraint in CP2K? By well
<br>> restraint I mean one whose energy penalty behaves like in the figure
<br>> attached, in which the harmonic restraint kicks in below a certain
<br>> value and above another, and has no effect for values in between. You
<br>> can see how this type of restraint is used in AMBER in this link:
<br>> <a href="https://ambermd.org/tutorials/advanced/tutorial4/" rel="nofollow" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=nl&q=https://ambermd.org/tutorials/advanced/tutorial4/&source=gmail&ust=1750490486361000&usg=AOvVaw2c6KhHefBYQDe6mp--LSvB">https://ambermd.org/tutorials/advanced/tutorial4/</a>
<br>>
<br>> I would very much appreciate it if you can clarify for me how to do
<br>> this for lengths, angles and torsion angles.From what I can see here
<br>> <a href="https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/CONSTRAINT/COLLECTIVE/RESTRAINT.html" rel="nofollow" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=nl&q=https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/CONSTRAINT/COLLECTIVE/RESTRAINT.html&source=gmail&ust=1750490486361000&usg=AOvVaw0xgPv8guwXhHlk3uzkQHfS">https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/CONSTRAINT/COLLECTIVE/RESTRAINT.html</a>
<br>> only a harmonic restraint is possible.
<br>>
<br>> Kind regards,
<br>> Edwin.
<br></blockquote></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 visit <a href="https://groups.google.com/d/msgid/cp2k/7e5e7356-1158-45bf-a8e1-b4bc19d7d123n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/7e5e7356-1158-45bf-a8e1-b4bc19d7d123n%40googlegroups.com</a>.<br />