Improving Double Relaxation Run?

Dear Atomate team

I am running the Atomate for my project and my supervisor suggests to me that instead of using the default double relaxation runs to obtain the optimized structures, we can use a script to check

the number of ionic steps used in the relaxation. If the number of ionic steps is equal to the maximum number we request for, proceed to second relaxation. If the number of ionic steps is less than the maximum number we request, then there
is no need to do a second relaxation. Also, there should be steps involved to check that the number of electronic steps is always smaller than the maximum number requested.

Before writing a new script, I’d like to make sure that I’m not making a wrong choice. Hence may I check with you if there is a retionale (advantage?) for using the double relaxation run as the default relaxation workflow rather than using
soemthing like what is suggested above when you first designed the workflow?

Best wishes

Yaze

Hi Yaze

There are already checks in place to make sure that the max ionic and electronic steps are not exceeded through the custodian package. The run is marked as unsuccessful if it hits these limits so there are no “falsely converged” tasks so long as you restrict to state=successful when searching through tasks. The workflow will also be marked as FIZZLED when this is the case. These custodian checks can be browsed in the custodian package and turned on/off as needed in atomate.

As for the rationale for double relaxation run, it not because of the possibility of running into the max limits. It is because even in a successful initial relaxation, many things like k-point grid, plane wave basis, etc. are done on the basis of the initial lattice parameters in VASP. If the lattice parameters change significantly during relaxation, then it is safest to do a second run in which you re-start the calculation (hence re-initializing the grids and basis) with something close to the final lattice parameters. This will make sure the calculation is actually converged according to the precision you specified.

Note that the custodian also has a way to do only half kpoints on the first relaxation to try and get the lattice parameters close to final, and then do the full kpoint mesh on the second relaxation. This keeps the calculation cost fairly low while accounting for the consideration of change in basis and grids upon relaxation. There are also ways in atomate to do either single relaxation only, or to keep doing relaxations until the difference between subsequent relaxations is not too high.

···

Best,
Anubhav

Hi Dr. Jain

Thanks a lot for your prompt reply. Your answer is very insightful and helpful indeed; it answers the question beautifully.

I have read the discussion page where the “half k-mesh on first run approach” is discussed. May I check with you if the current “half k-mesh on first run appraoch” still has any impact on stability? As from

https://github.com/hackingmaterials/atomate/issues/19

I get the idea that the “half k-mesh on first run appraoch” leads to some (~10%) of the more challenging jobs not converging.

Best wishes

Yaze

Hi Yaze

Unfortunately that thread mixes multiple conversations and also never came to a clear consensus. My memory of it is:

  • The 10% errors are not about the half_kpt_relax, but rather switching to force convergence (negative EDIFFG) rather than energy convergence for the structure relaxations. A force convergence is a higher quality answer but might result in not converging at all for difficult systems.

  • For half_kpt_relax, my understanding is the UCSD Ong group uses this regularly. When one of my postdocs tested this, he suggested that if this setting is turned on, it is better to turn up the k-point density from the defaults in atomate, otherwise half of the default k-point mesh is too small even for an initial relaxation. We have no large-scale or official tests to really tell one way or the other, just what’s on that thread. For now, our own group has stuck to the “default” 2 relaxations with full kpoints for both just for consistency with previous work, but it is likely that better strategies (more accurate results or less calculation time) can be developed.

Unfortunately, this means you will just have to test to see what works best for your problem. If you have simple, highly symmetric structures, you are likely OK doing things in a way that isn’t super careful. If you have more complex structures, are applying +U, etc. then it’s more likely that you’d want to be careful in the relaxation procedure.

···

On Thursday, November 29, 2018 at 11:03:50 AM UTC-5, Yaze Wu wrote:

Hi Dr. Jain

Thanks a lot for your prompt reply. Your answer is very insightful and helpful indeed; it answers the question beautifully.

I have read the discussion page where the “half k-mesh on first run approach” is discussed. May I check with you if the current “half k-mesh on first run appraoch” still has any impact on stability? As from

https://github.com/hackingmaterials/atomate/issues/19

I get the idea that the “half k-mesh on first run appraoch” leads to some (~10%) of the more challenging jobs not converging.

Best wishes

Yaze


From: Anubhav Jain [email protected]
Sent: Thursday, November 29, 2018 11:28:06 PM
To: [email protected]
Cc: [email protected]
Subject: Re: Improving Double Relaxation Run?

Hi Yaze

There are already checks in place to make sure that the max ionic and electronic steps are not exceeded through the custodian package. The run is marked as unsuccessful if it hits these limits so there are no “falsely converged” tasks so long as you restrict
to state=successful when searching through tasks. The workflow will also be marked as FIZZLED when this is the case. These custodian checks can be browsed in the custodian package and turned on/off as needed in atomate.

As for the rationale for double relaxation run, it not because of the possibility of running into the max limits. It is because even in a successful initial relaxation, many things like k-point grid, plane wave basis, etc. are done on the basis of the
initial lattice parameters in VASP. If the lattice parameters change significantly during relaxation, then it is safest to do a second run in which you re-start the calculation (hence re-initializing the grids and basis) with something close to the final
lattice parameters. This will make sure the calculation is actually converged according to the precision you specified.

Note that the custodian also has a way to do only half kpoints on the first relaxation to try and get the lattice parameters close to final, and then do the full kpoint mesh on the second relaxation. This keeps the calculation cost fairly low while accounting
for the consideration of change in basis and grids upon relaxation. There are also ways in atomate to do either single relaxation only, or to keep doing relaxations until the difference between subsequent relaxations is not too high.

On Thu, Nov 29, 2018 at 10:04 AM Yaze Wu [email protected] wrote:

Dear Atomate team

I am running the Atomate for my project and my supervisor suggests to me that instead of using the default double relaxation runs to obtain the optimized structures, we can use a script to check

the number of ionic steps used in the relaxation. If the number of ionic steps is equal to the maximum number we request for, proceed to second relaxation. If the number of ionic steps is less than the maximum number we request, then there
is no need to do a second relaxation. Also, there should be steps involved to check that the number of electronic steps is always smaller than the maximum number requested.

Before writing a new script, I’d like to make sure that I’m not making a wrong choice. Hence may I check with you if there is a retionale (advantage?) for using the double relaxation run as the default relaxation workflow rather than using
soemthing like what is suggested above when you first designed the workflow?

Best wishes

Yaze

You received this message because you are subscribed to the Google Groups “atomate” group.

To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].

To post to this group, send email to
[email protected].

For more options, visit
https://groups.google.com/d/optout
.


Best,

Anubhav