Skip to content

Commit

Permalink
ENH: Multi-kink quads
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-rocke committed May 23, 2024
1 parent 863fea8 commit d06a5e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions matscipy/dislocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4046,7 +4046,7 @@ def _get_kink_quad_mask(self, ref_bulk, direction, precision=3):
# If we end up here, all layers removed before we found a match. Raise error
raise RuntimeError("Could not find a valid periodic kink cell.")

def build_kink_quadrupole(self, z_reps=2, layer_decimal_precision=3, invert_direction=False, smooth_width=None,
def build_kink_quadrupole(self, z_reps=2, layer_decimal_precision=3, n_kink=1, invert_direction=False, smooth_width=None,
*args, **kwargs):
'''
Construct a quadrupole structure providing an initial guess of the dislocation kink
Expand Down Expand Up @@ -4088,7 +4088,7 @@ def build_kink_quadrupole(self, z_reps=2, layer_decimal_precision=3, invert_dire
kink_struct2.wrap()

# Cell won't always be periodic, make sure we end up with something that is
mask, cell = self._get_kink_quad_mask(bulk, direction, layer_decimal_precision)
mask, cell = self._get_kink_quad_mask(bulk, direction * n_kink, layer_decimal_precision)
bulk = bulk[mask]
bulk.set_cell(cell, scale_atoms=False)

Expand Down

0 comments on commit d06a5e7

Please sign in to comment.