Dear Alex and OVITO users,

After a cascade in SiC, I am trying to determine the number of SIAs of type Si (type 1) and those of type C (type 2).

To do so, I started from an ovitos script that was working fine for the Fe case and slightly modified it, changing the selection expression.

To select interstitials of type Si (1) this is what I did:

# import the cascade file

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)

node.compute()

# Selection of interstitials of type Si (occupancy >=2, particle type = 1)

select_SIA_mod = SelectExpressionModifier(expression = 'Occupancy == 2 && Particle Type == 1')

node.modifiers.append(select_SIA_mod)

node.compute()

All this works but does not return the expected result. The total number of SIAs is 112. I checked it with the OVITO GUI. The number of SIAs of type Si is equal to 51. However, the script returns 112, that is, the total number of SIAs. It seems the condition 'Particle Type == 1' is not taken into account. But likely, I did something wrong.

Could you please give me a hand?

Many thanks in advance and best regards,

Christophe