<p dir="ltr">I am using CP2K 2.6. Is that too old and not supported?</p>
<div class="gmail_quote">On May 10, 2016 12:40 PM, "Ole Schütt" <<a href="mailto:o...@schuett.name">o...@schuett.name</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Satish,<br>
<br>
it seems like your using a fairly dated version of CP2K. I'm afraid you'll have to update your CP2K installation in order to use the ASE calculator.<br>
<br>
-Ole<br>
<br>
On 2016-05-10 18:33, Satish Kumar wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ole<br>
<br>
I was experiencing a  similar problem but in line 183 of cp2k.py,<br>
which is related to<br>
"Error unknown command VERSION". Following is what I did:<br>
<br>
$python<br>
<br>
Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) <br>
<br>
[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2<br>
<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
from ase.calculators.cp2k import CP2K<br>
</blockquote></blockquote></blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
from ase.structure import molecule<br>
</blockquote></blockquote></blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
CP2K.command="env OMP_NUM_THREADS=1<br>
</blockquote></blockquote></blockquote>
/usr/local/openmpi-1.8.4-gnu/bin/mpirun -n 24 cp2k_shell.popt"<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
calc = CP2K()<br>
</blockquote></blockquote></blockquote>
<br>
Traceback (most recent call last):<br>
<br>
  File "<stdin>", line 1, in <module><br>
<br>
  File "/usr/lib/python2.6/site-packages/ase/calculators/cp2k.py",<br>
line 183, in __init__<br>
<br>
    assert self._recv() == '* READY'<br>
<br>
AssertionError<br>
<br>
#Now with debug=True<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
calc = CP2K(debug=True)<br>
</blockquote></blockquote></blockquote>
<br>
env OMP_NUM_THREADS=1 /usr/local/openmpi-1.8.4-gnu/bin/mpirun -n 24<br>
cp2k_shell.popt<br>
<br>
Received: * READY<br>
<br>
Sending: VERSION<br>
<br>
Received: * ERROR unknown command VERSION<br>
<br>
Received: * ERROR, type HELP for help<br>
<br>
Traceback (most recent call last):<br>
<br>
  File "<stdin>", line 1, in <module><br>
<br>
  File "/usr/lib/python2.6/site-packages/ase/calculators/cp2k.py",<br>
line 183, in __init__<br>
<br>
    assert self._recv() == '* READY'<br>
<br>
AssertionError<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote></blockquote></blockquote>
<br>
When I am manually working with cp2k_shell.popt, I do see the 'READY<br>
*' status <br>
and the cp2k_shell.popt seem to be fine. I also tried with Python<br>
2.7.3 but the <br>
Assertion Error persists. <br>
<br>
Thank you for your time.<br>
<br>
On Wednesday, July 1, 2015 at 12:09:35 PM UTC-4, Ole Schütt wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Indeed, replacing cp2k.popt with cp2k_shell.popt solved the<br>
</blockquote>
problem. Many thanks!<br>
<br>
I'm glad to read that.<br>
I just committed a patch to the ASE svn repository. Now it should<br>
also work with Python 3.<br>
<br>
Since you are apparently one of the first users of this new ASE-CP2K<br>
interface, I'm very curious about your experiences.<br>
So, please let me know if you encounter any more problems.<br>
<br>
-Ole<br>
<br>
Am Mittwoch, 1. Juli 2015 14:27:23 UTC+2 schrieb S Ling:<br>
<br>
Hi Ole,<br>
<br>
Indeed, replacing cp2k.popt with cp2k_shell.popt solved the<br>
problem. Many thanks!<br>
<br>
SL<br>
<br>
On 1 July 2015 at 12:02, Ole Schütt <<a href="mailto:o....@schuett.name" target="_blank">o....@schuett.name</a>> wrote:<br>
<br>
Hi SLing,<br>
<br>
it looks like you set<br>
<br>
  ASE_CP2K_COMMAND=aprun -n 24 -N 24 cp2k.popt<br>
<br>
while you should set it to the cp2k_shell instead:<br>
<br>
  ASE_CP2K_COMMAND=aprun -n 24 -N 24 cp2k_shell.popt<br>
<br>
I realize that this is not obvious. I'll see if I can print a more<br>
meaning full error message for this in the future.<br>
<br>
-Ole<br>
<br>
Am Mittwoch, 1. Juli 2015 12:01:22 UTC+2 schrieb S Ling:<br>
<br>
Hi Ole,<br>
<br>
Please see below error message if I ran the script with debugging.<br>
<br>
SL<br>
<br>
===============<br>
aaa@mom3:/work/aaa/ase/ase/test/cp2k> python cp2k_H2_PBE.py<br>
aprun -n 24 -N 24 cp2k.popt<br>
Received:<br>
Traceback (most recent call last):<br>
  File "cp2k_H2_PBE.py", line 33, in <module><br>
    main()<br>
  File "cp2k_H2_PBE.py", line 23, in main<br>
    calc = CP2K(debug=True, xc='PBE', label='test_H2_PBE')<br>
  File "/work/aaa/ase/ase/calculators/cp2k.py", line 160, in<br>
__init__<br>
    assert self._recv() == '* READY'<br>
AssertionError<br>
Sending: EXIT<br>
<br>
On 1 July 2015 at 10:32, Ole Schütt <<a href="mailto:o....@schuett.name" target="_blank">o....@schuett.name</a>> wrote:<br>
<br>
Hi SLing,<br>
<br>
that appears to be a slightly different error message now. Could you<br>
run the script again with debugging:<br>
<br>
   calc = CP2K(debug=True, ...)<br>
<br>
... and send me the output? It should show the communication between<br>
ASE and the cp2k_shell.<br>
<br>
-Ole<br>
<br>
Am Mittwoch, 1. Juli 2015 11:17:14 UTC+2 schrieb S Ling:<br>
<br>
Hi Ole,<br>
<br>
I have just tried to install ASE using Python 2.7.6, and I still<br>
got a similar error message.<br>
<br>
SL<br>
<br>
===============<br>
aaa@mom3:/work/aaa/ase/ase/test/cp2k> python cp2k_H2_PBE.py<br>
Traceback (most recent call last):<br>
  File "cp2k_H2_PBE.py", line 33, in <module><br>
    main()<br>
  File "cp2k_H2_PBE.py", line 23, in main<br>
    calc = CP2K(xc='PBE', label='test_H2_PBE')<br>
  File "/work/aaa/ase/ase/calculators/cp2k.py", line 160, in<br>
__init__<br>
    assert self._recv() == '* READY'<br>
AssertionError<br>
<br>
On 1 July 2015 at 06:20, Ole Schütt <<a href="mailto:o....@schuett.name" target="_blank">o....@schuett.name</a>> wrote:<br>
<br>
Hi SLing,<br>
<br>
it seems like you are using Python 3 and have run into a common<br>
incompatibility issue. I'll look into it.<br>
Thanks for reporting this.<br>
<br>
-Ole<br>
<br>
Am Mittwoch, 1. Juli 2015 00:29:30 UTC+2 schrieb S Ling:<br>
Hi<br>
<br>
I was trying several of the CP2K/ASE tests listed on the following<br>
website,<br>
<br>
<a href="http://www.cp2k.org/tools:ase" rel="noreferrer" target="_blank">http://www.cp2k.org/tools:ase</a> [1]<br>
<br>
and I got the following error message. I am not very familiar with<br>
ASE. Can you tell me what does the error message mean? Two relevant<br>
environment variables ASE_CP2K_COMMAND and CP2K_DATA_DIR have been<br>
set, and I don't think the error is related to that.<br>
<br>
Many thanks!<br>
<br>
SL<br>
<br>
[aaa@www cp2k]$ python cp2k_O2.py <br>
Traceback (most recent call last):<br>
  File "cp2k_O2.py", line 35, in <module><br>
    main()<br>
  File "cp2k_O2.py", line 25, in main<br>
    basis_set="SZV-MOLOPT-SR-GTH")<br>
  File<br>
