Hi all,

When I’m using ICET to train cluster expansion and predict energies, it always ends up with this error:

**Occupations of structure not compatible with the sublattice. Site 1 with occupation Ti not allowed on sublattice (‘N’, ‘X’)**

I have already mapped the relaxed structures to ideal structures, But I do get a lot of warning on that because the relaxed structures differ too much from the ideal structures. But that’s just how it is.

The structure I’m trying to add to structurecontainer are the ideal structures that are mapped from the relaxed structures. And this is where the errors come up.

Can anyone share some tips on how to fix this?

Here attached my script:

If you have setup the ClusterSpace and training structures correctly, then it sounds like atoms in a sublattice relaxes onto the atomic sites of a different sublattice.

This makes it difficult to construct a cluster-expansion since the relaxed energy may correspond to a completely different structure then the ideal structure given to the cluster-expansion.

In general it can be a good idea to monitor atomic displacements from the DFT relaxation and e.g. throw away any structure where atoms moved more than 1.0Å or moved more than half nearest neighbor distance etc.

If you’re lucky this only happens for a small percentage of your training structures, and you can simple remove them for the training data.

If you still want to try to construct a cluster-expansion with these structures without getting these errors, then you can use the relaxed DFT energies with the original ideal structures (that you used as input to DFT).

Hi,

Thank you so much for your reply.

I have another question, is the *Ground state finder* and *Convex hull construction function* still unavailable to ternary compounds? Is there any possibility to use these functions to ternary compounds, like TiVN [[‘Ti’, ‘V’], [‘N’, ‘X’]] ?

If so, how can I confirm the concentration in convex hull since there will be two concentrations in each sublattice. Or should I plot a 3 dimensional figure on this?

Thank you so much. Looking forward to your reply.

Yes I believe the ground-state-finder only works for binaries. Simulated annealing in NVT for somewhat small supercells is a reasonable alternative to extract the ground-states at different concentrations.

From reading the documentation of the convex-hull class it sounds like it can handle systems beyond binaries.

If so, how can I confirm the concentration in convex hull since there will be two concentrations in each sublattice. Or should I plot a 3 dimensional figure on this?

I dont think I understand your question fully, but you can always start with trying to setup a ConvexHull object and see if you run into any trouble.

In the [[‘Ti’, ‘V’], [‘N’, ‘X’]] system there should be two relevant concentrations (one for each sublattice), so you could e.g. make a scatter plot of your energies in this 2D space.

Hi,

Thank you so much for your reply.

Yes, In the [[‘Ti’, ‘V’], [‘N’, ‘X’]] system there should be two relevant concentrations (one for each sublattice). However, together with the energies, there will be 3 variables. How can I plot with 3 variables in a 2D space? I don’t really understand this point. Would you please explain it in a further step?

Thank you so much!

If you want to visualize the lowest energy in this 2D space, couldn’t you scatter plot it?

For example

```
import numpy as np
import matplotlib.pyplot as plt
N = 100
c1, c2 = np.random.uniform(0, 1, (2, N))
energies = np.random.random((N, ))
plt.figure()
plt.scatter(c1, c2, c=energies, s=90)
plt.colorbar(label='energy')
plt.show()
```

I get your point now! I forgot I could show the third variable as a colorbar, I was thinking about axis all the time. Thank you so much for the heads-up!