How to specify sites with "enumerate_strucutures"

Hi, I’m annoying with “icet.tools.enumerate_structures”

How can I specify separate crystal sites?

I’d like to make cluster with three atomic sites like ABOx.
In the official examples, GaAs clusters are produced with two distinct sites, but I failed to make clusters from primitive structure which is made by ase.spacegroup.crystal which has 3 sites.

I did some testings with “icet.tools.enumerate_structures”.
When I set up the chemical_symbols like this ,the below error occurs.
chemical_symbols=[[‘A’],[‘B’, ‘C’],[‘O’]]
Exception: chemical_symbols needs to be a list of strings or a list of list of strings.

When I set up the chemical_symbols like this, the kernel can run but there is no meaning.
chemical_symbols=[[‘A’, ‘B’, ‘O’]]

I’m a beginner on ase and icet.

Thank you.

I dont understand what problem/error you are running into.
Can you post a script/snippet including any other files that fully reproduces your error?

Thank you for your reply.
Sorry, I wasn’t able to explain my problem fully.

I think “crystal” is same as ''bulk(tutorial)", however “crystal” doesn’t work.The below error happens.
“Exception: chemical_symbols needs to be a list of strings or a list of list of strings.”
I want to know my code is wrong or icet doesn’t have a function to generate clusters from “crystal”.

from ase.spacegroup import crystal
#crystal(I tried)
a = 5.65  
prim = crystal(['Ga', 'As'], basis=[(0,0,0), (0.25,0.25,0.25)], spacegroup=216, cellpar=[a, a, a, 90, 90, 90])

for structure in enumerate_structures(structure=prim,
                                      sizes=range(1, 9),
                                      chemical_symbols=[['Ga', 'Al'], ['As']]):
    pass # Do something with the structure
#bulk(tutorial)
prim = bulk('GaAs', crystalstructure='zincblende', a=5.65)
for structure in enumerate_structures(structure=prim,
                                      sizes=range(1, 9),
                                      chemical_symbols=[['Ga', 'Al'], ['As']]):
    pass # Do something with the structure

The chemical symbols list needs to be as long as the primitive structure. When you use crystal you create a cubic 8-atom cell. Also you need to check the ordering of atoms (sites) in the primitive structure so that it matches with your chemical-symbols. E.g. for you crystal snippet I think you would need [['Ga', 'Al'], ['Ga', 'Al'], ['Ga', 'Al'], ['Ga', 'Al'], ['As'], ['As'], ['As'], ['As']] .

Note that typically when doing enumeration you want to use the smallest possible primitive, but of course it depends on what you actually want to do with the enumerated structures.

Hi

I’m grateful for your advice.
I had missed that perspective. I was able to solve my issue.

Thank you.