docs.rs failed to build feff10-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
feff10
Rust wrapper for FEFF10, a real-space multiple-scattering code for ab initio calculations of X-ray absorption spectra (EXAFS, XANES) and related properties.
Quick Start
// One-liner: parse, validate, and run
let result = run?;
for sr in &result.stages
Also accepts raw feff.inp text or a FeffInput object:
// From raw text
let content = read_to_string?;
let result = run_str?;
// From a FeffInput object
let mut inp = from_file?;
inp.s02 = Some;
let result = run_input?;
Validation
// Validate a file without running
validate?;
// Validate a FeffInput object
let inp = from_file?;
inp.validate?;
Checks: absorber potential (ipot=0) exists, atoms reference valid potentials, no duplicate ipot values, atomic numbers in range (1-103), and more.
Parser Behavior
- Uses FEFF-style 4-character keyword tokenization (same matching style as Fortran
itoken). - Accepts
include/loaddirectives infeff.inpfiles (FeffInput::from_file) with nested include support. - Treats full-line comments using FEFF prefixes
;,*,%,#. - Rejects unknown keywords (Fortran-compatible strict behavior).
Programmatic helpers:
let input = from_file?;
let resolved = input.resolve_defaults; // explicit defaults model
let typed = input.typed_cards; // typed per-card view
input.validate_fortran_rules?; // FEFF consistency.f90 card checks
Writers:
write_to()preserves parsed card order when card stream metadata is available.write_canonical()writes normalized CONTROL/PRINT + sections layout.
Full Control
For advanced use cases (custom stages, timeouts, progress callbacks), use the builder API:
use ;
use Duration;
let input = from_file?;
let config = new
.work_dir
.input
.stages
.stage_timeout
.build?;
let result = new.run_with_progress?;
Parsing Output
let result = run?;
let outputs = result.outputs?;
let xmu = result.read_xmu?; // convenience
let paths = result.read_paths?; // structured paths.dat parser
let chi = outputs.read_chi?; // via discovered output registry
let reference = from_file?;
let rsq = xmu.r_squared;
println!;
println!;
println!;
println!;
Features
prebuilt— Skip Fortran compilation and use a prebuilt library
See the main project README for build instructions, benchmarks, and architecture details.