From ff26850437023bb998b00495909a41bfb8a6d668 Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Wed, 20 Nov 2024 13:18:02 -0500 Subject: [PATCH] =?UTF-8?q?Round=20min=20image=20distance=20to=20avoid=20t?= =?UTF-8?q?iny=20mismatches=20causing=20breaks=20(e.g.=209.9995=20being=20?= =?UTF-8?q?flagged=20as=20less=20than=2010=20=E2=84=AB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doped/generation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doped/generation.py b/doped/generation.py index 01a691df..e99af887 100644 --- a/doped/generation.py +++ b/doped/generation.py @@ -1423,7 +1423,9 @@ def __init__( if not generate_supercell: # re-order bulk supercell to match that of input supercell self.bulk_supercell = reorder_s1_like_s2(self.bulk_supercell, self.structure) - self.min_image_distance = supercells.get_min_image_distance(self.bulk_supercell) + # get and round (to avoid tiny mismatches, due to rounding in search functions, + # flagging issues) min image distance of supercell: + self.min_image_distance = np.round(supercells.get_min_image_distance(self.bulk_supercell), 3) # check that generated supercell is greater than ``min_image_distance``` Å in each direction: if self.min_image_distance < specified_min_image_distance and self.generate_supercell: