Dear all,
I noticed that the default particle color and radius are stored in HKEY_CURRENT_USER\Software\Ovito\Ovito
as binary data. How can I extract the RGB color and radius information using Python?
Thank you!
Dear all,
I noticed that the default particle color and radius are stored in HKEY_CURRENT_USER\Software\Ovito\Ovito
as binary data. How can I extract the RGB color and radius information using Python?
Thank you!
OVITO stores the color information as a QColor
value using a QSettings
object from the Qt framework. You can find that in the C++ source code.
If you really need to access these settings from a Python script (but why?), then you could import the PySide6
module and construct a QSettings
object in the same way the C++ code does it.
Thank you for your reply.
I am having some difficulty understanding the C++ code you mentioned. My goal is to write a script in Jupyter to visualize atomic structures, and I would like to use OVITO’s default atom colors and radii, as I find them aesthetically pleasing. Therefore, I would like to use Python to retrieve this information, aiming for a structure like color_dict = {'Cu': [200, 125, 125]}
and size_dict = {'Cu': 1.2}
. I would greatly appreciate more detailed guidance if possible.
BTW, I know OVITO has jupyter visualization feature, I just want to practice the code .
So you are looking for the table of chemical elements, which defines the standard colors and radii of different atom types? That table is found here:
That is what I need! Thank you so much.