<div dir="ltr"><div class=""><img class="" id=":1wm" src="https://mail.google.com/mail/u/0/images/cleardot.gif" alt=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> You should be able to use the force flags, I think. These encode what<br>
> needs to be done every step (e.g. NS step or not, energy or<br>
> force-only), it gets set in do_md and passed to do_force.<br>
That's only the easy part.<br>
Then you need to use a multiple timestep integrator. We have such an<br>
integrator, but it's currently linked to twin-range non-bonded<br>
interactions. You would need to modify some control code to make it work<br>
on your potential. The essential function is combine_forces in<br>
mdlib/update.c which combines the fast and slow forces for the integrator.<br></blockquote><div><br></div><div>So
I set the flag in do_md (considering bTwinRange and do_per_step), then
check it in do_force_lowlevel to decide whether or not to call my new
code. And then I need to store the forces and use them in
combine_forces. Is that the gist of it?<br>
<br></div>
<br>>Cheers,<br>
><br>
>Berk<br>
>><br>
>> Cheers,<br>
>> --<br>
>> Szil?rd<br>
>><br>
>><br>
>> On Wed, Feb 5, 2014 at 12:51 PM, Alexander Bj?rling<br>
>> <<a href="mailto:alex.bjorling@gmail.com" target="_blank">alex.bjorling@gmail.com</a>> wrote:<br>
>>> Hi,<br>
>>><br>
>>> Our new bonded interaction (at <a href="https://gerrit.gromacs.org/#/c/2659/" target="_blank">https://gerrit.gromacs.org/#/c/2659/</a>) is very<br>
>>> expensive to evaluate and gives rise to a force which varies slowly in time.<br>
>>> I'd like these forces to only be updated every N steps and to remain<br>
>>> constant in between. What is the proper way to achieve this?<br>
>>><br>
>>> Best,<br>
>>> Alex<br>
>>></div>