In order to support a wide range of applications (and to build complex items) there are a few different types of material that can be utilised in
These can include constraints or enabel the user to define the material based on chemical or physical properties.
Full API documentation for the
EasyReflectoemtry.sample.material mdoule is also available, but here we will give some simple uses for them.
The simplest type of material that is available is the
This allows the user to define a single type of material, with a real and imaginary component to the scattering length density.
The construction of a
Material is achieved as shown below.
from EasyReflectometry.sample.material import Material b = Material.from_pars(6.908, -0.278, 'Boron')
The above object will have the properties of
isld, which will have values of
6.908 1 / angstrom ** 2 and
-0.278 1 / angstrom ** 2 respectively.
As is shown in the tutorials, a material can be used to construct a
Layer from which slab models are created.
In addition to defining a material by its scattering length density, it may be useful to define a material by the mass density and chemical formula.
This is possible with the
MaterialDensity material type, which uses the scattering length and atomic mass from the chemical formula and the density to determine the scattering length density.
It is then possible to vary the density, which defines the scattering length density in turn.
MaterialDensity material can be create as follows.
from EasyReflectometry.sample.material import MaterialDensity si = MaterialDensity.from_pars('SiO2', 2.65, 'SiO2 Material')
The density should be in units of grams per cubic centimeter and the scattering length is calculated from
Sometimes it is desirable to have a layer that consists of two materials in some ratio.
An example of this is shown in the solvation tutorial, where a polymer film solvated with D2O is modelled.
To produce a material that is described by such a mixture, there is the
MaterialMixture material option.
This is constructed from two constituent materials and the fractional amount of the second in the first.
So to produce a material that is 20 % D2O in a polymer, the following is used.
from EasyReflectometry.sample.material import Material, MaterialMixture polymer = Material.from_pars(2., 0., 'Polymer') d2o = Material.from_pars(6.36, 0, 'D2O') solvated_polymer = MaterialMixture.from_pars(polymer, d2o, 0.2, 'Solvated Polymer')
solvated_polymer object, the
sld will be
2.872 1 / angstrom ** 2 (the weighted average of the two scattering length densities).
MaterialMixture includes a constraint such that if the value of either constituent scattering length densities (both real and imaginary components) or the fraction changes, then the resulting material
isld will change appropriately.