Prefab Module¶
Prefab Objects¶
- class czone.prefab.prefab.BasePrefab¶
Bases:
abc.ABC
Base abstract class for Prefab objects.
Prefab objects are objects and classes that can run predesigned algorithms for generating certain classes of regular objects, typically with sampleable features or properties. For example, planar defects in FCC systems are easily described in algorithmic form– a series of {111} planes can be chosen to put a defect on.
Prefab objects will generally take in at least a base Generator object defining the system of interest and potentially take in Volume objects. They will return Volumes, or, more likely, MultiVolume objects which contains the resultant structure defined by the prefab routine.
- abstract build_object() czone.volume.volume.BaseVolume ¶
Construct and return a prefabicated structure.
- class czone.prefab.prefab.SimpleGrainBoundary(z1, r1, z2=None, r2=None, plane=None, point=None, volume=None, generator=None)¶
Bases:
czone.prefab.prefab.BasePrefab
Prefab routine for crystalline grain boundaries.
Under development.
- build_object()¶
Construct and return a prefabicated structure.
- property z1¶
- property z2¶
- class czone.prefab.prefab.fccMixedTwinSF(generator: Optional[czone.generator.generator.Generator] = None, volume: Optional[czone.volume.volume.BaseVolume] = None, ratio: float = 0.5, N: int = 1, min_sep: int = 3, plane: Tuple[int] = (1, 1, 1))¶
Bases:
czone.prefab.prefab.BasePrefab
Prefab routine for returning FCC volume with mixed stacking fault and twin defects.
Given a volume with an attached generator (assumed to be FCC symmetry), return a MultiVolume with a series of twin defects and stacking faults. Defects can be placed on any plane in the {111} family, and are uniformly randomly distributed on the available (111) planes with a minimum separation. Types of defects are uniformly randomly sampled, as well, according to a ratio of twin defects to stacking faults.
- N¶
Number of defects to attempt to place into volume
- Type
int
- plane¶
Length 3 tuple of Miller indices representing set of planes to put defects on
- Type
Tuple[int]
- ratio¶
Ratio of stacking faults:total defects. A ratio of 1.0 will produce only stacking faults, while a ratio of 0.0 will produce only twin defects.
- Type
float
- property N¶
Number of defects to place in volume.
- build_object(return_defect_types=False)¶
Construct and return a prefabicated structure.
- property generator¶
Crystalline geneartor used to sample planes for defects.
- property min_sep¶
Minimum seperation between defects in numbers of planes.
- property plane¶
Miller indices of defect planes.
- property ratio¶
total defects placed into object.
- Type
Ratio of stacking faults
- property volume¶
Volume used to defined outer bounds of defected object.
- class czone.prefab.prefab.fccStackingFault(generator: Optional[czone.generator.generator.Generator] = None, volume: Optional[czone.volume.volume.BaseVolume] = None, N: int = 1, min_sep: int = 3, plane: Tuple[int] = (1, 1, 1))¶
Bases:
czone.prefab.prefab.fccMixedTwinSF
Prefab routine for returning FCC volume with stacking fault defects.
Given a volume with an attached generator (assumed to be FCC symmetry), return a MultiVolume with a series of. stacking faults. Defects can be placed on any plane in the {111} family, and are uniformly randomly distributed on the available (111) planes with a minimum separation.
- N¶
Number of defects to attempt to place into volume
- Type
int
- plane¶
Length 3 tuple of Miller indices representing set of planes to put defects on/
- Type
Tuple[int]
- property ratio¶
total defects placed into object.
- Type
Ratio of stacking faults
- class czone.prefab.prefab.fccTwin(generator: Optional[czone.generator.generator.Generator] = None, volume: Optional[czone.volume.volume.BaseVolume] = None, N: int = 1, min_sep: int = 3, plane: Tuple[int] = (1, 1, 1))¶
Bases:
czone.prefab.prefab.fccMixedTwinSF
Prefab routine for returning FCC volume with twin defects.
Given a volume with an attached generator (assumed to be FCC symmetry), return a MultiVolume with a series of. stacking faults. Defects can be placed on any plane in the {111} family, and are uniformly randomly distributed on the available (111) planes with a minimum separation.
- N¶
Number of defects to attempt to place into volume
- Type
int
- plane¶
Length 3 tuple of Miller indices representing set of planes to put defects on/
- Type
Tuple[int]
- property ratio¶
total defects placed into object.
- Type
Ratio of stacking faults
- class czone.prefab.prefab.wurtziteStackingFault(generator: Optional[czone.generator.generator.Generator] = None, volume: Optional[czone.volume.volume.BaseVolume] = None, N: int = 1, min_sep: int = 6)¶
Bases:
czone.prefab.prefab.BasePrefab
Prefab routine for returning Wurtizite volume with I1 stacking faults.
Given a volume with an attached generator (assumed to be Wurtize symmetry), return a MultiVolume with a series of stacking faults. Defects can be placed (002) planes, and are uniformly with a minimum separation.
- N¶
Number of defects to attempt to place into volume
- Type
int
- plane¶
Length 3 tuple of Miller indices representing set of planes to put defects on
- Type
Tuple[int]
- generator¶
Generator object representing Wurtzite crystal system. Assumes c-axis is last axis of bases.
- Type
- property N¶
Number of defects to place in volume.
- build_object(return_defect_types=False)¶
Construct and return a prefabicated structure.
- property generator¶
Crystalline geneartor used to sample planes for defects.
- property min_sep¶
Minimum seperation between defects in numbers of planes.
- property plane¶
Miller indices of defect planes.
- property volume¶
Volume used to defined outer bounds of defected object.
Wulff Constructions¶
- class czone.prefab.wulff.WulffBase¶
Bases:
abc.ABC
Base class for Wulff constructions, as adapted from WulffPack.
Wulff constructions are energetic constructions of single crystals. From a list of surfaces and corresponding surface energies, the equilibirium shape minimizing the total surface energy for a given volume is determined. The equilbirium shape is looseley the inner surface of the intersection of the supplied surfaces, where the supplied surfaces are translated from the origin along their normal directions by their relative surface energies.
- p_atoms¶
Primitive structure of generator, as ASE Atoms object.
- Type
Atoms
- natoms¶
Approximate size of particle in number of atoms.
- Type
int
- surface_energies¶
dictionary of surfaces and corresponding surface energies, where keys are tuples of miller indices and values are surfaces energies as floats
- Type
Dict[Tuple, float]
- property generator¶
Generator object representing crystal system.
- abstract get_construction()¶
For a given crystal and set of surface energies, return a Wulff construction.
- Returns
Volume or MultiVolume with planes and generator with object prescribed by given Wulff Construction.
- property natoms¶
Size of particle in approximate number of atoms.
- property p_atoms¶
Primitive structure of generator as ASE Atoms object.
- static planes_from_form(wulff_form)¶
Return facets of a full Wulff construction as list of Planes.
- Parameters
wulff (BaseParticle) – WulffPack particle.
- Returns
List of Planes representing facets of Wulff constructions.
- static planes_from_wulff(wulff)¶
Return facets of a full Wulff construction as list of Planes.
- Parameters
wulff (BaseParticle) – WulffPack particle.
- Returns
List of Planes representing facets of Wulff constructions.
- property surface_energies¶
surface energy pairs.
- Type
Dictionary of surface
- class czone.prefab.wulff.WulffDecahedron(generator: czone.generator.generator.Generator, surface_energies: dict, twin_energy: float, natoms: int = 1000)¶
Bases:
czone.prefab.wulff.WulffBase
Prefab routine for constructing strained Decahedra for FCC systems.
Decahedral nanoparticles cannot be created in a defect-free, strain-free manner; however, relatively simple, physically close models can be generated through simple strain and twin defect models with Wulff constructions defining tetrahedral units. Construction algorithm is an adapatation of that found in WulffPack.
See L. D. Marks, Modified Wulff constructions for twinned particles, J. Cryst. Growth 61, 556 (1983), doi: 10.1016/0022-0248(83)90184-7 for background.
- p_atoms¶
Primitive structure of generator, as ASE Atoms object.
- Type
Atoms
- natoms¶
Approximate size of particle in number of atoms.
- Type
int
- surface_energies¶
dictionary of surfaces and corresponding surface energies, where keys are tuples of miller indices and values are surfaces energies as floats.
- Type
Dict[Tuple, float]
- twin_energy¶
surface energy of twin boundaries in system.
- Type
float
- get_construction()¶
For a given crystal and set of surface energies, return a Wulff construction.
- Returns
Volume or MultiVolume with planes and generator with object prescribed by given Wulff Construction.
- property twin_energy¶
Surface energy of twin boundary defects.
- class czone.prefab.wulff.WulffIcosahedron(generator: czone.generator.generator.Generator, surface_energies: dict, twin_energy: float, natoms: int = 1000)¶
Bases:
czone.prefab.wulff.WulffDecahedron
Prefab routine for constructing strained Decahedra for FCC systems.
Icosahedral nanoparticles cannot be created in a defect-free, strain-free manner; however, relatively simple, physically close models can be generated through simple strain and twin defect models with Wulff constructions defining tetrahedral units. Construction algorithm is an adapatation of that found in WulffPack.
See L. D. Marks, Modified Wulff constructions for twinned particles, J. Cryst. Growth 61, 556 (1983), doi: 10.1016/0022-0248(83)90184-7 for background.
- p_atoms¶
Primitive structure of generator, as ASE Atoms object.
- Type
Atoms
- natoms¶
Approximate size of particle in number of atoms.
- Type
int
- surface_energies¶
dictionary of surfaces and corresponding surface energies, where keys are tuples of miller indices and values are surfaces energies as floats
- Type
Dict[Tuple, float]
- twin_energy¶
surface energy of twin boundaries in system.
- Type
float
- get_construction()¶
For a given crystal and set of surface energies, return a Wulff construction.
- Returns
Volume or MultiVolume with planes and generator with object prescribed by given Wulff Construction.
- property icosahedral_scale_factor¶
- class czone.prefab.wulff.WulffSingle(generator: czone.generator.generator.Generator, surface_energies: dict, natoms: int = 1000)¶
Bases:
czone.prefab.wulff.WulffBase
- classmethod cube(generator: czone.generator.generator.Generator, natoms: int = 1000)¶
Convenience constructor for cubic nanoparticles with Wulff construction.
- Parameters
generator (Generator) – crystalline system for Wulff construction.
natoms (int) – approximate size of particle in atoms.
- Returns
Wulff construction for a cubic nanoparticle.
- classmethod cuboctohedron(generator: czone.generator.generator.Generator, natoms: int = 1000)¶
Convenience constructor for cuboctohedra; nanoparticles with Wulff construction.
- Parameters
generator (Generator) – crystalline system for Wulff construction.
natoms (int) – approximate size of particle in atoms.
- Returns
Wulff construction for a cuboctohedral nanoparticle.
- get_construction()¶
For a given crystal and set of surface energies, return a Wulff construction.
- Returns
Volume or MultiVolume with planes and generator with object prescribed by given Wulff Construction.
- classmethod octohedron(generator: czone.generator.generator.Generator, natoms: int = 1000)¶
Convenience constructor for octohedral nanoparticles with Wulff construction.
- Parameters
generator (Generator) – crystalline system for Wulff construction.
natoms (int) – approximate size of particle in atoms.
- Returns
Wulff construction for a octohedral nanoparticle.
- classmethod truncated_octohedron(generator: czone.generator.generator.Generator, natoms: int = 1000)¶
Convenience constructor for truncted octohedral nanoparticles with Wulff construction.
- Parameters
generator (Generator) – crystalline system for Wulff construction.
natoms (int) – approximate size of particle in atoms.
- Returns
Wulff construction for a truncated octohedral nanoparticle.
- winterbottom(interface: Tuple[int], interface_energy: float)¶
Construct Winterbottom construction for single crystals.
A Winterbottom construction is analagous to a Wulff construction, in that it is the shape for a single crystal particle that minimizes the surface energy when the particle is in contact with another surface.
- Parameters
interface (Tuple[int]) – Miller indices of interfacial surface
interface_energy – Relative surface energy of interface. Must be less than or equal to half of the smallest surface energy for the other surfaces.
- Returns
Volume with shape described by Winterbottom construction for given surfce energies.