From 153ed93e20504df097ade4c9454ad846e5720bdb Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 6 Sep 2024 20:06:26 -0700 Subject: [PATCH] chore: add docstring --- .../made/tools/build/grain_boundary/builders.py | 9 +++++++++ .../tools/build/grain_boundary/configuration.py | 14 ++++++++++++++ 2 files changed, 23 insertions(+) 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