-
Notifications
You must be signed in to change notification settings - Fork 15
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
Sublattice rework #179
Sublattice rework #179
Conversation
…llow variable encoding; changed other modules accordingly; updated tests but not run yet.
…ance in test_tools/test_energies_above_hull to avoid occasional numerical fails.
…ublattice-rework � Conflicts: � smol/moca/ensemble/semigrand.py � smol/moca/processor/base.py � smol/moca/sampler/bias.py � smol/moca/sampler/container.py � smol/moca/sampler/mcusher.py � smol/moca/sublattice.py � tests/test_moca/test_bias.py � tests/test_moca/test_ensemble.py � tests/test_moca/test_mcushers.py � tests/test_moca/test_processor.py � tests/test_moca/test_sublattice.py � tests/utils.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank a lot @qchempku2017 ! This is very nice.
I just added a comment on input to split sublattices. Can you look that over and make final changes and then I'll merge?
…equested in PR#179 comment. Updated docs and tests accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @qchempku2017 this is some very useful functionality!
Summary
Removed InactiveSublattice class and its supports; replace it with attribute Sublattice.is_active.
Sub-lattice encoding will no longer be range(len(sublattice.species)), and it will be saved when serialized. This is to support the next sub-lattice splitting feature. The SemiGrandEnsemble and the FugacityBias classes are changed accordingly to read sublattice.encoding when building their tables, and SampleContainer.get_sublattice_composition is changed as well. In theory this new feature will allow us to assign arbitrary encoding to a sub-lattice, but you are not recommended to do that. Better always generate your sub-lattices from: 1, default initialization provided by Processors; 2, split a default sublattice as generated in method 1.
Added support to Sublattice splitting operation in both Sublattice class and Ensemble class, which will allow more delicate MC simulation such as topotactic de-lithiation, where the anions, the TMs, and Li/Vacs should be considered as different non-crossing sub-lattices.
Additional dependencies introduced (if any)
N/A
TODO (if any)
Checklist
Run pycodestyle and flake8
on your local machine.
Run pydocstyle on your code.