Sassena is a free and open-source software for computing
neutron and X-ray scattering intensities from
molecular dynamics (MD) simulation trajectories.
Sassena is designed to scale on massively parallel computing
architectures, and supports both solution scattering and
crystalline diffraction as well as static and dynamic
scattering functions.

History
Sassena was created by Benjamin Lindner and Jeremy C. Smith
at the Oak Ridge National Laboratory (ORNL) and the University of Tennessee.
Its name is derived from the precursor programs SASSIM and
SERENA (SASS-ENA).
Early development is recorded in the Git log since 2009;
the first version tag is v0.1.0 from 2010.
Version 1.4 was documented in a Computer Physics Communications
paper from 2012.
Lindner described the theoretical and computational
foundations in detail in his doctoral thesis at the
University of Tennessee the same year.
In 2016/17, a fork was created at ORNL, and
a number of patches applied.
In January 2023 the project was migrated
to a GitLab instance of the Helmholtz Association.
A 2024 study by Majumdar, Müller, and Busch reported
significant performance improvements and introduced a new
finite-size correction method (Q-clean),
implemented as Sassena version v1.4.3.
Further clean-up and modernization of the code base
coincided with a version number jump to 1.9.0 in July 2024.
Documentation is maintained at Read the Docs.

Features
Sassena reads MD trajectories in standard formats (XTC, TRR,
DCD) together with a structure file (PDB) and a user-supplied
XML configuration file.
Output is written in HDF5 format.
The software computes:

Coherent and incoherent X-ray and neutron scattering amplitudes and intensities
Wide-angle X-ray scattering (WAXS)
Small-angle scattering (SAS) in solution
Bragg diffraction (crystal geometry)
Inelastic X-ray scattering (IXS)
Intermediate scattering functions I(Q,τ), Fourier transforms of the dynamic structure factors S(Q,ω)
Elastic incoherent structure factors (EISF)
Two calculation modes are provided:

all (coherent) scattering, in which data are partitioned by trajectory frame;
self (incoherent) scattering, in which data are partitioned by atom.
Powder averaging over the orientation of the scattering vector
Q is performed by a Monte Carlo sampling scheme.
Atomic X-ray form factors and neutron scattering lengths are
read from a built-in database.

Finite-size correction
Because MD simulation boxes are small compared with
real samples, a spurious small-angle signal appears in
naïvely computed diffractograms (finite-size effect).
Sassena offers two correction methods:
the original r-clean approach, which subtracts the
average scattering-length density of the solvent in real
space (but distorts the wide-angle pattern), and the
newer Q-clean method introduced in 2024, which
subtracts the scattering amplitude of a homogeneous
cuboid in reciprocal space and leaves the wide-angle
region undistorted.

Implementation and performance
Sassena is written in C++ and uses
OpenMPI for distributed-memory parallelisation
and OpenMP for shared-memory (thread-level)
parallelisation, enabling hybrid MPI/OpenMP execution.
The original 2012 release demonstrated near-linear scaling
to 7000 cores on the Jaguar Cray XT5 petaflop
supercomputer at Oak Ridge National
Laboratory.
The 2024 revision introduced SIMD vectorisation
(Intel compiler and Math Kernel Library), achieving an
approximately eightfold single-core speedup for coherent
scattering and a twofold speedup for incoherent scattering
relative to the GNU-compiled original; the OpenMP
implementation was added to complement the existing MPI
parallelism.

Related software
Sassena is typically used to post-process MD simulations
performed with software like GROMACS or LAMMPS.
An alternative to Sassena is the Python-based software
MDANSE (successor of nMoldyn), which offers broader
functionality but is not optimized for speed and scalability
to the same degree.

References