<div dir="ltr"><div>Dear Yuvam,</div><div><br></div><div>I am not sure what your question is, what do you need help with?</div><div><br></div><div>To run cp2k in colab you can use something like this to install the tool:<br></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; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><div style="color: #000000;background-color: #fffffe;font-family: 'monospace', Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #0000ff;"><span style="color: #660;" class="styled-by-prettify">%%</span><span style="color: #000;" class="styled-by-prettify">bash</span></span></div><span style="color: #000;" class="styled-by-prettify"><br></span><div><span style="color: #008000;"><span style="color: #800;" class="styled-by-prettify"># Execute this cell on Ubuntu only</span></span></div><div><span style="color: #0000ff;"><span style="color: #800;" class="styled-by-prettify">if</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> grep -e </span></span><span style="color: #a31515;"><span style="color: #800;" class="styled-by-prettify">"ID=ubuntu"</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> /etc/os-release ; </span></span><span style="color: #0000ff;"><span style="color: #800;" class="styled-by-prettify">then</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> \</span></span></div><div><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify">    echo </span></span><span style="color: #a31515;"><span style="color: #800;" class="styled-by-prettify">'Continue on Ubuntu'</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> ; \</span></span></div><div><span style="color: #0000ff;"><span style="color: #800;" class="styled-by-prettify">else</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> \</span></span></div><div><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify">    echo </span></span><span style="color: #a31515;"><span style="color: #800;" class="styled-by-prettify">'Does not look like an Ubuntu box, exiting'</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> ; \</span></span></div><div><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify">    </span></span><span style="color: #0000ff;"><span style="color: #800;" class="styled-by-prettify">exit</span></span><span style="color: #000000;"><span style="color: #800;" class="styled-by-prettify"> ; \</span></span></div><div><span style="color: #0000ff;"><span style="color: #800;" class="styled-by-prettify">fi</span></span></div><span style="color: #000;" class="styled-by-prettify"><br></span><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">apt update</span></span></div><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">apt</span><span style="color: #660;" class="styled-by-prettify">-</span><span style="color: #008;" class="styled-by-prettify">get</span><span style="color: #000;" class="styled-by-prettify"> install cp2k</span></span></div><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">pip install ase</span></span></div><span style="color: #000;" class="styled-by-prettify"><br></span><div><span style="color: #0000ff;"><span style="color: #008;" class="styled-by-prettify">export</span></span><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify"> ASE_CP2K_COMMAND</span><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: #a31515;"><span style="color: #080;" class="styled-by-prettify">"mpirun -np 2 cp2k_shell.popt"</span></span></div></div></div></code></div><br>an then use the following to run cp2k:<br></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; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><div style="color: #000000;background-color: #fffffe;font-family: 'monospace', Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #af00db;"><span style="color: #008;" class="styled-by-prettify">from</span></span><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify"> ase</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">calculators</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">cp2k </span></span><span style="color: #af00db;"><span style="color: #008;" class="styled-by-prettify">import</span></span><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify"> CP2K</span></span></div><div><span style="color: #af00db;"><span style="color: #000;" class="styled-by-prettify">from</span></span><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify"> ase</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">build </span></span><span style="color: #af00db;"><span style="color: #008;" class="styled-by-prettify">import</span></span><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify"> molecule</span></span></div><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">calc </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> CP2K</span><span style="color: #660;" class="styled-by-prettify">()</span></span></div><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">atoms </span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify"> molecule</span><span style="color: #660;" class="styled-by-prettify">(</span></span><span style="color: #a31515;"><span style="color: #080;" class="styled-by-prettify">'H2O'</span></span><span style="color: #000000;"><span style="color: #660;" class="styled-by-prettify">,</span><span style="color: #000;" class="styled-by-prettify"> calculator</span><span style="color: #660;" class="styled-by-prettify">=</span><span style="color: #000;" class="styled-by-prettify">calc</span><span style="color: #660;" class="styled-by-prettify">)</span></span></div><div><span style="color: #000000;"><span style="color: #000;" class="styled-by-prettify">atoms</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">center</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">vacuum</span><span style="color: #660;" class="styled-by-prettify">=</span></span><span style="color: #09885a;"><span style="color: #066;" class="styled-by-prettify">2.0</span></span><span style="color: #000000;"><span style="color: #660;" class="styled-by-prettify">)</span></span></div><div><span style="color: #795e26;"><span style="color: #008;" class="styled-by-prettify">print</span></span><span style="color: #000000;"><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #000;" class="styled-by-prettify">atoms</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">get_potential_energy</span><span style="color: #660;" class="styled-by-prettify">())</span></span></div></div></div></code></div><br>This cannot use GPUs, however. I don't think there is a package with GPU support, you would have to compile it yourself.<br></div><div><br></div><div>Fabian<br></div></div>