A few people, including @Ainosya and @matterhorn103 have suggested a mode in which Avogadro “follows” an optimization or dynamics run in a different program.
I’m curious to outline what this might look like from the user side and consider what’s needed on the developer / API side (e.g., is this an extension of the
energy scripts or something else).
- Start a calculation (e.g.,
- Avogadro gets asynchronous updates of coordinates
- Does this also include other properties? Forces? Energies? something else?
- What happens when the calculation finishes? Is there an indication to the user?
On a similar note, I know there are “streaming” options for molecular dynamics calculations (e.g., all the data is left on a server) … anyone have any pointers to those packages / API?
The problem for me (coming from an electronic structure background) in terms of “following” an optimisation run is one of time scale. If we use a semi-empirical method then the updates are likely to be so quick that I have no time to analyse them. For a long calculation [e.g., PNO-LCCSD(T) or similar], I’m probably going to submit that via a HPC queuing system anyway.
However, being able to read-in and analyse a running calculation seems like it would be useful and that would cover many of the same bases (two birds one stone?). In such a case I’d like to see a plot of the progress of the energy per geometry optimisation step, along with any of the criteria used in determining convergence (gradients, step size…).
In the case of following a running job, I think there would need to be an indication to the user. First thought is a dialogue box that says if the job was successful or tries to pass on the error message. Could be a little annoying if you were also working on something else though.
Certainly there’s a real need for a plot of energy or other properties (max gradient, gradient norm, etc.) through a set of calculations. I’m working on a better plot window for spectra and once done, adding a plot of energies should be fairly easy. (Famous last words.)
Several people have suggested a dock / toolbar widget that shows the number of steps, \Delta E from the first step, etc. I imagine like all open source, once something happens, people will have a variety of good ideas to make it better.
Sounds like such a feature needs to send a few kinds of updates (e.g., via some sort of JSON API):
- current step
- current energy (probably still applies to an MD simulation)
- updated coordinates
- updated forces / gradients
Of course before I solve that, I need to figure out why the
xtb-python script isn’t working reliably.