Open sponce24 opened 3 years ago
Thanks @sponce24 - we should probably do some tests on some tens of systems to see if this behaviour is confirmed; in this case, we should think to change the default. Pinging @qiaojunfeng so he knows and can check the impact in his calculations.
Hello,
This is a suggestions of improvement (I think I do not have the required credential to add Labels apparently, so could someone add the correct label please?).
The default value for
num_cg_steps
is 5 and is most likely too small for most systems.To showcase this, here is the relative difference on the spread (i.e. value of the spread minus the converged value) on a logscale for Si with SOC. The x-axis is the number of iterations (by step of 10 so from 0 to 20,000 iterations). As you can see it takes 20,000 iterations (purple points) to reach convergence (
conv_tol
= 1E-12) using the default value ofnum_cg_steps
while it takes only 1320 iterations usingnum_cg_steps
= 100 (green points):The best would be to have an adaptative algorithm which makes the
num_cg_steps
small when the difference between the predicted and the calculated value of the spread after a step is large and makenum_cg_steps
large when the difference is small.In addition, one could add some small numerical noise to make sure that there are projections in all unexpected directions where to move and to avoid long plateau due to high symmetry solutions.
Best, Samuel