castep_param_io/param/electronic/bands_option/extra_bands.rs
1use castep_param_derive::KeywordDisplay;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, KeywordDisplay)]
5/// This keyword controls the percentage of extra bands in addition to the number
6/// of occupied bands. These extra bands are necessary for metals or finite
7/// temperature insulators.
8/// # Note
9/// It is not possible to have both the NBANDS keyword and either the NEXTRA_BANDS
10/// or PERC_EXTRA_BANDS keywords present in the same input file.
11#[keyword_display(specified_fields = true)]
12pub enum ExtraBands {
13 #[keyword_display(field = "NEXTRA_BANDS")]
14 NextraBands(u32),
15 #[keyword_display(field = "PERC_EXTRA_BANDS")]
16 PercExtraBands(f64),
17}