Author Topic: To select specific types of point defects  (Read 1131 times)


  • Newbie
  • *
  • Posts: 11
To select specific types of point defects
« 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'))
« Last Edit: March 07, 2017, 10:01:29 PM by Alexander Stukowski »

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: To select specific types of point defects
« Reply #1 on: March 07, 2017, 10:05:54 PM »

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.