Features
EasyDiffraction calculates diffraction patterns from a structural model and instrument settings, and refines that model against measured data. This page gives a complete overview of what it can do today and what is planned, across powder and single-crystal diffraction, total scattering (PDF), and the analysis tools around them.
Calculation engines
Most of the physics is computed by a pluggable calculation engine. Each engine is described on the Analysis page.
cryspy— Bragg diffraction, Python library.crysfml— Bragg diffraction, Fortran library with Python bindings.pdffit2— Total scattering (Pair Distribution Function), Python library.easydiffraction— extra corrections around the engine (e.g. background, scale).
How to read this page
Each capability is tracked across the three ways to use EasyDiffraction:
- LIB — Python library
- CLI — command-line interface
- APP — graphical application
The status icons:
Done
Partially done — available with at least one engine/interface
Work in progress
Planned (no priority yet) · 5/5
highest· 4/5high· 3/5medium· 2/5low· 1/5lowest- Not available / not applicable — the engine/interface does not provide this
- Unknown — support not yet confirmed for this engine/interface
How the columns are scored
The LIB column aggregates the per-engine lines in the Feature
cell (the engines are the library backends): when
every relevant engine is done (engines that do not apply are marked
), and
when at least one
engine is done but others are in progress or planned. The CLI
and APP columns show whether the feature is available in those
two interfaces.
Using the command-line interface
The CLI runs the refinement workflow — fit, display, undo.
Models, parameters, constraints, and report options are set by
editing the project text files (.edi/CIF) in your own editor,
rather than through dedicated CLI commands. A in
the CLI column means the capability is reachable through this
edit-then-run workflow.
Icons inside the Feature cell
Each line in the Feature cell carries its own icon:
- The engine lines show per-engine status, e.g.
cryspy(done) orcrysfml(planned). A backend keyword is shown in quotes (e.g.cryspy"Gauss"). - cross-references the equivalent FullProf
.pcrentry, to help users coming from FullProf. - links to the Verification page where the calculation is cross-checked against an independent reference.
Epics shown as single rows
Large areas still on the roadmap — magnetic structures, polarized neutron diffraction, 2D Rietveld, incommensurate structures — are listed as one top-level row each. They are epics that will be broken into detailed rows once work starts. Already-implemented areas are shown in full detail.
1. Structure Model
1.1. Crystal Structure
Space Group
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Hermann-Mauguin space-group symbol - cryspy- crysfml- pdffit2 |
|||
| Space group IT number - easydiffraction |
|||
| IT coordinate system code - cryspy- crysfml- pdffit2- FullProf ":1" (origin choice) |
Cell
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Lengths a, b, c - cryspy- crysfml- pdffit2 |
|||
| Angles α, β, γ - cryspy- crysfml- pdffit2 |
Atom Sites
Atomic Displacement (ADP)
Note
CrysFML refines only isotropic ADPs today; for anisotropic atoms it
uses the isotropic-equivalent B, so true anisotropic refinement in
crysfml is unconfirmed ( on the anisotropic
rows). EasyDiffraction stores ADPs type-neutrally and converts
between B, U, and β for each engine, so the easydiffraction
line marks that conversion. pdffit2 works in U; its β support
is likewise unconfirmed.
1.2. Magnetic Structure
Magnetic structure refinement is an epic (one row per area for now).
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Irreducible representations | |||
| Magnetic Space Groups | |||
| Symmetry-adapted modes | |||
| Magnetic propagation vector (kx, ky, kz) - FullProf "Nvk (propagation vectors)" |
|||
| Magnetic moments (mx, my, mz) - FullProf "Rx, Ry, Rz" |
|||
| Local Susceptibility (𝜒11…𝜒23) | |||
| Magnetic domains |
2. Experiment Model
| Technique | LIB | CLI | APP |
|---|---|---|---|
| 2.1. Powder Diffraction | |||
| 2.2. Single-Crystal Diffraction | |||
| 2.3. Polarized Powder Diffraction — EPIC | |||
| 2.4. Polarized Single-Crystal Diffraction — EPIC |
2.1. Powder Diffraction
Common features
Linked Phases
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Scale factor - easydiffraction |
Excluded Regions
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Multiple regions: start/end positions - easydiffraction |
Standard Bragg diffraction
Fitting Methods
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Rietveld refinement (full pattern) - cryspy- crysfml |
|||
| Le Bail refinement (profile matching) - cryspy- crysfml- FullProf "Jbt=2 (profile matching)" |
Background
Background curves are evaluated by EasyDiffraction and added to the calculated pattern; the engine is not involved.
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Line segments type: position, intensity - easydiffraction- FullProf "Nba" (linear interpolation points) |
|||
| Chebyshev polynomial type: order, coefficient - easydiffraction- FullProf "Nba=0 (polynomial background)" |
|||
| Automatic background estimation: auto or arPLS, FABC, SNIP - easydiffraction |
Preferred Orientation
| Feature | LIB | CLI | APP |
|---|---|---|---|
| March–Dollase: march_r, random fraction, hkl axis - cryspy - crysfml- FullProf "Nor=1", "Pref1/2, Pr1/2/3" |
Instrument — Constant Wavelength
Instrument — Time-of-Flight
| Feature | LIB | CLI | APP |
|---|---|---|---|
| 2θ bank - cryspy- crysfml- FullProf "2-theta bank" |
|||
| d → TOF conversion: offset, linear, quadratic (reciprocal defined but not yet wired) - cryspy- crysfml- FullProf "Zero, Dtt1, Dtt2, Dtt_1overd" |
Note
CrysFML's TOF branch is not yet functional (it parses TOF input but
returns zero intensities), so TOF profiles and TOF instrument parameters
are cryspy-only today; crysfml is marked .
Peak Profile — Common (CWL + TOF)
Applies to every Bragg peak profile below, in both constant-wavelength and time-of-flight modes.
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Peak-range cutoff (speed vs accuracy) cutoff in FWHMs; 0 = full range - cryspy- crysfml- FullProf "WDT" |
Peak Profile — Constant Wavelength
Peak Profile — Time-of-Flight
Total Scattering (Pair Distribution Function)
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Gaussian-damped sinc termination cutoff Qmax, broadening Qbroad, sharpening δ₁, δ₂, damping Qdamp, particle diameter spdiameter - pdffit2 |
2.2. Single Crystal Diffraction
Extinction
CrysPy's extinction is an analytical Becker-Coppens spherical model with a Gaussian or Lorentzian mosaicity distribution.
Structural twinning
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Structural twinning - cryspy- crysfml |
Instrument — Constant Wavelength
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Wavelength - cryspy- crysfml- FullProf "Lambda1" |
|||
| Half wavelength (λ/2) - cryspy- crysfml- FullProf "x-Lambda/2" |
Instrument — Time-of-Flight
2.3. Polarized Powder Diffraction
Polarized-neutron powder diffraction is an epic. Planned: flipping-ratio method.
2.4. Polarized Single-Crystal Diffraction
Polarized-neutron single-crystal diffraction is an epic. Planned: flipping-ratio method, XYZ polarisation analysis, spherical neutron polarimetry.
3. Multi-Dataset Support
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Multiple structural data blocks | |||
| Multiple experimental data blocks |
4. Analysis (Fitting)
4.1. Calculation Modes
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Calculate diffraction pattern (for fitting/comparison) - cryspy- crysfml- pdffit2 |
|||
| Calculate diffraction pattern (simple view, no data) - cryspy- crysfml- pdffit2 |
|||
| Calculate structure factors - cryspy- crysfml |
4.2. Refinement Algorithms (numerical derivatives)
Minimizers are EasyDiffraction's optimizers and run with any engine.
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Levenberg–Marquardt — LMFIT (leastsq) minimizer | |||
| Trust Region Reflective — LMFIT (least_squares) minimizer | |||
| Levenberg–Marquardt — BUMPS (LM) minimizer | |||
| Nelder-Mead — BUMPS (AMOEBA) minimizer | |||
| Differential evolution — BUMPS (DE) minimizer | |||
| Derivative-free minimization — DFO-LS minimizer |
4.3. Bayesian Analysis (Markov Chain Monte Carlo sampling)
| Feature | LIB | CLI | APP |
|---|---|---|---|
| DiffeRential Evolution Adaptive Metropolis — BUMPS (DREAM) minimizer | |||
| Affine-invariant ensemble sampling — EMCEE minimizer | |||
| Resume sampling — BUMPS (DREAM) minimizer | |||
| Resume sampling — EMCEE minimizer |
4.4. Fit Strategies
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Single fit of one experiment to one or more structures | |||
| Sequential fit of experimental data blocks | |||
| Joint fit within the same calculation engine | |||
| Joint fit using different engines (e.g. CrysPy + Pdffit2) | |||
| Custom weighting for joint fit: weight per dataset |
4.5. Live Fitting
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Live fitting during real-time data acquisition |
5. Refinement Execution
| Feature | LIB | CLI | APP |
|---|---|---|---|
| GUI-driven refinement workflow | |||
| Command-line refinement execution | |||
| Scripted refinement workflow | |||
| Parameter modification | |||
| Load individual structure or experiment files | |||
| Project-based refinement | |||
| Sequential refinement | |||
| Save refinement results to project | |||
| Undo last fit |
6. Constraints
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Automatic symmetry constraints | |||
| User-defined constraints e.g. "biso_Ba = biso_La", "occ_Ba = 1 - occ_La" |
7. Data Management
7.1. Project Files
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Load full project from disk | |||
| Save full project to disk |
7.2. Reports
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Interactive HTML report (Plotly fit plots, Three.js 3D structures; offline option) | |||
| LaTeX (TeX) report | |||
| PDF report (compiled from the TeX bundle; requires a LaTeX engine) | |||
| CIF report (IUCr-style) |
7.3. Data Loading
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Add structure (to project) from CIF | |||
| Add structure (to project) from edi | |||
| Add experiment data (to project) from CIF | |||
| Add experiment data (to project) from edi | |||
| Add experiment data (to project) from ASCII | |||
| Add experiment data (to project) from NeXus |
7.4. SciCat Integration
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Load full project from SciCat | |||
| Save full project to SciCat |
7.5. External Resources
| Feature | LIB | CLI | APP |
|---|---|---|---|
| List available tutorial Jupyter notebooks | |||
| Download tutorial Jupyter notebooks |
8. Visualization
8.1. Structure
Crystal Structure
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Visualize unit cell | |||
| Visualize multiple unit cells | |||
| Visualize atom sites as spheres | |||
| Visualize atoms occupied same position | |||
| Visualize bonds | |||
| Visualize polyhedra | |||
| Interactive mode: 3D rotation, zooming |
Magnetic Structure
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Visualize magnetic moments | |||
| Visualize magnetization densities |
8.2. Experiment
Powder Diffraction
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Plot experimental curve | |||
| Plot calculated curve | |||
| Plot residual curve | |||
| Plot Bragg peaks | |||
| Interactive mode: zooming, panning |
Single Crystal Diffraction
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Plot obs vs calc for reflections | |||
| Interactive mode: zooming, panning |
8.3. Analysis
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Live update of plots on parameter change with slider | |||
| Live update of plots during refinement | |||
| Live update of fit quality (change in χ²) — table/statusbar | |||
| Live update of fit quality (change in χ²) — chart | |||
| Parameter evolution (sequential refinement) | |||
| Correlation between parameters | |||
| Posterior pair (corner) plot | |||
| Posterior marginal distributions | |||
| Posterior predictive bands |
9. User documentation
| Feature | LIB | CLI | APP |
|---|---|---|---|
| New unified documentation structure | |||
| Introduction | |||
| Features | |||
| Installation and setup guide | |||
| User guide | |||
| Tutorials | |||
| Verification | |||
| Command-line interface | |||
| Quick Reference | |||
| API reference |
10. Backlog
Items not yet scheduled or detailed. Several are epics (large areas that will be split into detailed rows once work begins).
| Feature | LIB | CLI | APP |
|---|---|---|---|
| Incommensurate structures — EPIC | |||
| 2D Rietveld refinement — EPIC | |||
| Chatbot for natural-language requests during analysis | |||
| Refinement using analytical derivatives | |||
| Global optimization algorithms (e.g. simulated annealing) | |||
| Built-in refinement strategies for common workflows | |||
| Restraints (soft constraints, e.g. bond lengths, angles) | |||
| Search and download structure from Crystallography Open Database (COD) | |||
| Read instrument resolution parameters from file - FullProf "Irf" (.irf resolution file) |
|||
| Set free parameters by category (e.g. all atomic positions, all ADPs) |