Similar to a range of different materials, there are a few different ways that a layer can be defined in EasyReflectometry.


The Layer is the simplest possible type of layer, taking a Material and two floats associated with the thickness and upper (that is closer to the source of the incident radiation) roughness. So we construct a Layer as follows for a 100 Å thick layer of boron with a roughness of 10 Å.

from EasyReflectometry.sample import Material, Layer

b = Material.from_pars(6.908, -0.278, 'Boron')
boron_layer = Layer.from_pars(b, 100, 10, 'Boron Layer')

This type of layer is used extensively in the tutorials


The LayerApm layer type is the fundation of the SurfactantLayer item type (further information on this can be found in the item library). The purpose of the LayerApm is to allow a layer to be defined in terms of the chemical formula of the material and the area per molecule of the layer. The area per molecule is a common description of surface density in the surfactant monolayer and bilayer community.

We can construct a 10 Å thick LayerApm of phosphatidylcholine, with an area per molecule of 48 Å squared and a roughness of 3 Å that has 20 % solvation with D2O using the following.

from EasyReflectometry.sample import Material, LayerApm

d2o = Material.from_pars(6.36, 0, 'D2O')

pc_formula = 'C10H18NO8P'
pc = LayerApm.from_pars(pc_formula, 10, d2o, 0.2, 48, 3, name='PC Layer')

It is expected that the typical user will not interface directly with the LayerApm item type, but instead the SurfactantLayer `item type`_ will be used instead.