<br>
</blockquote>
"/home/aaa/.local/lib/python3.3/site-packages/ase/calculators/cp2k.py",<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
line 160, in __init__<br>
    assert self._recv() == '* READY'<br>
AssertionError<br>
Exception TypeError: "'str' does not support the buffer interface"<br>
in <bound method CP2K.__del__ of <ase.calculators.cp2k.CP2K object<br>
at 0x2ae385f1b250>> ignored<br>
<br>
--<br>
You received this message because you are subscribed to the Google<br>
Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it,<br>
send an email to <a href="mailto:cp2k%2...@googlegroups.com" target="_blank">cp2k+...@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="http://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">http://groups.google.com/group/cp2k</a> [2].<br>
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a> [3].<br>
</blockquote>
<br>
 --<br>
 You received this message because you are subscribed to the Google<br>
Groups "cp2k" group.<br>
 To unsubscribe from this group and stop receiving emails from it,<br>
send an email to <a href="mailto:cp2k%2...@googlegroups.com" target="_blank">cp2k+...@googlegroups.com</a>.<br>
 To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
 Visit this group at <a href="http://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">http://groups.google.com/group/cp2k</a> [2].<br>
 For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a> [3].<br>
<br>
 --<br>
 You received this message because you are subscribed to the Google<br>
Groups "cp2k" group.<br>
 To unsubscribe from this group and stop receiving emails from it,<br>
send an email to <a href="mailto:cp2k%2...@googlegroups.com" target="_blank">cp2k+...@googlegroups.com</a>.<br>
 To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
 Visit this group at <a href="http://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">http://groups.google.com/group/cp2k</a> [2].<br>
 For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a> [3].<br>
<br>
 --<br>
 You received this message because you are subscribed to the Google<br>
Groups "cp2k" group.<br>
 To unsubscribe from this group and stop receiving emails from it,<br>
send an email to <a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
 To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
 Visit this group at <a href="https://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">https://groups.google.com/group/cp2k</a> [4].<br>
 For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a> [3].<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://www.cp2k.org/tools:ase" rel="noreferrer" target="_blank">http://www.cp2k.org/tools:ase</a><br>
[2] <a href="http://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">http://groups.google.com/group/cp2k</a><br>
[3] <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a><br>
[4] <a href="https://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">https://groups.google.com/group/cp2k</a><br>
</blockquote>
<br>
-- <br>
You received this message because you are subscribed to a topic in the Google Groups "cp2k" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/cp2k/t-88ZILx4lk/unsubscribe" rel="noreferrer" target="_blank">https://groups.google.com/d/topic/cp2k/t-88ZILx4lk/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:cp2k%2Bun...@googlegroups.com" target="_blank">cp2k+uns...@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:cp...@googlegroups.com" target="_blank">cp...@googlegroups.com</a>.<br>
Visit this group at <a href="https://groups.google.com/group/cp2k" rel="noreferrer" target="_blank">https://groups.google.com/group/cp2k</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div>