Comments (11)
Yup, that's a good logic!
I guess we could add an optional parameter (like same_seed
or a better name) to use the same rattle seed, for compatibility with older versions and current tests?
from shakenbreak.
Now implemented in commits aeddcb2 to 777ecd2 ๐ ๐
I think this is a nice enhancement to the code!
from shakenbreak.
Hi Seรกn!
You're right, I remember that 8/10% stdev
was often fine, and think we recommended it in the inital version of the Example Notebook
for compounds with strong ionic bonding or short distances. Sb2S3 was fine but think there was an issue with GaAs (where 0.25 โซ would be 9.8%)
From that data, I think it def makes sense to rerun a few cases to sanity check they are fine with smaller stdev
and if so, refactor it to 7.5%/10% as you say :)
from shakenbreak.
Ok cool! Will keep you posted!
from shakenbreak.
Hey @ireaml, results are in!
So for the 14 specific vacancies I found for this to occur (from around 300), each now ran fine with no consistent 'stuck-rattle' high energies, using stdev
s equal to 7.5% and 10% of the bulk bond length, except for one of the two inequivalent vacancies in Na5NbO5 in the +2 charge state.
The 7.5% and 10% bond length rattles for this still give a Rattled
structure 0.16 eV higher in energy. I reran this one with 2.5% and 5% rattles (0.0475 โซ and 0.095 โซ respectively), and these run fine, and actually find a much lower energy structure. Here I've renamed these folders to Rattled_from_stdev_0_X
where X
= 025
, 05
, 075
and 1
for the different stdev
percentages, to use snb-plot
to show together:
For the other cases that all now ran fine with the bond-length dependent rattles, 7 of the 14 give all distortions at same energy as unperturbed. For the other 6 however, they actually reveal an energy-lowering distortion which was previously missed due to the high-energy stuck-rattle results. E.g. for SrGa2B2O7, +2 vacancy in three inequivalent sites:
Comparing the 7.5% and 10% rattles, we find better performance for the 10% rattle:
- The
Va_O1_2
1.3 eV energy lowering distortion above for SrGa2B2O7 was only found with 10% and not 7.5% rattle. - For
Va_O1_2
in Li5BiO5, we find a slightly lower structure with the 10% rattle that isn't found with 7.5% rattle (though in this case the difference is only 25 meV so not too significant):
-
The neutral and +2 charge state of this vacancy also found energy-lowering distortions (and ran fine) with the default 0.25 โซ
stdev
, and when imported and tested for the +1 charge state both of those structures give a lower energy structure at ฮE = -0.7 eV (which corresponds to the slightly higher low-energy datapoints in that plot above โ but not the actual groundstate): -
I also accidentally reran this +1 vacancy for SrGa2B2O7, and found that the 7.5% rattle gave the groundstate for 3 datapoints, and the original 0.25 โซ (equivalent to 19% rattle) gave it for 4 datapoints:
So overall these observations do agree with our current understanding that, in general but not always, larger rattles are slightly more likely to find the groundstate. I think from these observations a 10% bond length rattle stdev
would be good to use. It matches well with the rattle stdev
s we previously used for CdTe and Sb2Se3, and here is shown to avoid the high energy 'stuck rattle' occurrence in >90% of the cases where it happened for the oxides, while giving good performance in finding groundstates (finding several which were missed in the first place because of this issue). If you agree I'll add this to develop
, and update our tips in the docs about this!
from shakenbreak.
So from these results and the issue you mentioned with GaAs with a 9.8% rattle, it means 10% isn't perfect in all cases, but seems to be better performance-wise and more generally-applicable than just a flat value of 0.25 โซ
from shakenbreak.
Nice results! Very cool that the 10% bond length rattle stdev
avoids getting stuck and finds lower energy structures previously missed with the 0.25 A stdev
!
I think everything sounds good!
Something else that pop to mind while reading your comment: do you think it could be worthy to test using different rattle seeds
for different distortion factors (e.g. bond distortion of -50% and seed of 42, bond distortion of -30% and seed of 20 etc, so each distortion has a slight different rattle)? Might help the cases where a particular rattle gets stuck in a local minimum? Of course, with the 10% bond length rattle stdev
this is now very uncommon, so might not be worthy?
from shakenbreak.
I think that's a great idea! And easy to implement.
I think it would be best to have a consistent, reproducible logic with how the seed values are chosen, so that the same e.g. snb-generate
command will give the same output structures unless the user specifically changes a parameter, to ensure easy reproducibility of generated structures and results. So maybe setting seed equal to the rounded integer value of the distortion factor *100 would make sense then?
E.g. seed = 40 for -60%, seed = 160 for +60% etc
from shakenbreak.
Yeah was thinking about the backwards consistency too... For using the same seed, I guess just having seed as a kwarg (the way it currently is I think) works for this? So specifying seed with apply_distortions() or in a config file for snb-generate will mean that same seed is used for each? So could use this with the tests (but ofc adding a test to check the expected default behaviour), and note in the changelog (and keeping in mind if anyone says they want to retroactively generate previous structures) that people can set seed to 42 to get the previous default behaviour?
The rattling procedure has already been updated quite a bit at several points in the last year (using MC rattle, setting d_min, using a bond-length dependent d_min etc), so already our rattling isn't fully backwards consistent (but in a good way, cause we know the updated methods perform better)
from shakenbreak.
Yeah you're right!
from shakenbreak.
Ok cool! Will implement asap! ๐
from shakenbreak.
Related Issues (19)
- example_notebook_bash_script_typos HOT 1
- CLI Functionality
- Structure I/O Compatibility (CP2K & Quantum Espresso) HOT 2
- Package Development HOT 1
- Package Name HOT 3
- Potential Feature: Minimum Interatomic Distance in Generated Structures HOT 5
- Potential Feature: Distance-dependent Atom Rattling HOT 9
- Folder Structure HOT 5
- Energies & Forces vs Ionic Step in `SnB`
- `snb-regenerate` dict error HOT 2
- Importing library error HOT 7
- Question about Structure Generation HOT 3
- Missing "Defects_dict" when importing Json from doped HOT 2
- HPS rejects tasks given by snb-run HOT 12
- New `doped` version is needed HOT 7
- `snb-run -h` in fresh conda install gives ImportError HOT 2
- Feature request: lift the lower-bound version pin on spglib HOT 1
- Incompatibility with newly release pymatgen==5.31.2024 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shakenbreak.