<div dir="ltr">Thank you Travis, <div>I think I didn't explain myself correctly.</div><div>The original post from Massimo is about performing NPT_F MD simulations keeping one of the box dimensions fixed. </div><div>A reply indicated that that could be done by a modification of the code, cell_opt_utils.F</div><div>After checking that file I see that those options are already coded, but perhaps this is only for CELL_OPT and not for RUN_TYPE MD</div><div><br></div><div>Now, looking back I see that the referred file is cell_opt_util.F and no md_utils.F, which makes me wonder if the comment from Florian was indeed referring to MD or CELL_OPT.</div><div><br></div><div>Then... is it possible to run an MD, under NPT_F conditions for a slab system and keeping the constant dimension of the box normal to the slab??</div><div>With a little hint of the developers I can do this change myself.</div><div><br></div><div>Thanks,</div><div><br></div><div>Marcelo.</div><div><br></div><div>On Monday, June 25, 2018 at 11:35:04 PM UTC+3, Travis wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">CONSTRAINT X, Y, Z, XY, XZ, YZ under <a href="https://manual.cp2k.org/trunk/CP2K_INPUT/MOTION/CELL_OPT.html" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FMOTION%2FCELL_OPT.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQRj6YcqfKekNPbK9V9gJE1RYx4w';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmanual.cp2k.org%2Ftrunk%2FCP2K_INPUT%2FMOTION%2FCELL_OPT.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQRj6YcqfKekNPbK9V9gJE1RYx4w';return true;">https://manual.cp2k.org/trunk/<wbr>CP2K_INPUT/MOTION/CELL_OPT.<wbr>html</a><br><br>On Monday, June 25, 2018 at 2:16:41 PM UTC-4, Marcelo Carignano wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I see at the end of cell_opt_utils.F (V 5.1) the code copied below suggesting that different constraints for the box deformation can be defined.</div><div>It is a CASE statement using my_constraint_id as argument.</div><div><br></div><div>How and where can this variable be defined? I do not see how to control this from the input.</div><div>Should I (hard) define constraint_id and recompile?</div><div><br></div><div>Thanks,</div><div><br></div><div>Marcelo.</div><div><br></div><div><p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> SELECT CASE (my_constraint_id)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_x)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(1:2) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(4) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_y)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(2:3) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(5) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_z)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(4:6) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_xy)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(1:5) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_xz)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(1:2) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(4:6) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_yz)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> gradient(2:6) = 0.0_dp</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> CASE (fix_none)</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> ! Nothing to do</span></p>
<p style="font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(207,180,238)"><span> END SELECT</span></p></div><div><span><br></span></div><div><br><br>On Sunday, January 26, 2014 at 1:49:33 PM UTC+3, Florian Schiffmann wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>what Marcella says is correct in an ideal world. In reality there are numerics,... if it happens that your cell changes or you want to be on the save side, you might want to set the cell gradient in the nonperiodic direction to a perfect 0.<br>This can be done in the cell_opt_utils.F at the end of the subroutine get_dg_dh.<br>simply set gradient(n)=0.0_dp (n=1 for x, n=3 for y, n=6 for z as np direction).<br>Recompile and your cell is fixed in that direction. <br><br>Flo<br></div></blockquote></div></div></blockquote></div></blockquote></div></div>