Hi, I have two regions in the slab. How I can apply different colors for the atoms (spheres) in each region?
Can the particles in those regions be distinguished according to some property values, e.g., their particle types?
Then one of OVITO’s selection modifiers, e.g., Expression Selection or Select Type in conjunction with an Assign color modifier will do the job.
Alternatively, the Render LAMMPS regions modifier in OVITO Pro can interpret LAMMPS region commands and allows you to easily select the particles contained therein.
[quote=“kalcher, post:2, topic:50630”]
Can the particles in those regions be distinguished according to some >property values, e.g., their particle types?
Yes, the computation box is divided on two equal regions along Z-direction:
region box block 0 10 0 10 -25 25 : Defines a region called box as a block with dimensions relative to the lattice of 10x10x50. The x and y dimensions range 0 to 10alat and the z dimension ranges -25alat to 25*alat.
create_box 1 box : Defines the system cell box to be the region called box.
create_atoms 1 box : Fills the system box with atoms according to the defined lattice with atom type 1.
region top block INF INF INF INF 0 INF : Defines a region top as the space with z > 0.
region bot block INF INF INF INF INF 0 : Defines a region bot as the space with z < 0.
group top region top : Defines the group top to consist of all atoms in the region top.
group bot region bot : Defines the group bot to consist of all atoms in the region bot.
I need to have different colors for region top and region bot. Thank you
This is how you would assign two different particle types to the atoms belonging to each group:
set group top type 1 set group bot type 2
They will automatically have different colors in OVITO.
If you don’t want to re-run your simulation, then all of the post-processing workflows described above will work.
If you have imported a trajectory you may want to use a Freeze Property modifier to freeze the particle colors at animation frame 0. All details can be found in the linked manual article.
Thank you very much. It works!!!