castep_param_io/param/electronic/charge.rs
1
2use castep_param_derive::KeywordDisplay;
3use serde::{Deserialize, Serialize};
4
5
6/// Description
7/// This keyword specifies the total charge of the system. It can be used instead of `NELECTRONS`.
8/// It is not possible to specify the `NELECTRONS`, `NUP`, or `NDOWN` keywords when the `CHARGE` keyword is specified.
9/// Default
10/// 0
11/// Example
12/// CHARGE : 3
13#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, PartialOrd, KeywordDisplay)]
14#[keyword_display(field="CHARGE", from=f64, value=f64)]
15pub struct Charge(f64);