Dear Alex and OVITO users,

I am trying to determine defects (including antisites) in a binary system such as SiC.

Using the SelectExpressionModifier, it works well.

For instance, to determine the number of Si vacancies (type=1) I proceed as follows:

node = import_file(file_coord_final)

# Construct the modifier for Wigner Seitz analysis of SIA and V

ws_mod = WignerSeitzAnalysisModifier(eliminate_cell_deformation = True)

# Load the reference crystal

ws_mod.reference.load(file_coord_init)

# Add the modifier to the modification pipeline

node.modifiers.append(ws_mod)

# Select vacancies of type Si (type=1)

select_vacancies_mod = SelectExpressionModifier(expression = 'Occupancy == 0 && ParticleType == 1')

node.modifiers.append(select_vacancies_mod)

node.compute()

This works fine and for a given cascade I obtain 31 Si vacancies.

Now, I wish to determine antisites, i.e., Si atoms that are in C vacancies and vice-versa. To do so, I took the example given in OVITO website on a binary system (

https://ovito.org/manual/python/modules/ovito_modifiers.html#ovito.modifiers.WignerSeitzAnalysisModifier).

Following this example, I simply extended my script to take into account the occupancy number per particle type.

The resulting script is similar to the previous one, except that the WS modifier takes into account the occupancy number per particle type. Also, in the SelectExpressionModifier, one has to take into account that Occupancy has now 2 components. If for instance, I want to select Si vacancies (type 1), I do the following:

...

ws_mod = WignerSeitzAnalysisModifier(per_type_occupancies = True, eliminate_cell_deformation = True)

...

# Select vacancies of type Si (type=1)

select_vacancies_mod = SelectExpressionModifier(expression = 'Occupancy.1 == 0 && ParticleType == 1')

node.modifiers.append(select_vacancies_mod)

node.compute()

This works. However, this time, I get 49 Si vacancies.

Clearly, there is something that I am doing wrong.

I also find a problem with determining the SIA of Si type when I use Occupancy.x. I use the following SelectExpressionModifier to find Si SIAs:

select_SIA_mod = SelectExpressionModifier(expression = 'Occupancy.1 == 2 && ParticleType == 1')

The number of Si SIA I obtain this way is too small and clearly not correct.

Do I use correctly

**Occupancy.1** in the SelectExpressionModifier?

Any help is appreciated.

Many thanks in advance and best regards,

Christophe