Items
Contents
Items#
The item
library is the backbone of EasyReflectometry
.
An EasyReflectometry.sample.item
allows for the inclusion of physical and
chemical parameterisation into our reflectometry model.
For more information please look at the `item library documentation`_
- class EasyReflectometry.sample.items.multilayer.MultiLayer(layers, name='EasyMultiLayer', interface=None)[source]#
Bases:
BaseObj
A
MultiLayer
consists of a series ofEasyReflectometry.sample.layer.Layer
orEasyReflectometry.sample.layers.Layers
. Thisitem
will arrange the layers as slabs, one on top of another, allowing the reflectometry to be determined from them.More information about the usage of this item is available in the `item library documentation`_
- classmethod default(interface=None)[source]#
Default constructor for a multi-layer item.
- Returns
MultiLayer container
- Return type
- duplicate_layer(idx)[source]#
Duplicate a given layer.
- Parameters
idx (int) – index of layer to duplicate
- classmethod from_pars(layers, name='EasyMultiLayer', interface=None)[source]#
Constructor of a multi-layer item where the parameters are known.
- Parameters
layers (EasyReflectometry.layers.Layers) – The layers in the multi-layer
- Returns
MultiLayer container
- Return type
- remove_layer(idx)[source]#
Remove a layer from the item.
- Parameters
idx (int) – index of layer to remove
- property uid#
Return a UID from the borg map
- user_data: dict#
- class EasyReflectometry.sample.items.repeating_multilayer.RepeatingMultiLayer(layers, repetitions, name='EasyRepeatingMultiLayer', interface=None)[source]#
Bases:
MultiLayer
A
RepeatingMultiLayer
takes aMultiLayer
and repeats it a some number of times. This enables a computational efficiency in many reflectometry engines as the operation can be performed for a singleMultiLayer
and cheaply combined for the appropriate number ofrepetitions
.More information about the usage of this item is available in the `item library documentation`_
- classmethod default(interface=None)[source]#
Default constructor for the reflectometry repeating multi layer.
- Return type
- Returns
Default repeating multi-layer container
- classmethod from_pars(layers, repetitions=1.0, name='EasyRepeatingMultiLayer', interface=None)[source]#
Constructor of a reflectometry repeating multi layer where the parameters are known.
- Parameters
layers (
Layers
) – The layers in the repeating multi layerrepetitions (
float
) – Number of repetitions, defaults to :py:attr`1`.
- Return type
- Returns
Repeating multi-layer container
- property uid: int#
UID from the borg map
- Type
return
- Return type
int
- user_data: dict#
- class EasyReflectometry.sample.items.surfactant_layer.SurfactantLayer(layers, name='EasySurfactantLayer', constrain_apm=False, conformal_roughness=False, interface=None)[source]#
Bases:
MultiLayer
A
SurfactantLayer
constructs a series of layers representing the head and tail groups of a surfactant. This item allows the definition of a surfactant or lipid using the chemistry of the head and tail regions, additionally this approach will make the application of constraints such as conformal roughness or area per molecule more straight forward.More information about the usage of this item is available in the `item library documentation`_
- as_dict(skip=[])[source]#
Custom as_dict method to skip necessary things.
- Return type
dict
- Returns
Cleaned dictionary.
- property conformal_roughness: bool#
is the roughness is the same for both layers.
- Type
return
- Return type
bool
- constain_multiple_contrast(another_contrast, layer1_thickness=True, layer2_thickness=True, layer1_area_per_molecule=True, layer2_area_per_molecule=True, layer1_fraction=True, layer2_fraction=True)[source]#
Constrain structural parameters between surfactant layer objects.
- Parameters
another_contrast (
SurfactantLayer
) – The surfactant layer to constrain
- property constrain_apm: bool#
if the area per molecule is constrained
- Type
return
- Return type
bool
- constrain_solvent_roughness(solvent_roughness)[source]#
Add the constraint to the solvent roughness.
- Parameters
solvent_roughness (
Parameter
) – The solvent roughness parameter.
- classmethod default(interface=None)[source]#
Default constructor for a surfactant layer object. The default lipid type is DPPC.
- Return type
- Returns
Surfactant layer object.
- classmethod from_pars(layer1_chemical_structure, layer1_thickness, layer1_solvent, layer1_solvation, layer1_area_per_molecule, layer1_roughness, layer2_chemical_structure, layer2_thickness, layer2_solvent, layer2_solvation, layer2_area_per_molecule, layer2_roughness, name='EasySurfactantLayer', interface=None)[source]#
Constructor for the surfactant layer where the parameters are known, layer1 is that which the neutrons interact with first.
- Parameters
layer1_chemical_structure (
str
) – Chemical formula for first layerlayer1_thickness (
float
) – Thicknkess of first layerlayer1_solvent (
Material
) – Solvent in first layerlayer1_solvation (
float
) – Fractional solvation of first layer bylayer1_solvent
layer1_area_per_molecule (
float
) – Area per molecule of first layerlayer1_roughness (
float
) – Roughness of first layerlayer2_chemical_structure (
str
) – Chemical formula for second layerlayer2_thickness (
float
) – Thicknkess of second layerlayer2_solvent (
Material
) – Solvent in second layerlayer2_solvation (
float
) – Fractional solvation of second layer bylayer2_solvent
layer2_area_per_molecule (
float
) – Area per molecule of second layerlayer2_roughness (
float
) – Roughness of second layername (
str
) – Name for surfactant layer
- Return type
- user_data: dict#