Forum Navigation
You need to log in to create posts and topics.

How to change the color of the selected atom while changing the total number of atoms

Excuse me, I have a problem and I need help. When I execute a xyz type file, the total number of atoms is changed, I want to change and fix the color of selected atom throughout all the process, as the picture shows. I tried to use the function of 'Manual selection' , it told me 'Stored selection state became invalid, because the number of input elements has changed'. Ask for help, thanks!

Uploaded files:
  • QQ截图20191022094043.jpg
  • QQ截图20191022094057.jpg

As the number of atoms increases, the selected atom changes back to its original color.

Hello HaoYuan,

I assume this is happening because you have no particle identifiers present in your input data. In that case the manual selection will use the particle indices instead and when the number of particle changes between frames it is not guaranteed that the same particles retain the same index (for your xyz-files).

In order to fix this you should add an extra column with the particle property "Particle Identifier" to the xyz-files. Note that OVITO can help you with that: Add a Compute property modifier to your pipeline, and edit the output property and expression fields as shown in the screenshot below.

After you have created the particle identifiers you can create the manual selection which will now remain active when jumping to a different frame.
Let me know if that works for you.



Uploaded files:
  • compute_property.png

Thank you for your prompt reply and help. I have got it. I have tried it, it is ok!

Thanks again!

New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.