Layers

Overview

hoobas.Layers.Multilayer

Makes multilayered structures of hoobas.Composite.CompositeObject

hoobas.Layers.LayeredTiling

class meant to emulate liquid-liquid phase separation by pre-separating components.

Details

class hoobas.Layers.LayeredTiling(nx=1, ny=1, NLayers=1, alternating_directions=True, **kwargs)[source]

class meant to emulate liquid-liquid phase separation by pre-separating components. The layers will be N x M tiles of different chains. The chains will be fully phase separated; if a ternary mixture A-B-C needs to be built in tiles of A-B + C, this can be made by using a list of component and numbers in the species

add_species(species_type, species_per_layer, squish=None)[source]

Adds hoobas.Composite.CompositeObject species to the layers.

Parameters
  • species_type (Union[CompositeObject, List[CompositeObject]]) – type of species to add

  • species_per_layer (Union[int, List[int]]) – number of objects per layer

  • squish (Union[None, float, List[float]]) – how much individual object types should be squished

Return type

None

Returns

None

class hoobas.Layers.Multilayer(NLayers=1, units=None, alternating_directions=True)[source]

Makes multilayered structures of hoobas.Composite.CompositeObject

add_species(species_type, species_per_layer, squish=None)[source]

Add a species of hoobas.Composite.CompositeObjects to the layer

Parameters
  • species_type (CompositeObject) – Object to add

  • species_per_layer (Union[int, Callable]) – Number of objects on each layer

  • squish (Optional[float]) – relative depth of the object

Return type

None

Returns

None

force_layer_thickness(thickness)[source]

Forces the individual layers to have a specific thickness

Parameters

thickness (float) – thickness of the layers

Return type

None

Returns

None

transform(lattice, hkl=None, position_map=None, normal_map=None, shift=None)[source]

Transform the 2D flat (x,y) layer into an arbitrary (hkl) crystal plane. This is done by specifying two in-plane crystal vectors. Curved surfaces can be generated by passing functions that map the (x,y : [-1,1]) coordinates to a center position for vec_a and (x,y) coordinate to a surface normal. The surface normal has to be supplied for non-cubic systems since it cannot be properly recovered in fractional coordinates. All coordinates are fractional

Parameters
  • lattice (ndarray) – crystal lattice

  • hkl (Optional[Sequence[int]]) – Miller indices of the plane

  • position_map (Optional[Callable]) – (x,y) -> position mapping function (curved plane)

  • normal_map (Optional[Callable]) – (x,y) -> surface normal mapping function (curved plane)

  • shift (Optional[ndarray]) – fractional shift to apply

Return type

None

Returns

None