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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures;"><br /></span></p><p style="margin: 0px; font-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; color: rgb(0, 0, 0);"><span style="font-variant-ligatures: no-common-ligatures;">Regards</span></p><p style="margin: 0px; font-width: normal; 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-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-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 helb...@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 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 href data-email-masked 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/" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://ambermd.org/tutorials/advanced/tutorial4/&source=gmail&ust=1750424143981000&usg=AOvVaw3H6395K7FZIMb--XCk4wro">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" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/CONSTRAINT/COLLECTIVE/RESTRAINT.html&source=gmail&ust=1750424143981000&usg=AOvVaw2jFzckzDcXhloOQqcwexFQ">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>
<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/c723a722-ea72-4621-b853-f64028fe0262n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/c723a722-ea72-4621-b853-f64028fe0262n%40googlegroups.com</a>.<br />