Rdf_names OF OVITO PYTHON CoordinationAnalysisModifier

Hello,

I want to ask a question regarding the CoordinationAnalysisModifier of Ovito Python:

When I imported a lammpsdata file to calculate the partial rdf, I needed to access the partial rdf names to carry out the following operations. Therefore, I use the command
rdf_names = rdf_table.y.component_names
however, the command automatically identified the element of the type (I guess that is because there is a mass section in the lammpsdata file).

What I want is to output the rdf_names of ‘1-4’, ‘2-4’ not ‘Fe-O’, ‘Fe-O’.
So how can I close the automatical identification?

Best regards,
Fan

Hi,

In the desktop application, you could directly edit/delete the Particle Type names under Data SourceParticle Types.

Analogous, you can control the names of the particle types through the Python interface as shown in the code examples of the ParticleType class here: ovito.data — OVITO Python Reference 3.9.2 documentation.

Moreover, you can look up the chemical element name corresponding to a particle type id like this:

data.particles.particle_types.type_by_id(1).name

and inversely:

data.particles.particle_types.type_by_name('Fe').id

Dear kalcher,

Thank you very much for your prompt and detailed reply. I really appreciate it.

Best,
Fan