<div>Dear 
Aniruddha,</div><div><br></div><div>Sometimes ago, I have encountered a similar problem,</div><div>I think the reason is that the python code communicates positions/forces with the mpi cp2k_shell.popt. <br></div><div>There is a problem when MPI code read the pipe: the MPI code will only read truncated data  (such as positions) from the pipe, not all of them.</div><div>So CP2K_shell.popt is still waiting for more coordinates and gets stuck.</div><div><br></div><div>Best,</div><div>Geng<br></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">在2020年8月13日星期四 UTC-7 下午1:20:17&l...@gmail.com> 写道:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr">Thanks Hasan,<div><br></div><div>I was able to get the Cp2K working. However I face another issue. The simulation runs well for few steps and after that I cannot see my output file being updated. The simulation shows running however I am not able to see any output being updated in the cp2k output file as well as the slurm output file. I have attached my job submission script, python script as well as the out files for reference. Could this be a memory issue? </div><div><br></div><div>Best,</div><div>Aniruddha M Dive</div></div><div dir="ltr"><div><br><br>On Tuesday, August 4, 2020 at 10:12:17 AM UTC-7, Hasan Al-Mahayni wrote:</div></div><div dir="ltr"><div><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 had similar problems starting CP2K with ASE earlier this summer. I will attach an example of geometric optimization for a slab, I hope it helps. You need to copy paste a large portion of your cp2k input file in your python script, because ASE does not provide all the input parameters you will need to perform geo_opt. Please find an example attached below.</div><div><br></div><div>Cheers,</div><div><br></div><div>Hasan.</div></div><br></blockquote></div></div><div dir="ltr"><div><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div dir="ltr">On Tue, Aug 4, 2020 at 1:16 AM Maxime Van den Bossche <<a rel="nofollow">maxi...@gmail.com</a>> wrote:<br></div></div></blockquote></div></div><div dir="ltr"><div><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Aniruddha,</div><div><br></div><div>Since you haven't provided a minimal example, nor the error message you're getting</div><div>from ASE or CP2K, I haven't looked into debugging the (bulky) example you sent.</div><br><div>But I don't think you can do the geometry optimization in this way. ASE uses the cp2k_shell binary,</div><div>which seems to only perform single-point calculations but not e.g. geometry optimizations.</div><div><br></div><div>The idea behind cp2k_shell is that the 'driver' (in this case ASE) is the one moving the atoms</div><div>around, and what CP2K does is e.g. calculating the energy and the gradients for a given geometry.<br></div><div><br></div><div>Here is a minimal example of a geometry optimization, and you can work your way up</div><div>from there:</div><div><br></div><div><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><div><span style="color:rgb(0,0,136)">from</span><span style="color:rgb(0,0,0)"> ase</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">build </span><span style="color:rgb(0,0,136)">import</span><span style="color:rgb(0,0,0)"> molecule<br></span><span style="color:rgb(0,0,136)">from</span><span style="color:rgb(0,0,0)"> ase</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">calculators</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">cp2k </span><span style="color:rgb(0,0,136)">import</span><span style="color:rgb(0,0,0)"> CP2K<br></span><span style="color:rgb(0,0,136)">from</span><span style="color:rgb(0,0,0)"> ase</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">optimize </span><span style="color:rgb(0,0,136)">import</span><span style="color:rgb(0,0,0)"> BFGS<br><br>atoms </span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,0,0)"> molecule</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,136,0)">'H2O'</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br>atoms</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">center</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">vacuum</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,102,102)">2.0</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br><br>calc </span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,0,0)"> CP2K</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">command</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,136,0)">'cp2k_shell.sopt'</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br>atoms</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">set_calculator</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">calc</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br><br>dyn </span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,0,0)"> BFGS</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">atoms</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br>dyn</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">run</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">fmax</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,102,102)">0.05</span><span style="color:rgb(102,102,0)">)</span><span style="color:rgb(0,0,0)"><br></span></div></div></code></div><br></div><div>Best regards,</div><div>Maxime<br></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br></blockquote></div></blockquote></div></div><div dir="ltr"><div><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
To unsubscribe from this group and stop receiving emails from it, send an email to <a rel="nofollow">c...@googlegroups.com</a>.</blockquote></div></blockquote></div></div><div dir="ltr"><div><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/df050a2d-1161-4e2c-98c9-0463adcb4c3do%40googlegroups.com?utm_medium=email&utm_source=footer" rel="nofollow" target="_blank" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://groups.google.com/d/msgid/cp2k/df050a2d-1161-4e2c-98c9-0463adcb4c3do%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1597761470385000&usg=AFQjCNHlujsOWJG97Y5g2xoiIU2yN2eJnA">https://groups.google.com/d/msgid/cp2k/df050a2d-1161-4e2c-98c9-0463adcb4c3do%40googlegroups.com</a>.<br>
</blockquote></div></blockquote></div></div></blockquote></div>