Dear OVITO users,

Hi,

I used the below code to obtain the Bond angle distribution:

.

.

.

for particle_index in range(data.number_of_particles):

local_bonds = bond_vectors[np.fromiter(bonds_enum.bonds_of_particle(particle_index), np.intp)]

angle_matrix = np.squeeze(np.inner(local_bonds[np.newaxis,:,:], local_bonds[:,np.newaxis,:]), axis=(0,3))

angle_cosines = angle_matrix[np.triu_indices(len(angle_matrix), k=1)]

angle_cosine_histogram += np.histogram(angle_cosines, bins=bin_count, range=(-1.0,1.0))[0]

.

.

.

Since it is based on the cosine of theta, I then used Matlab to draw the diagram based on the Theta. I also attached the image of it. Now, I'm looking to find a way to colorcode atoms corresponding the third peak, i.e. around 130 degree. I wonder if you could please help me out with it.

Thanks in advance,

Ali