rizer.io.minplascalc.generate_minplascalc_data#
Generate JSON files for monatomic, diatomic and polyatomic species.
These JSON files serve as input for the minplascalc library. The JSON files are located in the ./data/minplascalc/species folder.
Input data to generate the JSON files are loaded from the ./data/minplascalc/species_data.yaml file.
For monatomic species, the script automatically retrieves from the NIST Atomic Spectra Database the energy levels and spectral lines of the species, and calculates the molar mass of the species from the atomic mass of the species. For diatomic and polyatomic species, the script reads the data from the ./data/minplascalc/species_data.yaml file, where data from the NIST Chemistry WebBook and the CCCBDB database are stored.
Attributes#
Functions#
|
Compute the number of effective electrons for a neutral species. |
|
Load species input data from |
Create a JSON file for a monatomic species, that can be used as input for the minplascalc library. |
|
|
Build a |
|
Build a |
|
Write a species object to |
Module Contents#
- rizer.io.minplascalc.generate_minplascalc_data.POLARISABILITY_AU_TO_M3 = 1.481847113e-31#
- rizer.io.minplascalc.generate_minplascalc_data.compute_effective_electrons(n_int: int, n_ext: int) float#
Compute the number of effective electrons for a neutral species.
The number of effective electrons is calculated using the formula from [Cambi1991], which takes into account the number of inner and outer electrons of the species.
E.g. for oxygen atom, electronic configuration is 1s2 2s2 2p4:
The 1s electrons in oxygen do not participate in bonding (i.e., chemistry) and are called core electrons (inner electrons).
The valence electrons (i.e., the 2s2 2p4 part) are valence electrons (outer electrons), which do participate in the making and breaking of bonds.
- rizer.io.minplascalc.generate_minplascalc_data.load_species_data() dict[str, Any]#
Load species input data from
species_data.yaml.
- rizer.io.minplascalc.generate_minplascalc_data.generate_monoatomic_species(species: str, ionisation_energy: float, spin_multiplicity: int, polarisability: float, n_eff: int | float | None = None, electron_cross_section_m2: int | float | tuple[int | float, Ellipsis] | None = None) minplascalc.species.Monatomic#
Create a JSON file for a monatomic species, that can be used as input for the minplascalc library.
- Parameters:
species (
str) – Name of the species, as a string. For example, C for carbon, C+ for carbon ionized onceionisation_energy (
float) – The ionisation energy of the species, in Joules. For example, for C, 11.2602880 * u.eV_to_J.spin_multiplicity (
int) – The spin multiplicity of the species.polarisability (
float) – The polarisability of the species.n_eff (
intorfloatorNone, optional) – The number of effective electrons of the species, for neutral species.electron_cross_section_m2 (
tupleoffloat, orNone, optional) – The electron cross section of the species, for neutral species, as a tuple of four values.
- Returns:
The monatomic species object created from the input data, and the data retrieved from the NIST Atomic Spectra Database.
- Return type:
- Raises:
ValueError – If the species is negatively charged (i.e., contains a “-” character).
ValueError – If the atomic symbol of the species is not found in the list of atomic symbols.
- rizer.io.minplascalc.generate_minplascalc_data.build_diatomic(record: dict[str, Any], data: dict[str, Any] | None = None) minplascalc.species.Diatomic#
Build a
mpc.species.Diatomicfrom a YAML record.
- rizer.io.minplascalc.generate_minplascalc_data.build_polyatomic(record: dict[str, Any], data: dict[str, Any] | None = None) minplascalc.species.Polyatomic#
Build a
mpc.species.Polyatomicfrom a YAML record.
- rizer.io.minplascalc.generate_minplascalc_data.save_species(species: minplascalc.species.Monatomic | minplascalc.species.Diatomic | minplascalc.species.Polyatomic) pathlib.Path#
Write a species object to
data/minplascalc/species/<name>.json.