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, **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
- Args:
nx (int): number of tiles in X direction
ny (int): number of tiles in Y direction
alternating_directions (bool): whether to reverse objects between layers
NLayers (int): number of layers to build
-
add_species(species_type, species_per_layer, squish=None)[source]¶ Adds
hoobas.Composite.CompositeObjectspecies to the layers.Parameters: - species_type (Composite.CompositeObject, list[Composite.CompositeObject]) – type of species to add
- species_per_layer (int, list[int]) – number of objects per layer
- squish (float, list[float]) – how much individual object types should be squished
Returns: None
-
class
hoobas.Layers.Multilayer(NLayers=1, units=None, alternating_directions=True)[source]¶ Makes multilayered structures of
hoobas.Composite.CompositeObject- Args:
NLayers: how many layers should be built
alternating_directions (bool): whether objects should be reversed between layers
-
add_species(species_type, species_per_layer, squish=None)[source]¶ Add a species of
hoobas.Composite.CompositeObjectsto the layerParameters: - species_type (Composite.CompositeObject) – Object to add
- species_per_layer (int, callable) – Number of objects on each layer
- squish (float) – relative depth of the object
Returns: None
-
force_layer_thickness(thickness)[source]¶ Forces the individual layers to have a specific thickness
Parameters: thickness (float) – thickness of the layers 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 – crystal lattice
- hkl – Miller indices of the plane
- position_map – (x,y) -> position mapping function (curved plane)
- normal_map – (x,y) -> surface normal mapping function (curved plane)
Returns: