diff --git a/src/py/mat3ra/made/tools/build/grain_boundary/builders.py b/src/py/mat3ra/made/tools/build/grain_boundary/builders.py index e4e4bdb9..4ac22f55 100644 --- a/src/py/mat3ra/made/tools/build/grain_boundary/builders.py +++ b/src/py/mat3ra/made/tools/build/grain_boundary/builders.py @@ -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 diff --git a/src/py/mat3ra/made/tools/build/grain_boundary/configuration.py b/src/py/mat3ra/made/tools/build/grain_boundary/configuration.py index 4fa5976d..37960ca2 100644 --- a/src/py/mat3ra/made/tools/build/grain_boundary/configuration.py +++ b/src/py/mat3ra/made/tools/build/grain_boundary/configuration.py @@ -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