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
calculate_structural_patternis the direct one-phase, one-wavelength calculation.calculate_structural_tof_patternis the direct one-phase, one-bank neutron TOF calculation with explicit bank geometry and correction.PreparedStructuralPhasevalidates and caches topology for repeated phase evaluations.PreparedStructuralSpectrumadds fixed wavelength components.PreparedStructuralMultiphasecomposes multiple structural phases.PreparedStructuralModelis the reusable high-level structural model.
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§
- Prepared
Structural Model Input View - Borrowed dynamic data for one phase model in a multiphase operation.
- Prepared
Structural Multiphase - Reusable native scheduler for ordered structural phase models.
- Prepared
Structural Pattern Input View - Borrowed experiment and sample-physics data for evaluating a prepared phase.
- Prepared
Structural Phase - Reusable, application-neutral structural phase with an owned worker budget.
- Prepared
Structural Spectrum - Reusable native fixed-wavelength spectrum for one structural phase.
- Prepared
Structural Spectrum Input View - Borrowed dynamic inputs for one prepared fixed-wavelength spectrum.
- Structural
Calculation Request - Owned application-boundary request for one multiphase structural calculation.
- Structural
Calculation Result - Display-ready owned result from a structural calculation request.
- Structural
Model Input - Owned sample-physics inputs for one prepared structural model.
- Structural
Multiphase Result - Ordered multiphase structural values and their combined profile.
- Structural
Phase Definition - Owned crystallographic and scattering data for one structural phase.
Enums§
- Prepared
Structural Model - One native built-in structural model, monochromatic or fixed-spectrum.
- Structural
Multiphase Error - Invalid native multiphase request.
- Structural
Spectrum Error - Invalid fixed-wavelength structural spectrum request.