GithubHelp home page GithubHelp logo

Comments (11)

ireaml avatar ireaml commented on June 15, 2024 1

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.

kavanase avatar kavanase commented on June 15, 2024 1

Now implemented in commits aeddcb2 to 777ecd2 ๐ŸŽ‰ ๐ŸŽ‰
I think this is a nice enhancement to the code!

from shakenbreak.

ireaml avatar ireaml commented on June 15, 2024

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.

kavanase avatar kavanase commented on June 15, 2024

Ok cool! Will keep you posted!

from shakenbreak.

kavanase avatar kavanase commented on June 15, 2024

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 stdevs 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:
image

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:
image
image
image

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):

image

- For Zr(MoO4) +1 vacancy, the reduced `stdev` ends up finding a significantly lower energy structure (ฮ”E = -0.85 eV). Here the 7.5% rattle actually outperforms the 10% rattle, finding more lower energy structures, though they both only find the actual groundstate for two datapoints:

image

  • 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):

  • image
  • image
  • 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:

image

as well as 4 datapoints for the 10% rattle:

image

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 stdevs 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.

kavanase avatar kavanase commented on June 15, 2024

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.

ireaml avatar ireaml commented on June 15, 2024

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.

kavanase avatar kavanase commented on June 15, 2024

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.

kavanase avatar kavanase commented on June 15, 2024

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.

ireaml avatar ireaml commented on June 15, 2024

Yeah you're right!

from shakenbreak.

kavanase avatar kavanase commented on June 15, 2024

Ok cool! Will implement asap! ๐Ÿ˜ƒ

from shakenbreak.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.