Author Topic: removing visual of atoms completely if don't meet certain criteria  (Read 438 times)


  • Newbie
  • *
  • Posts: 5
I have a periodic metal sample that under common neighbor analysis, has a mixture of fcc, hcp, bcc, ico, and others displayed.  I can see this on the surface.  Let's say I want to only visualize where the 'other" atoms are.  I find I reset transparency of non-other atoms to maximum transparency, I still see enough of an outline of the atoms that I really cant see all the way through the sample.  I think I need to actually run the modifier, (cna),  Lets say I have 100,000 atoms, and only 10,000 are 'other'.  I want to load the 10,000 and leave the rest of the periodic box completely empty. I think I need to actually run the CNA modifier, then export a create a file that only has the 'other' atoms listed.  Next, import this file and display it and that this would require a python script.  Am I correct?  What is the easiest way to do this?  I want to do this in a series of runs to create an animation. 

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 577
Re: removing visual of atoms completely if don't meet certain criteria
« Reply #1 on: May 25, 2018, 04:30:23 PM »

Please excuse my late reply.

Filtering of atoms is typically done in OVITO by first selecting the atoms which are not of interest and then delete those atoms, leaving only the atoms of interest. This type of approach is preferred over setting the transparency of atoms to 100%. Note that thanks to OVITO's data pipeline system, the deletion of atoms is never permanent. A copy of the original input atoms is still kept around by the program, giving you the possibility to restore the deleted atoms at any point or dynamically update the set of atoms to be deleted.

So the typical sequence used for your case is:

1. Apply the Common Neighbour Analysis modifier to classify atoms
2. Apply the Select Particle Type modifier to select those type(s) of atoms you want to hide
3. Apply the Delete Selected Particles modifier to remove them

These three actions will be performed dynamically by the program as you stop through the sequence of simulation frames.