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

Elizabeth Lee elizam... at gmail.com
Wed Apr 21 06:04:47 UTC 2021


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20210420/3cdccd98/attachment.htm>


More information about the CP2K-user mailing list