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__(tail_layer=None, head_layer=None, name='EasySurfactantLayer', constrain_area_per_molecule=False, conformal_roughness=False, interface=None)[source]#

Constructor.

Parameters:
  • tail_layer (Optional[LayerAreaPerMolecule]) – Layer representing the tail part of the surfactant layer.

  • head_layer (Optional[LayerAreaPerMolecule]) – Layer representing the head part of the surfactant 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.

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.

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]#

Produces a cleaned dict using a custom as_dict method to skip necessary things. The resulting dict matches the parameters in __init__

Parameters:

skip (Optional[list]) – List of keys to skip, defaults to None.

Return type:

dict