class EasyReflectometry.sample.assemblies.surfactant_layer.SurfactantLayer[source]#

Bases: BaseAssembly

A surfactant layer constructs a series of layers representing the head and tail groups of a surfactant. This assembly allows the definition of a surfactant or lipid using the chemistry of the head (head_layer) and tail (tail_layer) 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 assembly is available in the surfactant documentation

__init__(layers, name='EasySurfactantLayer', constrain_area_per_molecule=False, conformal_roughness=False, interface=None)[source]#

Constructor.

Parameters:
  • layers (list[LayerAreaPerMolecule]) – List with the tail (index 0) and head (index 1) layer.

  • name (str) – Name for surfactant layer, defaults to ‘EasySurfactantLayer’.

  • constrain_area_per_molecule (bool) – Constrain the area per molecule, defaults to False.

  • conformal_roughness (bool) – Constrain the roughness to be the same for both layers, defaults to False.

  • interface – Calculator interface, defaults to None.

classmethod default(interface=None)[source]#

Default instance of a surfactant layer object. The default lipid type is DPPC.

Return type:

SurfactantLayer

Returns:

Surfactant layer object.

classmethod from_pars(tail_layer_molecular_formula, tail_layer_thickness, tail_layer_solvent, tail_layer_solvent_fraction, tail_layer_area_per_molecule, tail_layer_roughness, head_layer_molecular_formula, head_layer_thickness, head_layer_solvent, head_layer_solvent_fraction, head_layer_area_per_molecule, head_layer_roughness, name='EasySurfactantLayer', interface=None)[source]#

Instance of a surfactant layer where the parameters are known, head_layer is the hydrophilic part.

Parameters:
  • tail_layer_molecular_formula (str) – Molecular formula of species constituting the tail layer.

  • tail_layer_thickness (float) – Thickness of tail layer.

  • tail_layer_solvent (Material) – Solvent in tail layer.

  • tail_layer_solvent_fraction (float) – Fraction of solvent in tail layer. Fx solvation or surface coverage.

  • tail_layer_area_per_molecule (float) – Area per molecule of tail layer.

  • tail_layer_roughness (float) – Roughness of tail layer.

  • head_layer_molecular_formula (str) – Molecular formula of species constituting the head layer.

  • head_layer_thickness (float) – Thickness of head layer.

  • head_layer_solvent (Material) – Solvent in head layer.

  • head_layer_solvent_fraction (float) – Fraction of solvent in head layer. Fx solvation or surface coverage.

  • head_layer_area_per_molecule (float) – Area per molecule of head layer.

  • head_layer_roughness (float) – Roughness of head layer.

  • name (str) – Name for surfactant layer.

Return type:

SurfactantLayer

property tail_layer: LayerAreaPerMolecule | None#

Get the tail layer of the surfactant surface.

property head_layer: LayerAreaPerMolecule | None#

Get the head layer of the surfactant surface.

property constrain_area_per_molecule: bool#

Get the area per molecule constraint status.

property conformal_roughness: bool#

Get the roughness constraint status.

user_data: dict#
constrain_solvent_roughness(solvent_roughness)[source]#

Add the constraint to the solvent roughness.

Parameters:

solvent_roughness (Parameter) – The solvent roughness parameter.

layers: LayerCollection#

Layers in the assembly.

constain_multiple_contrast(another_contrast, head_layer_thickness=True, tail_layer_thickness=True, head_layer_area_per_molecule=True, tail_layer_area_per_molecule=True, head_layer_fraction=True, tail_layer_fraction=True)[source]#

Constrain structural parameters between surfactant layer objects.

Parameters:

another_contrast (SurfactantLayer) – The surfactant layer to constrain

as_dict(skip=None)[source]#

Cleaned dictionary. Custom as_dict method to skip necessary things.

Return type:

dict