Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
ElementColors.hpp File Reference

CPK color palette and visualization radii for atomic 3D rendering. More...

#include "physics/PhysicalData.hpp"
#include <array>
#include <cstddef>
#include <cstdint>
#include <string_view>
Include dependency graph for ElementColors.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  correlation::render3d::RgbaColor
 8-bit RGBA color representation for vertex colors and framebuffers. More...
struct  correlation::render3d::detail::SymbolZMapping
 Mapping between chemical symbol and atomic number (Z). More...

Namespaces

namespace  correlation
namespace  correlation::render3d
namespace  correlation::render3d::detail

Functions

constexpr int correlation::render3d::getAtomicNumber (std::string_view symbol) noexcept
 Retrieves the atomic number (Z) for a chemical symbol.
constexpr RgbaColor correlation::render3d::getElementColor (int atomic_number) noexcept
 Retrieves standard CPK color for a given atomic number in O(1) time.
constexpr RgbaColor correlation::render3d::getElementColor (std::string_view symbol) noexcept
 Retrieves standard CPK color for a chemical symbol, or a categorical color for numeric LAMMPS atom types ("1", "2", ...).
float correlation::render3d::getElementDisplayRadius (std::string_view symbol, float scale=0.4F)
 Retrieves visualization sphere radius scaled from covalent radius.

Variables

constexpr std::array< RgbaColor, 119 > correlation::render3d::ELEMENT_COLORS
 Full 118-element CPK lookup table based on official ASE/Jmol standards.
constexpr std::array< SymbolZMapping, 118 > correlation::render3d::detail::SYMBOL_Z_TABLE
 Full chemical symbol to atomic number mapping for all 118 elements.
constexpr std::array< RgbaColor, 10 > correlation::render3d::detail::NUMERIC_TYPE_COLORS
 High-contrast categorical palette for numeric LAMMPS atom types ("1", "2", "3", ...).

Detailed Description

CPK color palette and visualization radii for atomic 3D rendering.

License
SPDX-License-Identifier: AGPL-3.0-only