3DSCalculator Documentation
Open the calculator

Diffuse Scattering Troubleshooting

Common problems, and what to try first.

Start With The Smallest Stable Example

If the tool appears unstable, start with LiFeO2.rmc6f and moderate grid spacing before moving to the larger or more complex examples.

WebGPU Does Not Work

  • Use a recent Chromium-based browser with WebGPU enabled.
  • If WebGPU is unavailable, switch the backend to CPU FFT.
  • For verification runs, CPU FFT is the preferred fallback.

Results Differ Between Backends

  • The WebGPU FFT/NUFFT stack and the CPU FFT path use fp32 arithmetic and do not provide fp64 execution.
  • An upsampling below 2 amplifies that rounding, so the wgpuNUFFT type-1 backend refuses it with a tight tolerance (for example upsampling 1.25 at 1e-6) rather than return a less accurate result. Keep its preset (upsampling 2, tolerance 1e-6) or loosen the tolerance.
  • Small numerical differences or precision-related artifacts can appear for large grids, high dynamic range, or cancellation-sensitive features.
  • For important checks, compare against the Exact sum backend on a small grid.
  • If the interpretation changes with backend or grid density, treat that result cautiously.

Runs Are Slow Or Too Large

  • Increase the grid step.
  • Reduce the reciprocal-space range.
  • Switch from WebGPU to CPU FFT only if debugging a backend-specific problem.
  • Use LiFeO2.rmc6f or CaTiO3.rmc6f before attempting PMN.

A Phone Reloads Or Closes The Page During Compute

A large NUFFT needs more memory than the final intensity array: oversampled grids, FFT and point-sorting workspace, amplitude chunks and readback copies are also allocated. The GPU's maximum buffer size is not a measure of available memory.

On phones, tablets and devices reporting at most 4 GB of RAM, WebGPU chunks are capped at 120,000 points (rounded to whole h-planes for type-1), and type-1 uses smaller slabs within a conservative memory budget. Its GPU workspace is released before smoothing and visualization. Grids above 8,000,000 points are refused on these devices; increase the step or narrow the ranges. Chunking does not remove the need to hold the final volume in memory.

To compare with the earlier implementation, select Type-3 + webgpufft and recompute the same grid. A desktop browser is preferable for volumes that exceed the mobile limit.

2D Slice Looks Hard To Interpret

  • Reset the slice and color levels.
  • Start with axis mode, then move to normal-plane mode.
  • Use the examples guide to understand which feature families to expect in each sample.
  • A speckled, grainy map of a disordered structure is what one configuration looks like. Average several configurations, selected together (see the guide's Several Configurations), and keep smoothing on.
  • Stripes or a woven pattern in a map of LAMMPS data usually mean the grid samples between integer box units. A periodic box scatters only at integer box units; between them, a finite box shows its size fringes. Use step 1, the default for LAMMPS data.

Scattering Model Confusion

  • Use the scattering type/model controls to match the experimental modality.
  • Neutron, X-ray, and electron settings are not interchangeable.
  • For published scientific interpretation, always record which scattering option was used.

A File Is Not Recognized

  • The calculator reads .rmc6f structures, unified .h5, LAMMPS data, Scatty spin or atom files, RMCProfile spin .cfg files with their .dat, and h k l I intensity lists. Other files are refused with the list of supported formats.
  • For Scatty, load ..._spins_NN.txt or ..._atoms_NN.txt to compute, or ..._sc_list.txt to view Scatty's intensities. scatty_config.txt and ..._scatty_info.txt hold only settings.
  • For Spinteract, the ..._config.txt file supplies the cell for its data file; it contains no atoms, so there is nothing to compute from it.
  • An intensity list is refused when its points do not lie on a regular h, k, l grid, for example Scatty planes along a direction such as [1 1 0].

Magnetic Files Are Refused

  • Load the structure (.rmc6f) before its spin configuration: select the .rmc6f, spin .cfg and .dat together, or load the .rmc6f first.
  • N spins for X but only M X atoms, or Spin k (species X) is on a Y atom: the spin file belongs to another configuration, or RMCProfile's atom-type order differs from the rmc6f. Load the run's .dat, whose ATOMS line gives the type order.
  • rmc6f lattice vectors do not match the Cell line: the Lattice vectors block and the Cell line describe different cells, so the spin frame is ambiguous.
  • A .cfg that is not a spin configuration is refused. Atomic configurations are read from .rmc6f.
  • If the Magnetic options stay disabled, check that the radiation is neutron and that a spin configuration is attached.

Exports

If a plot export is disabled, compute the diffuse volume first. Slice and 3D export actions are tied to available results and active views.