You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m writing a custom action inheriting ActionAtomistic and getForce returns zero at every step. I am using Gromacs 2024.3 patched with Plumed 2.10, and what I need are the forces calculated by the MD engine. This is my code, I have tried running it both within calculate() and apply():
Vector sumF(0.0,0.0,0.0);
for(unsigned i=0; i<getNumberOfAtoms(); i++) {
std::pair<std::size_t,std::size_t> a = getValueIndices( AtomNumber::index(i));
Vector f = getForce(a);
sumF+=f;
}
What exact method should I use to read per-atom forces inside ActionAtomistic for PLUMED 2.10? (what argument type does getForce expect?)
Do I need to register/request forces in the constructor/initialise step? If so, what minimal code is needed?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I’m writing a custom action inheriting ActionAtomistic and getForce returns zero at every step. I am using Gromacs 2024.3 patched with Plumed 2.10, and what I need are the forces calculated by the MD engine. This is my code, I have tried running it both within calculate() and apply():
What exact method should I use to read per-atom forces inside ActionAtomistic for PLUMED 2.10? (what argument type does getForce expect?)
Do I need to register/request forces in the constructor/initialise step? If so, what minimal code is needed?
Thanks,
Manuela
Beta Was this translation helpful? Give feedback.
All reactions