[CP2K-user] [CP2K:15170] Possible python interface and passing forces to cp2k

hut... at chem.uzh.ch hut... at chem.uzh.ch
Wed Apr 21 08:13:54 UTC 2021


Hi

it seems to me what you are looking for is i-Pi (or ASE).

regards

Juerg Hutter
--------------------------------------------------------------
Juerg Hutter                         Phone : ++41 44 635 4491
Institut für Chemie C                FAX   : ++41 44 635 6838
Universität Zürich                   E-mail: hut... at chem.uzh.ch
Winterthurerstrasse 190
CH-8057 Zürich, Switzerland
---------------------------------------------------------------

-----cp... at googlegroups.com wrote: -----
To: "cp2k" <cp... at googlegroups.com>
From: "Elizabeth Lee" 
Sent by: cp... at googlegroups.com
Date: 04/21/2021 08:05AM
Subject: Re: [CP2K:15170] Possible python interface and passing forces to cp2k

Thank you so much, everyone, for your responses!
After looking at cp2k/src/f77_interface.F and cp2k/src/start/python, it seems like there are functions for returning forces acting on each atoms, e.g., get_force(). 
Are there functions that can be called via python where one could add external forces to cp2k at time t, and then have cp2k to output the new position, velocity, and forces at time t + delta t? 

Any insight on this is greatly appreciated.

Best,

Elizabeth
On Friday, April 16, 2021 at 10:30:26 AM UTC-5 tiz... at chem.uzh.ch wrote:
Hi Elizabeth, 
 
there are are also the libcp2k-based Python bindings you can build with  
(required are numpy and cython): 
 
     make python-bindings 
 
An example Python script to use them (and to get positions and forces  
from a force_env), some tests and a README are in src/start/python/. 
 
For running with MPI you will also need mpi4py. 
 
Best regards, 
Tiziano 
 
On 4/14/21 3:14 AM, Elizabeth Lee wrote: 
> Hello everyone, 
>  
> I was wondering if there is a way to pass positions & forces to and from  
> cp2k MD integrator with some python interface? 
> It seems like cp2k has a "driver" mode that works with IPi as shown below: 
>  
> https://manual.cp2k.org/cp2k-2_6-branch/CP2K_INPUT/MOTION/DRIVER.html 
>  
> But it is not clear to me what can be passed to and from cp2k when using  
> in the driver mode. 
>  
> Thank you. 
>  
> Best, 
>  
> Elizabeth 
>  
> --  
> 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 cp... at googlegroups.com  
> <mailto:cp... at googlegroups.com>. 
> To view this discussion on the web visit  
> https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com  
> <https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com?utm_medium=email&utm_source=footer>. 
 
--  
Tiziano Müller 
University of Zurich 
Department of Chemistry 
Winterthurerstrasse 190 
CH-8057 Zürich 
 
Tel: +41 44 63 54234 
www.chem.uzh.ch 
tiz... at chem.uzh.ch 
  
  -- 
 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 cp... at googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/8390d9a8-f21b-4f8f-9601-61e89039cd18n%40googlegroups.com.




More information about the CP2K-user mailing list