Skip to content

Commit

Permalink
rename some file and Class names to typical conventions
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <[email protected]>
  • Loading branch information
marcelmbn committed Jan 28, 2025
1 parent f7599c8 commit 76b06ff
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions src/mindlessgen/generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
ResourceMonitor,
setup_blocks,
)
from ..Structure_modification import (
StrucMod,
from ..symmetrization import (
Symmetrizer,
CnRotation,
Mirror,
Inversion,
Expand Down Expand Up @@ -84,7 +84,7 @@ def generator(config: ConfigManager) -> tuple[list[Molecule], int]:
)

if config.general.structure_mod:
structure_mod_model: StrucMod | None = setup_structure_modification_model(
structure_mod_model: Symmetrizer | None = setup_structure_modification_model(
config.modification.operation, config.modification
)
else:
Expand Down Expand Up @@ -201,7 +201,7 @@ def single_molecule_generator(
resources: ResourceMonitor,
refine_engine: QMMethod,
postprocess_engine: QMMethod | None,
structure_mod_model: StrucMod,
structure_mod_model: Symmetrizer,
ncores: int,
) -> Molecule | None:
"""
Expand Down Expand Up @@ -272,7 +272,7 @@ def single_molecule_step(
resources_local: ResourceMonitor,
refine_engine: QMMethod,
postprocess_engine: QMMethod | None,
structure_mod_model: StrucMod,
structure_mod_model: Symmetrizer,
cycle: int,
stop_event: Event,
) -> Molecule | None:
Expand Down Expand Up @@ -461,7 +461,7 @@ def setup_engines(

def setup_structure_modification_model(
structure_mod_type: str, config: StructureModConfig
) -> StrucMod:
) -> Symmetrizer:
"""
Set up the structure modification model.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
This module contains all structure modification classes.
"""

from .StrucMod import StrucMod
from .base import Symmetrizer
from .mirror import Mirror
from .inversion import Inversion
from .rotation import CnRotation


__all__ = [
"StrucMod",
"Symmetrizer",
"Mirror",
"Inversion",
"CnRotation",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from ..molecules import check_distances, Molecule


class StrucMod(ABC):
class Symmetrizer(ABC):
"""
This abstract base class defines the interface for all structure modification methods.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import numpy as np

from .StrucMod import StrucMod
from .base import Symmetrizer
from ..molecules.molecule import Molecule


class Inversion(StrucMod):
class Inversion(Symmetrizer):
"""
This class handles the Inversion structure modification.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import numpy as np

from .StrucMod import StrucMod
from .base import Symmetrizer
from ..molecules.molecule import Molecule


class Mirror(StrucMod):
class Mirror(Symmetrizer):
"""
This class handles the translation structure modification.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

import numpy as np

from .StrucMod import StrucMod
from .base import Symmetrizer
from ..molecules.molecule import Molecule


class CnRotation(StrucMod):
class CnRotation(Symmetrizer):
"""
This class handles the rotation structure modification.
"""
Expand Down
2 changes: 1 addition & 1 deletion test/test_Structure_modification/test_inversion.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from mindlessgen.Structure_modification.inversion import Inversion # type: ignore
from mindlessgen.symmetrization.inversion import Inversion # type: ignore
from mindlessgen.molecules.molecule import Molecule, ati_to_atlist # type: ignore
from mindlessgen.prog.config import StructureModConfig # type: ignore

Expand Down
2 changes: 1 addition & 1 deletion test/test_Structure_modification/test_mirror.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
import numpy as np
from mindlessgen.Structure_modification.mirror import Mirror # type: ignore
from mindlessgen.symmetrization.mirror import Mirror # type: ignore
from mindlessgen.molecules.molecule import Molecule, ati_to_atlist # type: ignore
from mindlessgen.prog.config import StructureModConfig # type: ignore

Expand Down
2 changes: 1 addition & 1 deletion test/test_Structure_modification/test_rotation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from mindlessgen.Structure_modification.rotation import CnRotation # type: ignore
from mindlessgen.symmetrization.rotation import CnRotation # type: ignore
from mindlessgen.molecules.molecule import Molecule, ati_to_atlist # type: ignore
from mindlessgen.prog.config import StructureModConfig # type: ignore

Expand Down

0 comments on commit 76b06ff

Please sign in to comment.