Struct wafer::config::Config [−][src]
pub struct Config { pub project_name: String, pub grid: Grid, pub tolerance: R64, pub central_difference: CentralDifference, pub max_steps: Option<u64>, pub wavenum: u8, pub wavemax: u8, pub output: Output, pub potential: PotentialType, pub mass: R64, pub init_condition: InitialCondition, pub sig: f64, init_symmetry: SymmetryConstraint, pub script_location: Option<String>, }
The main struct which all input data from wafer.cfg
is pushed into.
Fields
project_name: String
A name for the current project for easy identification of output files.
grid: Grid
Information about the required grid to calculate on.
tolerance: R64
A convergence value, how accurate the total energy needs to be.
central_difference: CentralDifference
Precision of the central difference formalism. The higher the value here the lower the resultant error will be, provided the step size has been optimally chosen.
max_steps: Option<u64>
Optional: The maximum amount of steps the solver should attempt before giving up.
wavenum: u8
A starting number pertaining to an excited state energy level. To start
at the ground state, this number should be 0. If it is higher, the solver
expects converged states in the input
directory before calculating anything.
wavemax: u8
The maximum number of excited states to calculate. For example, if this value is 2, the solver will calculate the ground state (E_0), first excited (E_1) and second excited (E_2) states.
output: Output
Information about the requested output data.
potential: PotentialType
The type of potential required for the simulation. This can be from the internal list, directly from a pre-calculated file or from a python script.
mass: R64
Atomic mass if required by the selected potential.
init_condition: InitialCondition
A first guess at the wavefunction. Can range from Gaussian noise to a low resolution, pre-calculated solution which will be scaled up to enable a faster convergence at high resolution.
sig: f64
Standard deviation. This sets sigma for the Gaussian initial condition if used and is also required for the Cornell potential types.
init_symmetry: SymmetryConstraint
Symmetry conditions forced upon the wavefuntion.
script_location: Option<String>
Location of the script if using one. This is not required in the input configuration and will be set as a default value or derived from command line arguments.
Methods
impl Config
[src]
impl Config
pub fn load(file: &str, script: &str) -> Result<Config, Error>
[src]
pub fn load(file: &str, script: &str) -> Result<Config, Error>
Reads and parses data from the wafer.yaml
file and command line arguments.
fn parse(&self) -> Result<(), Error>
[src]
fn parse(&self) -> Result<(), Error>
Additional checks to the configuration file that cannot be done implicitly by the type checker.
pub fn print(&self, w: usize)
[src]
pub fn print(&self, w: usize)
Pretty prints the Config contents to stdout.
Arguments
w
- width of display. This is limited from 70 to 100 characters before being accessed here, but no such restriction is required inside this function.