This module intends to compute the neutron scattering length density of a molecule.It uses methods of the periodictable package to provide easy user interface for Sld calculator applications.
Bases: object
Given a molecule, a density and a wavelength, this class determine scattering length density.
Example: To get the sld value and the length 1/e the following methods need to be called in this later order:
formula = "H2O"
density = 1.0
wavelength = 6.0
sld_calculator = SldCalculator()
sld_calculator.set_value(formula, density, wavelength)
sld_real, sld_im, _ = sld_calculator.calculate_neutron_sld()
result : sld = sld_real +i sld_im
Note: set_value() and calculate_neutron_sld() methods must be called in this order prior calling calculate_length() to get the proper result.