Skip to content

Commit a8ff92d

Browse files
committed
check_ICOHPs skips those in same unit cell and uses int translations (TODO move translation in all LOBSTER classes to int instead of float)
1 parent ec4e663 commit a8ff92d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pymatgen/io/lobster/lobsterenv.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,11 @@ def check_ICOHPs(lengths_from_ICOHPs, selected_ICOHPs, translation, length_thres
15851585
if (
15861586
abs(lengths_from_ICOHPs[i] - lengths_from_ICOHPs[j]) < length_threshold
15871587
and abs(selected_ICOHPs[i] - selected_ICOHPs[j]) > energy_threshold
1588+
and [int(idx) for idx in translation[i]] != [0.0, 0.0, 0.0]
15881589
and (
1589-
translation[i][0] == -translation[j][0]
1590-
and translation[i][1] == -translation[j][1]
1591-
and translation[i][2] == -translation[j][2]
1590+
int(translation[i][0]) == -int(translation[j][0])
1591+
and int(translation[i][1]) == -int(translation[j][1])
1592+
and int(translation[i][2]) == -int(translation[j][2])
15921593
)
15931594
):
15941595
warnings.warn(

0 commit comments

Comments
 (0)