[CP2K-user] [CP2K:13720] Re: Running CP2K calc with ASE

Aniruddha Dive anirud... at gmail.com
Thu Aug 13 20:20:17 UTC 2020


Thanks Hasan,

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? 

Best,
Aniruddha M Dive

On Tuesday, August 4, 2020 at 10:12:17 AM UTC-7, Hasan Al-Mahayni wrote:
>
> Hello,
>
> 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.
>
> Cheers,
>
> Hasan.
>
> On Tue, Aug 4, 2020 at 1:16 AM Maxime Van den Bossche <
> maxi... at gmail.com <javascript:>> wrote:
>
>> Dear Aniruddha,
>>
>> Since you haven't provided a minimal example, nor the error message 
>> you're getting
>> from ASE or CP2K, I haven't looked into debugging the (bulky) example you 
>> sent.
>>
>> But I don't think you can do the geometry optimization in this way. ASE 
>> uses the cp2k_shell binary,
>> which seems to only perform single-point calculations but not e.g. 
>> geometry optimizations.
>>
>> The idea behind cp2k_shell is that the 'driver' (in this case ASE) is the 
>> one moving the atoms
>> around, and what CP2K does is e.g. calculating the energy and the 
>> gradients for a given geometry.
>>
>> Here is a minimal example of a geometry optimization, and you can work 
>> your way up
>> from there:
>>
>> from ase.build import molecule
>> from ase.calculators.cp2k import CP2K
>> from ase.optimize import BFGS
>>
>> atoms = molecule('H2O')
>> atoms.center(vacuum=2.0)
>>
>> calc = CP2K(command='cp2k_shell.sopt')
>> atoms.set_calculator(calc)
>>
>> dyn = BFGS(atoms)
>> dyn.run(fmax=0.05)
>>
>> Best regards,
>> Maxime
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "cp2k" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to c... at googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/cp2k/df050a2d-1161-4e2c-98c9-0463adcb4c3do%40googlegroups.com 
>> <https://groups.google.com/d/msgid/cp2k/df050a2d-1161-4e2c-98c9-0463adcb4c3do%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200813/fd2b54b8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LLZO_base.out
Type: application/octet-stream
Size: 548705 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200813/fd2b54b8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basin_hop.sh
Type: text/x-sh
Size: 408 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200813/fd2b54b8/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bh_cp2k.py
Type: text/x-python
Size: 3655 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200813/fd2b54b8/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slurm-5606428.out
Type: application/octet-stream
Size: 802 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20200813/fd2b54b8/attachment-0001.obj>


More information about the CP2K-user mailing list