Skip to content

Commit

Permalink
chore: add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Sep 7, 2024
1 parent 30981a6 commit 153ed93
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/py/mat3ra/made/tools/build/grain_boundary/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ class GrainBoundaryBuilderParameters(ZSLStrainMatchingInterfaceBuilderParameters


class GrainBoundaryBuilder(ZSLStrainMatchingInterfaceBuilder):
"""
A builder for creating grain boundaries.
The grain boundary is created by:
1. creating an interface between two phases,
2. then rotating the interface by 90 degrees.
3. Finally, creating a slab from the rotated interface.
"""

_BuildParametersType = GrainBoundaryBuilderParameters
_ConfigurationType: type(GrainBoundaryConfiguration) = GrainBoundaryConfiguration # type: ignore
_GeneratedItemType: type(Material) = Material # type: ignore
Expand Down
14 changes: 14 additions & 0 deletions src/py/mat3ra/made/tools/build/grain_boundary/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@


class GrainBoundaryConfiguration(BaseModel, InMemoryEntity):
"""
Configuration for a grain boundary in a slab material.
Attributes:
phase_1_configuration: SlabConfiguration
phase_2_configuration: SlabConfiguration
phase_1_termination: Termination
phase_2_termination: Termination
gap: float
slab_configuration: SlabConfiguration
slab_termination
"""

phase_1_configuration: SlabConfiguration
phase_2_configuration: SlabConfiguration
phase_1_termination: Termination
Expand Down

0 comments on commit 153ed93

Please sign in to comment.