get_mole_frac#
- autoplex.fitting.common.regularization.get_mole_frac(atoms, element_order=None)[source]#
Calculate the mole-fraction of a structure.
- Parameters:
atoms ((Atoms)) – Structure to calculate mole-fraction of
element_order ((list)) – List of atomic numbers in order of choice (e.g. [42, 16] for MoS2)
- Returns:
(x2, x3…) – Reduced mole-fraction of structure - first element n = 1-sum(others)
- Return type:
(array of float)