pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

[Critical] Ensure atom order in Sphinx #1372

Closed samwaseda closed 5 months ago

samwaseda commented 5 months ago

In DFT, we group atoms according to chemical species in the input files. For example if the structure has 2 Ni atoms and 2 Fe atoms in pyiron in the order of Ni, Fe, Ni, Fe, we sort the atoms by the alphabetical order of the chemical symbols, meaning in this example the order should be 2, 0, 3, 1 (first Fe, and then Ni). I realized that by simply applying np.argsort, the order within the same chemical symbol is not uniquely defined, meaning in the example here, we might end up with 3, 1, 2, 0 or any other permutation. This fix forces the ordering within the same chemical symbol by applying a small ramp on the enumeration.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 8571836857

Details


Totals Coverage Status
Change from base Build 8526054908: 0.001%
Covered Lines: 14243
Relevant Lines: 15283

💛 - Coveralls