OVITO Forum

OVITO => Support Forum => Topic started by: wufc on March 06, 2017, 10:02:26 AM

Title: To select specific types of point defects
Post by: wufc on March 06, 2017, 10:02:26 AM
Dear all,

I wrote a Python script with OVITO to identify vacancy and interstitial clusters during a cascade. Using the WignerSeitzAnalysisModifier, I tried to select those sites with more than one atoms but failed. I wonder if I have mistaken the modifier outputs-Occupancy, which seems to be a ParticleProperty. The code segment reported with an error is attached.
Code: [Select]
    node.modifiers.append(SelectExpressionModifier(expression = 'Occupancy >= 1'))
    node.compute()
Title: Re: To select specific types of point defects
Post by: Alexander Stukowski on March 07, 2017, 10:05:54 PM
Hi,

That code fragment looks good to me (except that you should use ">" instead of ">=" to select sites with more than one atom). Note that referencing the 'Occpancy' particle property in the selection expression only works if there is a WignerSeitzAnalysisModifier preceding the SelectExpressionModifier in the pipeline. I assume you have made sure it's there.

Please post the full error message and perhaps attach the complete Python script if you need further help.