md2reflect reads MD simulation trajectories, computes element-resolved
concentration profiles along the z-axis, and converts them to scattering
length density (SLD) profiles. Semi-infinite substrate and bulk layers
are added to the simulation data, interfacial roughness is applied, and
the expected reflectivity curve is calculated via the Abeles matrix
method.
Key capabilities:
- Trajectory reading via MDAnalysis (PDB, XTC, DCD, GRO, ...)
- Isotopic substitution on arbitrary atom selections
- Dual-probe SLD: neutron and X-ray profiles from the same
simulation, switchable at any point
- Convolution and Nevot-Croce roughness models
- Optimal step-function discretisation of continuous SLD profiles
(penalised Potts and constrained min-bin objectives)
- BornAgain export for advanced fitting workflows (optional)
- Interactive visualisation of SLD, reflectivity, and element
density profiles