Skip to content

Commit

Permalink
update: remove redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Aug 27, 2024
1 parent 7b5323e commit ff5f611
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
5 changes: 2 additions & 3 deletions src/py/mat3ra/made/tools/build/passivation/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from .configuration import (
PassivationConfiguration,
SurfacePassivationConfiguration,
UndercoordinationPassivationConfiguration,
)


Expand Down Expand Up @@ -139,12 +138,12 @@ class UndercoordinationPassivationBuilder(PassivationBuilder):

build_parameters: UndercoordinationPassivationBuilderParameters = UndercoordinationPassivationBuilderParameters()

def create_passivated_material(self, configuration: UndercoordinationPassivationConfiguration) -> Material:
def create_passivated_material(self, configuration: SurfacePassivationConfiguration) -> Material:
material = super().create_passivated_material(configuration)
passivant_coordinates_values = self._get_passivant_coordinates(material, configuration)
return self._add_passivant_atoms(material, passivant_coordinates_values, configuration.passivant)

def _get_passivant_coordinates(self, material: Material, configuration: UndercoordinationPassivationConfiguration):
def _get_passivant_coordinates(self, material: Material, configuration: SurfacePassivationConfiguration):
"""
Calculate the coordinates for placing passivants based on the specified edge type.
Expand Down
16 changes: 8 additions & 8 deletions src/py/mat3ra/made/tools/build/passivation/configuration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from mat3ra.made.material import Material

from .enums import SurfaceTypes, EdgeTypes
from .enums import SurfaceTypes
from ...build import BaseConfiguration


Expand Down Expand Up @@ -35,10 +35,10 @@ class SurfacePassivationConfiguration(PassivationConfiguration):

surface: SurfaceTypes = SurfaceTypes.BOTH


class EdgePassivationConfiguration(PassivationConfiguration):
"""
Configuration for a passivation.
"""

edge: EdgeTypes = EdgeTypes.BOTH
@property
def _json(self):
return {
**super()._json,
"type": self.get_cls_name(),
"surface": self.surface,
}
6 changes: 0 additions & 6 deletions src/py/mat3ra/made/tools/build/passivation/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ class SurfaceTypes(str, Enum):
TOP = "top"
BOTTOM = "bottom"
BOTH = "both"


class EdgeTypes(str, Enum):
ALONG_X = "along_x"
ALONG_Y = "along_y"
BOTH = "both"

0 comments on commit ff5f611

Please sign in to comment.