Skip to content

Commit

Permalink
MAINT: Minor PEP8 changes to dislocation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-rocke committed Nov 2, 2023
1 parent e7e4821 commit b39e596
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions matscipy/dislocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2150,14 +2150,17 @@ def check_duplicates(atoms, distance=0.1):


class CubicCrystalDislocation:
'''
Abstract base class for modelling a single dislocation
'''

# Mandatory Attributes of CubicCrystalDislocation with no defaults
# These should be set by the child dislocation class, or by CubicCrystalDislocation.__init__
# (see https://stackoverflow.com/questions/472000/usage-of-slots for more details on __slots__)
__slots__ = ("__dict__", "burgers_dimensionless", "unit_cell_core_position_dimensionless",
"glide_distance_dimensionless", "crystalstructure", "axes",
"C11", "C12", "C44", "alat", "unit_cell")

# Attributes with defaults
# These may be overridden by child classes
parity = np.zeros(2)
Expand Down Expand Up @@ -2551,6 +2554,9 @@ def build_impurity_cylinder(self, disloc, impurity, radius,


class CubicCrystalDissociatedDislocation(CubicCrystalDislocation):
'''
Abstract base class for modelling dissociated dislocation systems
'''
# Inherits all slots from CubicCrystalDislocation as well
__slots__ = ("left_dislocation", "right_dislocation")

Expand Down Expand Up @@ -2704,7 +2710,7 @@ def displacements(self, bulk_positions, center,


class BCCScrew111Dislocation(CubicCrystalDislocation):
crystalstructure="bcc"
crystalstructure = "bcc"
axes = np.array([[1, 1, -2],
[-1, 1, 0],
[1, 1, 1]])
Expand Down

0 comments on commit b39e596

Please sign in to comment.