icet
raw JSON → 3.2 verified Sat May 09 auth: no python
icet is a Python library for constructing cluster expansions, providing a pythonic approach to modeling alloy thermodynamics and ordering. Current version is 3.2, with a new release roughly every few months. It requires Python >=3.9 and is actively maintained.
pip install icet Common errors
error ImportError: cannot import name 'ClusterExpansion' from 'icet' ↓
cause In icet 3.x, the class was renamed to 'ClusterExpansionSettings'.
fix
Use 'from icet import ClusterExpansionSettings'
error ValueError: Number of clusters does not match number of structures ↓
cause Cluster space and structure list are inconsistent. Check if structures have the same number of atoms and are compatible with the primitive.
fix
Ensure all structures are derived from the same primitive and have consistent atom numbers.
Warnings
breaking In icet 3.x, the 'ClusterExpansion' class is renamed to 'ClusterExpansionSettings'. Old imports will fail. ↓
fix Replace 'from icet import ClusterExpansion' with 'from icet import ClusterExpansionSettings'.
deprecated The 'ClusterSpace' constructor keyword 'cutoffs' is deprecated in favor of 'cutoff' (singular) in icet 3.2. ↓
fix Use 'cutoff' instead of 'cutoffs' when creating ClusterSpace.
gotcha Cluster expansion fitting requires normalized training data. Forgetting to normalize energies per atom can lead to incorrect results. ↓
fix Ensure training energies are divided by the number of atoms in each structure.
Imports
- ClusterExpansionSettings wrong
from icet.core import ClusterExpansionSettingscorrectfrom icet import ClusterExpansionSettings - ClusterSpace wrong
from icet.cluster_space import ClusterSpacecorrectfrom icet import ClusterSpace
Quickstart
from ase.build import bulk
from icet import ClusterExpansionSettings, ClusterSpace
# Create a primitive structure
prim = bulk('Cu', 'fcc', a=3.6)
# Define cluster space with pair interactions up to cutoff 5.0
cs = ClusterSpace(prim, cutoffs=[5.0], chemical_symbols=['Cu', 'Au'])
# Create settings object
settings = ClusterExpansionSettings(cs)
print(settings)