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

Aniruddha Dive anirud... at gmail.com
Mon Aug 17 23:42:29 UTC 2020


Thanks Geng,

I went through your earlier post regarding the same issue. Can you send me 
the respective cp2k_shell.F file that works for you. I would like to 
incorporate it and check.

Also can you send me the python script you used as well.

Best Regards,
Aniruddha M Dive

On Monday, August 17, 2020 at 7:44:08 AM UTC-7, Sun Geng wrote:
>
> Dear Aniruddha,
>
> Sometimes ago, I have encountered a similar problem,
> I think the reason is that the python code communicates positions/forces 
> with the mpi cp2k_shell.popt. 
> 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.
> So CP2K_shell.popt is still waiting for more coordinates and gets stuck.
>
> Best,
> Geng
>
>
>
> 在2020年8月13日星期四 UTC-7 下午1:20:17<ani... at gmail.com> 写道:
>
>> 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> 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.
>>>
>>>
>>>> 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/20200817/27bce155/attachment.htm>


More information about the CP2K-user mailing list