Skip to main content

Crate phasesmith_engine

Crate phasesmith_engine 

Source
Expand description

Native composition boundary for crystallography and powder profiles.

phasesmith-engine turns crystallographic definitions into calculated powder patterns by composing phasesmith-crystallography with phasesmith-core. It has no Python, file-format, persistence, refinement, or GUI dependency. Applications normally use it through phasesmith::engine.

§Choosing an entry point

Values, dense-Jacobian, JVP, and VJP paths share the same physical model. Prepared types are the intended choice for optimizers and interactive hosts: construct them when topology changes, then reuse them while numerical parameters vary.

§Data boundary

Inputs use borrowed array views and explicit physical definitions. Results own their values, reflection metadata, and derivative products. File parsing belongs to phasesmith-io; application records belong to phasesmith-model; refinement orchestration belongs to phasesmith-workflows.

See the facade’s pattern-composition mathematics for the multi-phase, multi-wavelength, sample-physics, and derivative sums.

Re-exports§

pub use structural_tof::StructuralTofDenseResult;
pub use structural_tof::StructuralTofError;
pub use structural_tof::StructuralTofInputView;
pub use structural_tof::StructuralTofJvpResult;
pub use structural_tof::StructuralTofResult;
pub use structural_tof::StructuralTofVjpResult;
pub use structural_tof::calculate_structural_tof_pattern;
pub use structural_tof::calculate_structural_tof_pattern_dense;
pub use structural_tof::calculate_structural_tof_pattern_dense_with_context;
pub use structural_tof::calculate_structural_tof_pattern_jvp;
pub use structural_tof::calculate_structural_tof_pattern_jvp_with_context;
pub use structural_tof::calculate_structural_tof_pattern_vjp;
pub use structural_tof::calculate_structural_tof_pattern_vjp_with_context;
pub use structural_tof::calculate_structural_tof_pattern_with_context;
pub use structural_pattern::BuiltInScatteringModel;
pub use structural_pattern::MonochromaticPositionCorrection;
pub use structural_pattern::MonochromaticReflectionGeometry;
pub use structural_pattern::StructuralPatternDenseResult;
pub use structural_pattern::StructuralPatternError;
pub use structural_pattern::StructuralPatternInputView;
pub use structural_pattern::StructuralPatternJvpResult;
pub use structural_pattern::StructuralPatternResult;
pub use structural_pattern::StructuralPatternVjpResult;
pub use structural_pattern::calculate_monochromatic_reflection_geometry;
pub use structural_pattern::calculate_structural_pattern;
pub use structural_pattern::calculate_structural_pattern_dense;
pub use structural_pattern::calculate_structural_pattern_dense_with_context;
pub use structural_pattern::calculate_structural_pattern_jvp;
pub use structural_pattern::calculate_structural_pattern_jvp_with_context;
pub use structural_pattern::calculate_structural_pattern_vjp;
pub use structural_pattern::calculate_structural_pattern_vjp_with_context;
pub use structural_pattern::calculate_structural_pattern_with_context;
pub use phasesmith_core as profile;
pub use phasesmith_crystallography as crystallography;

Modules§

structural_pattern
Fused built-in scattering, structural intensity, and CW profile composition.
structural_tof
Fused neutron structural time-of-flight pattern calculation.

Structs§

PreparedStructuralModelInputView
Borrowed dynamic data for one phase model in a multiphase operation.
PreparedStructuralMultiphase
Reusable native scheduler for ordered structural phase models.
PreparedStructuralPatternInputView
Borrowed experiment and sample-physics data for evaluating a prepared phase.
PreparedStructuralPhase
Reusable, application-neutral structural phase with an owned worker budget.
PreparedStructuralSpectrum
Reusable native fixed-wavelength spectrum for one structural phase.
PreparedStructuralSpectrumInputView
Borrowed dynamic inputs for one prepared fixed-wavelength spectrum.
StructuralCalculationRequest
Owned application-boundary request for one multiphase structural calculation.
StructuralCalculationResult
Display-ready owned result from a structural calculation request.
StructuralModelInput
Owned sample-physics inputs for one prepared structural model.
StructuralMultiphaseResult
Ordered multiphase structural values and their combined profile.
StructuralPhaseDefinition
Owned crystallographic and scattering data for one structural phase.

Enums§

PreparedStructuralModel
One native built-in structural model, monochromatic or fixed-spectrum.
StructuralMultiphaseError
Invalid native multiphase request.
StructuralSpectrumError
Invalid fixed-wavelength structural spectrum request.