Dear all,
I have a crystal structure consisting of 4 atom types (Cr, Ni, Fe, and Co). I want use Ovito to delete all the regions where there is a high concentration of Cr (type 1) atoms (Cr-rich regions). Other atom types in the Cr-rich regions should also be deleted. I have tried to use python to accomplish this. However, on running the script, I received an error that ‘ovito.modifiers.ConstructSurfaceModifier’ object has no attribute ‘region_type’. What is the simplest way to accomplish this?
Hi,
Here is a possible workflow for OVITO Basic to find and delete Cr-rich regions:
-
Use the Select Type modifier to select all Cr atoms.
-
For each selected atom, the Compute Property modifier can help you count the number of Cr neighbors within a spherical cutoff. Please also see section Including neighbor particles in the calculation in the linked manual article.
Possible modifier settings to calculate the local atomic concentration of Cr:
Compute only for selected elements
Expression: 1/(NumNeighbors+1)
Neighbor expression: Selection/(NumNeighbors+1)
(adapt the cutoff radius to your needs)
-
The Expression Selection Modifier then lets you select Cr atoms based on the concentration values you calculated in the previous step.
-
Include neighboring atoms in the selection by adding an Expand Selection modifier to the pipeline.
-
Delete the particles from the scene with a Delete Selected modifier.
Thank you very much for your help. However, it appears that all the Cr atoms are selected (even those located outside the Cr-rich regions) irrespective of the cutoff radius I use in the “Compute Property” modifier. Perhaps there is something I am not doing right.
I appreciate your support greatly!
What’s the boolean expression you use in step 3?
I use “Myproperty” which was set in the previous steps (“Compute Property” modifier).
You should change it to Myproperty > X
, where X is your criterion of a high concentration value.
If you only enter “Myproperty” in the text editor, the expression always evaluates to True
for a Cr atom, because the Myproperty
values for Cr atoms range in between 1/(NumNeighbors+1)
to 1
.