Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Feature: Distance-dependent Atom Rattling #8

Closed
kavanase opened this issue Apr 14, 2022 · 9 comments
Closed

Potential Feature: Distance-dependent Atom Rattling #8

kavanase opened this issue Apr 14, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@kavanase
Copy link
Member

This is an Issue to track the development of a potential feature of a 'localised rattle' function.

I realise the original 'localised rattle' function did work ok, as once the structure was run through the vasp_input.vasp_gam_files() function, it would reorder the POSCAR to be correct (initially appeared as if it was outputting structures in a format that would give the wrong POTCAR/POSCAR ordering).

Either way, the local rattle is not currently recommended or being used by anyone that I know of, so better to reimplement as an improved version, where the rattling displacement amplitude tails off as we move away from the defect site, rather than a hard cutoff radius. To do this, it will likely require a modified version of the hiphive mc_rattle function, with code similar to that here:
https://github.com/materialsproject/pymatgen/blob/834dc9c507f0ceb735887be2db358be37c52a4d7/pymatgen/transformations/site_transformations.py#L584 (similar idea but for spherical distortions).

This would likely avoid the performance decrease witnessed for 'localised rattling' with a hard cutoff radius (which is believed to be due to an initial long-range crystal potential still favouring the high-symmetry defect structure), by still breaking the long-range symmetry, but potentially with the added advantages of being more likely to avoid the sporadic cases of getting stuck in high-energy metastable states, and potentially a small speed boost (but likely marginal, based off previous tests).

@kavanase kavanase added the enhancement New feature or request label Apr 14, 2022
ireaml added a commit that referenced this issue Jul 21, 2022
@ireaml
Copy link
Collaborator

ireaml commented Jul 22, 2022

Initial tests of the tailed-off rattle for $\rm V_{Cd}^{0}$ in CdTe show similar results (equal number of bond distortions leading to the dimer ground state), while significant reduction in the number of ionic steps (tailed-off rattle requires a factor of 0.8 less ionic steps than the standard, full rattle).
Running similar tests for $\rm O_i^{0}$ in $\rm In_2O_3$ to see if same speed boost is observed for a more ionic system.
Will now set this tailed-off ratlle as the default.

Results here:
vac_Cd_0_energy_lowering_distortions

vac_1_Cd_0_ionic_steps

Tailed_off_rattle_V_Cd_CdTe.ipynb.zip

@kavanase
Copy link
Member Author

Sick! 🔥🔥

@kavanase
Copy link
Member Author

kavanase commented Aug 1, 2022

So once the $O_i$ in $In_2O_3$ results are posted here, we can close this issue as it's now been implemented yeah?

@ireaml
Copy link
Collaborator

ireaml commented Aug 2, 2022

So regarding $\rm O_i$ in $\rm In_2O_3$ the tailed-off tattle surprisingly performs worse than the full rattle. Applying a full rattle results in ~4 additional distortion factors leading to the ground state. Further, the full rattle also requires less ionic steps (factor of 0.8) than the tailed-off one. Will look further into this case to see if there's an explanation and run some more tests to compare.

O_i_In2O3_energy_lowering_distortions

Int_O_1_0_ionic_steps

Tailed_off_rattle_O_i_In2O3.ipynb.zip

@kavanase
Copy link
Member Author

kavanase commented Aug 2, 2022

Interesting!
I wonder if this is related to some of the behaviour we were seeing before where the long-range potential of the less-perturbed lattice helps to initially favour the high-symmetry coordination – perhaps a stronger effect in the more ionic materials due to longer range electrostatics?
And/or related to a lower distortion of the surrounding geometry in the groundstate structures for $V_{Cd}$ vs $O_i$ (so less dependent on the wider environment and more just dependent on the nearest-neighbour bonding?)

@ireaml
Copy link
Collaborator

ireaml commented Aug 3, 2022

Yeah, I agree. To check for the relation with the material ionicity and/or distortion of the surrounding geometry will test on $\rm Cd_i$/ $\rm Te_i$ in $\rm CdTe$ (less ionic, more distortion) and $\rm V_{Ti}$ in $\rm TiO_2$ / $\rm V_{In}$ in $\rm In_2O_3$ (more ionic, less distortion).

@kavanase
Copy link
Member Author

Hi @ireaml!
So I went to retest the two distortions in GeSe where it originally appeared that distorting a different number of neighbours than the SnB default gave the groundstate, and the SnB default didn't ($V_{Se}^0$ and $Se_{Ge}^{-2}$); to see if our new Monte Carlo rattling method improved performance, and see if any lessons could be learned from these cases.

image

Attached is the notebook (& PDF) of the tests I ran. A lot of data that can be skipped over, but the key points are that:
Key Takeaways:

  • Our current default SnB approach, distorting with 2NN and non-local rattle finds the groundstate (for this comp setup and supercell) ✅, which actually is a similar but different structure to the previous identified lower-energy structure. So nice that this previous failed case with our default approach isn't a failure anymore, with current rattle approach.
  • Distorting with the SnB default 2NN gives best performance here (found in more cases), but 4NN with higher ENCUT also finds it. This is interesting, as other systems I've seen (and tested during Bodoo's follow-up MSc project), ENCUT often didn't matter, especially if we were already at the energy-converged value... Here it seems to be related to the fact that increasing ENCUT significantly lowers the energy of the groundstate relative to unperturbed (from ~0.1-0.15 eV to 0.35 eV...). Wouldn't have expected this and I still think this is a rare phenomenon, but worth keeping in mind in case we notice it in any other systems.
  • Non-local rattle consistently outperforms the local rattle. Based on this, your results from $In_2O_3$, tests you've done before and from some other observations, I think we should have the non-local rattle as default. If you agree, let me know and I'll update this (and add "Typically gives worse performance." to the end of the docstring for the local_rattle parameter). Also will close this issue if so.
  • While the (new default) EDIFFG = -0.025 2NN search does find the groundstate structure, the relative energy of this and the unperturbed is greater when we reduced EDIFFG to the tighter -0.001. While this is def too tight to be our default, it suggests EDIFFG = -0.025 might be too loose in some cases, making it harder to find the groundstate.
    • I suspect this is material dependent, and that this is a particularly tough case here due to (1) significant anharmonicity and soft bonding/PESs, meaning we can require a tighter force convergence to properly reach the energy minimum and (2) the finite-size effect discussed in the notebook could possibly be contributing to the dependence on EDIFFG and ENCUT here.
    • Either way, I think this suggests we should probably keep the default EDIFFG as -0.01 to be safe. For now anyway, until we have more data about some of this. Do you agree? If so will update

GeSe_SnB_Retest.zip

@ireaml
Copy link
Collaborator

ireaml commented Sep 19, 2022

Ok very cool that the new SnB approach finds the ground state! 🥇

  • About setting the full rattle as default, sounds good!
  • About EDIFFG, I agree about setting the conservative value -0.01 as default for now to be safe. I'll run some tests on this along the NUPDOWN ones

@kavanase
Copy link
Member Author

Ok great! Will implement now 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants