Welcome to pySIPFENN v0.15, which is ***our biggest singular jump since 2020 spanning 196 commits since v0.13.0*** 🎉 It covers improvements in nearly every place of the codebase, including ***new features, better performance and more convenient high-level API***. Two key new features are (1) a ***neat prototype library*** (v0.14) simplifying the handling of atomic structures, and (2) ***random solid solution (RSS) featurizer*** / descriptor calculator (v0.15), which allows you to featurize chemical composition occupying a prototype structure.
Now, you can efficiently utilize pySIPFENN to, ***for instance, featurize high entropy alloys (HEAs) occupying BCC, FCC, C14, and C15 structures.*** Have a look below for details!
Major Changes:
Random Solid Solution Featurization
- KS2022 Random Solution Featurization ([`KS2022_randomSolutions`](pysipfenn/descriptorDefinitions/KS2022_randomSolutions.py)) added by amkrajewski (mostly in https://github.com/PhasesResearchLab/pySIPFENN/pull/10), which **allows users to quickly obtain KS2022 feature vector corresponding to a random solid solution with composition `comp` occupying arbitrary structure `struct` (including library `BCC`, `FCC`, `HCP`) through iterative expansion of ensemble of local chemical environments (LCEs) until all features, i.e., statistics over LCEs, and composition converge onto stable values.**
- This method is philosophically similar to the SQS approach [(10.1103/PhysRevLett.65.353)](https://doi.org/10.1103/PhysRevLett.65.353), which one can generate with [Alloy Theoretic Automated Toolkit](https://www.brown.edu/Departments/Engineering/Labs/avdw/atat/) (ATAT) [(10.1016/j.calphad.2013.06.006)](https://doi.org/10.1016/j.calphad.2013.06.006) or approximate with [sqsgenerator](https://github.com/dgehringer/sqsgenerator); however, here, we are not only encoding the correlations between anonymous species types but also (1) consider differences between them, thus, e.g., solutions of elements with similar electronic configurations will converge faster) and (2) allow arbitrary complexity of the chemical composition under a single methodology.
- It should also be better at capturing randomly occurring uncommon extreme-case events, which may not occur in low-correlation cases.
- We have tuned the default values of the method for complex cases of (a) high entropy alloys (HEAs) with 6+ components and (b) multicomponent steels with several minor alloying elements.
- Added matching tests for all methods of [`KS2022_randomSolutions`](pysipfenn/descriptorDefinitions/KS2022_randomSolutions.py) featurizer. Added documentation for all tests, so that they can serve as runnable examples.
- Added complete API documentation of all methods and all parameters, with both meaning and motivation, for [`KS2022_randomSolutions`](pysipfenn/descriptorDefinitions/KS2022_randomSolutions.py).
- Added top-level [`Calculator.calculate_KS2022_randomSolutions()`](pysipfenn/core/pysipfenn.pyL480) and [`Calculator.runModels_randomSolutions()`](pysipfenn/core/pysipfenn.pyL800) for conveniently calling everything on complex problems, even with mixed-type inputs like:
python
c.calculate_KS2022_randomSolutions(
['FCC', myDistortedBCC, 'BCC', 'HCP'],
['WMo', Composition.from_weight_dict({'Mo': 20, 'W': 70, 'Zr': 10}), 'FeNi', 'CrNi'],
mode='parallel',
max_workers=4)
Prototype Library:
- The new prototype library functionality allows you to store commonly used structures in a consistent fashion and pleasant schema under [`misc/prototypeLibrary.yaml`](pysipfenn/misc/prototypeLibrary.yaml) file in your pySIPFENN installation. It is initialized alongside every `Calculator` instance.
- Parsing custom libraries is very easy and can be done from a file in your directory or from a remote repository like Zenodo! Simply use the [`parsePrototypeLibrary`](pysipfenn/core/pysipfenn.pyL130) to fetch it. Or, to append your library with an external one and persist it your installation, use [`appendPrototypeLibrary`](pysipfenn/core/pysipfenn.pyL180).
yaml
- name: BCC
origin: https://www.oqmd.org/materials/prototype/A2_W
POSCAR: |
W
1.0
-1.58250 1.58250 1.58250
1.58250 -1.58250 1.58250
1.58250 1.58250 -1.58250
W
1
Direct
0.00000 0.00000 0.00000
- Added complete API documentation of all methods and all parameters, with both meaning and motivation, for everything prototypeLibrary-related.
- Added matching tests for all new prototypeLibrary-related methods. Added documentation for all tests, so that they can serve as runnable examples.
General:
- Complete overhaul of the documentation in terms of consistent styling, type-hinting, and extent of the content. Most functions can be well-understood just by looking at information displayed by IDE like PyCharm or VSCode.
- The `Calculator` class now can self-destruct and deallocate by call to its `destroy()` function, allowing users to better manage memory used in calculations on low-power systems.
- Performance improvements in chemical attributes calculation of all `KS2022`-calculating featurizers.
- Performance improvements and minor fixes in `KS2022_dilute` featurizer.
- Performance and feature improvements in the [`modelExporters`](pysipfenn/core/modelExporters.py), including imports optimization so that are now they only run when needed by given exporter class.
- Optimized testing workflows in terms of events triggering them and general performance.
- Improved testing clarity and platform compatibility, by splitting them into individual workflows.
[![Core Linux (Ubuntu)](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_LinuxUbuntu.yaml/badge.svg)](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_LinuxUbuntu.yaml) [![Core Mac M1](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacM1.yaml/badge.svg)](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacM1.yaml) [![Core Mac Intel](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacIntel.yaml/badge.svg)](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_MacIntel.yaml) [![Core Windows](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_Windows.yaml/badge.svg)](https://github.com/PhasesResearchLab/pySIPFENN/actions/workflows/coreTests_Windows.yaml)
- Dependencies were analyzed for compatibility and set in a way to ensure long-term maintainability and near-future compatibility with Python 3.12.
- Added [instructions for contributing to pySIPFENN](https://pysipfenn.readthedocs.io/en/latest/contributing.html), explaining philosophy of the software and several design choices.
Minor Changes:
- Improved printouts from `Calculator` initialization and current state reporting.
- Improved verbosity handling in `Calculator` instances.
- `CITATION.cff` added for clear citation guidance in the future.
- Documentation now includes [miscellaneous notes](https://pysipfenn.readthedocs.io/en/latest/miscellaneousnotes.html) users may find useful.
- `.gitignore` improvements as requested by users.
- Added testing for several smaller functions like `ward2ks2022`, to increase coverage by 1%. Now it is over 95%.
- Code style improvements.
- Commenting improvements scattered throughout the codebase to make modifying our code easier.
- And many more added on the way :)
Notices:
- In the near future (likely next release), pySIPFENN will drop **official support for Python 3.9**, due to (1) noticeably lower performance, (2) deprecation of 3.9 on some platforms (MacOS14), and (3) next release using several pure-Python features added in Python 3.9.
- In the near future (likely next release), pySIPFENN will **add support for Python 3.12** to keep it up-to-date and take advantage of performance boost. Our codebase is ready for the switch. We are waiting for PyTorch support for it in its stable release.
**Full Changelog**: https://github.com/PhasesResearchLab/pySIPFENN/compare/v0.13.1...v0.15.0