Loading...
Searching...
No Matches
q3::PeriodicTable Class Reference

#include <periodic_table.hpp>

Static Public Member Functions

static int atomic_number_by_element_symbol (const std::string &symbol)
 
static const std::string & element_symbol_by_atomic_number (int atomic_number)
 

Detailed Description

Provides element symbol to atomic number (Z) mapping.

Definition at line 19 of file periodic_table.hpp.

Member Function Documentation

◆ atomic_number_by_element_symbol()

static int q3::PeriodicTable::atomic_number_by_element_symbol ( const std::string &  symbol)
inlinestatic

Return the atomic number for a given element symbol. Strips trailing digits (e.g. "Si1" → "Si"). Returns 0 if the element is not found.

Definition at line 26 of file periodic_table.hpp.

Referenced by q3::VolumetricField::atomic_number(), q3::Crystal::atomic_number(), and q3::element_and_label_of_species().

◆ element_symbol_by_atomic_number()

static const std::string & q3::PeriodicTable::element_symbol_by_atomic_number ( int  atomic_number)
inlinestatic

Return the element symbol for a given atomic number, or an empty string when there is no such element.

The inverse of the lookup above, which a file format that identifies its atoms by Z rather than by symbol needs on the way back in — a cube file does (see io/volumetric/cube_reader.hpp).

Definition at line 49 of file periodic_table.hpp.


The documentation for this class was generated from the following file: