Every keyword in fix addforce

In my simulation, I used the fix addforce to add forces to atoms, but the process of obtaining these forces is quite complex, involving numerous computes and variables, which is time-consuming. I noticed that fix addforce includes an ‘every’ keyword. Does this ‘every’ mean that the force is added to the system every ‘Nevery’ steps (like every 50 steps) without adding force in between those steps; or does it mean that the force added is updated every 50 steps, with the additional force added remaining constant during the 50 steps and then updated again once 50 steps are completed?

“If the every keyword is used, the Nevery setting determines how often the forces are applied. The default value is 1, for every time step.” from fix_addforce.html.

Thank you for your response. Does that mean that if I use every 50 , then no force will be added to the atoms during the intervening 49 steps? Or is a constant force, the same as at step 1, added, just not updated?

What ask the same question twice? You already did get an answer (and a correct one). What you are speculating about does not correspond to what is said in the manual and besides, it would be extremely easy to set up a test system with just a few atoms and confirm or disprove either of your hypotheses.

1 Like