mscore/chemistry/
constants.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Purpose: To store constants that are used in the program
pub const MASS_PROTON: f64 = 1.007276466621; // Unified atomic mass unit
pub const MASS_NEUTRON: f64 = 1.00866491595; // Unified atomic mass unit
pub const MASS_ELECTRON: f64 = 0.00054857990946; // Unified atomic mass unit
pub const MASS_WATER: f64 = 18.0105646863; // Unified atomic mass unit
pub const MASS_CO: f64 = 27.994915; // Mass of CO (carbon monoxide)
pub const MASS_NH3: f64 = 17.026549; // Mass of NH3 (ammonia)

// IUPAC Standards
pub const STANDARD_TEMPERATURE: f64 = 273.15; // Kelvin
pub const STANDARD_PRESSURE: f64 = 1e5; // Pascal
pub const ELEMENTARY_CHARGE: f64 = 1.602176634e-19; // Coulombs
pub const K_BOLTZMANN: f64 = 1.380649e-23; // J/K
pub const AVOGADRO: f64 = 6.02214076e23; // mol^-1