Open aizvorski opened 2 years ago
The gradients are available at every step, however since they are a rather large vector we so far refrained from printing them along the optimization trajectory.
What do you need the gradients for?
The gradients are available at every step, however since they are a rather large vector we so far refrained from printing them along the optimization trajectory.
What do you need the gradients for?
I need a large number of closely related structures with gradients, plus the optimized structure, to get a bit of an idea of the shape of the potential energy surface. I could calculate the optimized structure then perturb it at random (or run md) and do a bunch of single point calculations, but it seems that getting the gradients during optimization would be basically free. I think the optimization is faster than doing many separate single point calculations - does it reuse some of the SCF results?
Wouldn't it be easier to drive xtb
by the API and provide new structures while performing single points and record the gradient? This way you could easily exploit restarting, without the extra overhead due to IO.
@awvwgk It seems that'd be less efficient, double the compute even with restarting. Let's say 100 steps to optimize a structure, then 100 single point calculations with gradient - vs 100 steps to optimize a structure saving gradient at each step
Is your feature request related to a problem? Please describe. I'd like to get the gradients for every step during a geometry optimization
Describe the solution you'd like
xtb input.xyz --opt --grad
to save the gradients for all steps in the gradients file; or possibly in a new file xtbopt.gradientsDescribe alternatives you've considered I tried combining the --opt and --grad options. It apears that if --grad is first, the program does a gradient calculation only; if --opt is first then it does geometry optimization and then saves the gradient from the final structure.
Additional context I'm wondering, would gradients during optimization be almost-free / low-overhead to get? Are they available in ANC coordinates only, or both ANC and cartesian coordinates?