Hello,
I have a driver code that calls lammps as a library to extract forces and the potential energy of an atomic configuration. I have to call lammps
many times within a loop. Currently, to compute the energy I achieve my goal by issuing the commands:
lmp->input->one(“run 0 post no”);
energy = ((double) lammps_extract_compute(lmp,“thermo_pe”,0,0));
The problem is that I would like to speed up the process as the
“run 0” command may be performing more operations that those I need just
to get the potential energy of my system.
What would be a minimal setup (if possible) to trigger the PE computation
while avoiding some of the unnecessary work that is done by
update->integrate->setup(); within the run command? (I believe that is where the delay happens)
Carlos