Thank you so much, everyone, for your responses!<div>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(). </div><div>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? </div><div><br></div><div>Any insight on this is greatly appreciated.</div><div><br></div><div>Best,</div><div><br></div><div>Elizabeth</div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Friday, April 16, 2021 at 10:30:26 AM UTC-5 tiz...@chem.uzh.ch wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Elizabeth,
<br>
<br>there are are also the libcp2k-based Python bindings you can build with 
<br>(required are numpy and cython):
<br>
<br>     make python-bindings
<br>
<br>An example Python script to use them (and to get positions and forces 
<br>from a force_env), some tests and a README are in src/start/python/.
<br>
<br>For running with MPI you will also need mpi4py.
<br>
<br>Best regards,
<br>Tiziano
<br>
<br>On 4/14/21 3:14 AM, Elizabeth Lee wrote:
<br>> Hello everyone,
<br>> 
<br>> I was wondering if there is a way to pass positions & forces to and from 
<br>> cp2k MD integrator with some python interface?
<br>> It seems like cp2k has a "driver" mode that works with IPi as shown below:
<br>> 
<br>> <a href="https://manual.cp2k.org/cp2k-2_6-branch/CP2K_INPUT/MOTION/DRIVER.html" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://manual.cp2k.org/cp2k-2_6-branch/CP2K_INPUT/MOTION/DRIVER.html&source=gmail&ust=1619069427614000&usg=AFQjCNG-WYRoebUUUXQiAg-FHjSjHCGH9Q">https://manual.cp2k.org/cp2k-2_6-branch/CP2K_INPUT/MOTION/DRIVER.html</a>
<br>> 
<br>> But it is not clear to me what can be passed to and from cp2k when using 
<br>> in the driver mode.
<br>> 
<br>> Thank you.
<br>> 
<br>> Best,
<br>> 
<br>> Elizabeth
<br>> 
<br>> -- 
<br>> You received this message because you are subscribed to the Google 
<br>> Groups "cp2k" group.
<br>> To unsubscribe from this group and stop receiving emails from it, send 
<br>> an email to <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> 
<br>> <mailto:<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>>.
<br>> To view this discussion on the web visit 
<br>> <a href="https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%2540googlegroups.com&source=gmail&ust=1619069427614000&usg=AFQjCNEDRGfezaPEaHL2QUE6s0Rh0JHKGA">https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com</a> 
<br>> <<a href="https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1619069427614000&usg=AFQjCNFMuWqiZHZTnLzlBijRTl7niwhimw">https://groups.google.com/d/msgid/cp2k/40172e78-eb3e-4ad8-b087-b0b395422f5an%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br>
<br>-- 
<br>Tiziano Müller
<br>University of Zurich
<br>Department of Chemistry
<br>Winterthurerstrasse 190
<br>CH-8057 Zürich
<br>
<br>Tel: +41 44 63 54234
<br><a href="http://www.chem.uzh.ch" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=en&q=http://www.chem.uzh.ch&source=gmail&ust=1619069427614000&usg=AFQjCNEYfgOUMfVgIMORi_GZ8HjD1KcfTw">www.chem.uzh.ch</a>
<br><a href data-email-masked rel="nofollow">tiz...@chem.uzh.ch</a>
<br></blockquote></div>