castep_param_io/param/electronic/nelectrons/
mod.rs

1
2use castep_param_derive::KeywordDisplay;
3use serde::{Deserialize, Serialize};
4
5
6pub use ndown::NDown;
7pub use nup::NUp;
8
9#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, PartialOrd, KeywordDisplay)]
10#[keyword_display(from=f64, value=f64, field="NELECTRONS")]
11pub struct NElectrons(f64);
12
13mod nup {
14    
15
16    use castep_param_derive::KeywordDisplay;
17    use serde::{Deserialize, Serialize};
18
19    
20
21    #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, PartialOrd, KeywordDisplay)]
22    #[keyword_display(field="NUP", from=f64, value=f64)]
23    pub struct NUp(f64);
24}
25
26mod ndown {
27    
28
29    use castep_param_derive::KeywordDisplay;
30    use serde::{Deserialize, Serialize};
31
32    
33
34    #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, PartialOrd, KeywordDisplay)]
35    #[keyword_display(field="NDOWN", from=f64, value=f64)]
36    pub struct NDown(f64);
37}