[CP2K-user] Problems using cp2k interfaced with ase

Maxime Van den Bossche maxime.cp.... at gmail.com
Mon Jan 18 15:53:53 UTC 2021


Dear Lucas,

When encountering such problems, it is best to provide a 
minimum-working-example
that reproduces the original problem (instead of the full production script 
itself).
In many cases, this process itself will already indicate a solution.
Can you for example run the simple H2O example in 
https://www.cp2k.org/tools:ase?

If I would need to guess, I would bet that the "slab.calc = calc1" 
statement does not
properly initialize the calculator, and that you would need e.g. 
"slab.set_calculator(calc)"
instead.

Best,
Maxime
Op vrijdag 15 januari 2021 om 14:47:30 UTC+1 schreef ban... at gmail.com:

> Dear CP2K users,
>
> I am using cp2k interfaced with ase for calculating water adsorption on 
> surfaces. The last time I have tried, I obtained the following error 
> message:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Traceback (most recent call last):  File "Au_water.py", line 120, in 
> <module>    opt.run(fmax=0.05)  File 
> "/usr/lib/python3/dist-packages/ase/optimize/optimize.py", line 170, in 
> run    self.set_force_consistent()  File 
> "/usr/lib/python3/dist-packages/ase/optimize/optimize.py", line 223, in 
> set_force_consistent    
> self.atoms.get_potential_energy(force_consistent=True)  File 
> "/usr/lib/python3/dist-packages/ase/atoms.py", line 682, in 
> get_potential_energy    self, force_consistent=force_consistent)  File 
> "/usr/lib/python3/dist-packages/ase/calculators/calculator.py", line 441, 
> in get_potential_energy    energy = self.get_property('energy', atoms)  
> File "/usr/lib/python3/dist-packages/ase/calculators/calculator.py", line 
> 486, in get_property    self.calculate(atoms, [name], system_changes)  File 
> "/usr/lib/python3/dist-packages/ase/calculators/cp2k.py", line 233, in 
> calculate    self._create_force_env()  File 
> "/usr/lib/python3/dist-packages/ase/calculators/cp2k.py", line 303, in 
> _create_force_env    self._force_env_id = 
> int(self._shell.recv())ValueError: invalid literal for int() with base 10: 
> '--------------------------------------------------------------------------'/usr/lib/python3/dist-packages/ase/calculators/cp2k.py:472: 
> RuntimeWarning: CP2K-shell not ready, sending SIGTERM.  warn("CP2K-shell 
> not ready, sending SIGTERM.", RuntimeWarning)*
>
> Honestly, I have no idea what is wrong. Could somebody help me to solve 
> this problem? Attached to this email are the  .py file used for ase, the 
> generated cp2k input file and the error message. I am using cp2k version 
> 6.1.
>
> Yours faithfully, 
>
> Lucas Bandeira
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210118/05799aec/attachment.htm>


More information about the CP2K-user mailing list