#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutData {
pub header: Option<DmdwOutHeader>,
pub mass_enhancement_header: bool,
pub sections: Vec<DmdwOutSection>,
}
impl DmdwOutData {
#[must_use]
pub fn section_count(&self) -> usize {
self.sections.len()
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutHeader {
pub lanczos_recursion_order: usize,
pub temperature: DmdwOutTemperature,
pub dynamical_matrix_file: String,
}
#[derive(Debug, Clone, PartialEq)]
pub enum DmdwOutTemperature {
Single(f64),
ListedBelow,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutSection {
pub subject: DmdwOutSubject,
pub pdos_poles: Vec<DmdwOutPole>,
pub einstein: Option<DmdwOutEinstein>,
pub moments: Vec<DmdwOutMoment>,
pub reduced_mass_amu: Option<f64>,
pub path_length_angstrom: Option<f64>,
pub sigma2_1e_minus_3_angstrom2: Option<f64>,
pub sigma2_by_temperature: Vec<DmdwOutTemperatureValue>,
pub vibrational_free_energy_ev: Option<f64>,
pub vibrational_free_energy_by_temperature: Vec<DmdwOutTemperatureValue>,
pub u2_1e_minus_3_angstrom2: Option<f64>,
pub u2_by_temperature: Vec<DmdwOutTemperatureValue>,
pub projected_dos_component_computed: bool,
}
impl DmdwOutSection {
#[must_use]
pub fn new(subject: DmdwOutSubject) -> Self {
Self {
subject,
pdos_poles: Vec::new(),
einstein: None,
moments: Vec::new(),
reduced_mass_amu: None,
path_length_angstrom: None,
sigma2_1e_minus_3_angstrom2: None,
sigma2_by_temperature: Vec::new(),
vibrational_free_energy_ev: None,
vibrational_free_energy_by_temperature: Vec::new(),
u2_1e_minus_3_angstrom2: None,
u2_by_temperature: Vec::new(),
projected_dos_component_computed: false,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum DmdwOutSubject {
PathIndices(Vec<usize>),
AtomIndex {
indices: Vec<usize>,
direction: Option<String>,
},
TotalPdos,
TotalVfe,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutPole {
pub frequency_thz: f64,
pub weight: f64,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutEinstein {
pub frequency_thz: f64,
pub temperature_kelvin: f64,
pub effective_force_constant_n_per_m: f64,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutMoment {
pub order: i32,
pub moment_thz_power_n: f64,
pub frequency_thz: Option<f64>,
pub temperature_kelvin: Option<f64>,
pub effective_force_constant_n_per_m: Option<f64>,
}
#[derive(Debug, Clone, PartialEq)]
pub struct DmdwOutTemperatureValue {
pub temperature_kelvin: f64,
pub value: f64,
}