From db4d80e95fbfe66a307cfbe3a1c891edbbd49704 Mon Sep 17 00:00:00 2001 From: "S. Alexis Paz" Date: Tue, 12 Nov 2024 16:25:50 -0300 Subject: [PATCH] Typo on ldx_of_cellndx The bug will raise an index out of range error if the box size differs along the x and y axes. --- HTPolyNet/linkcell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTPolyNet/linkcell.py b/HTPolyNet/linkcell.py index 65076f7b..623b83e3 100644 --- a/HTPolyNet/linkcell.py +++ b/HTPolyNet/linkcell.py @@ -131,7 +131,7 @@ def ldx_of_cellndx(self,C): :rtype: int """ nc=self.ncells - xc=C[0]*nc[1]*nc[2]+C[1]*nc[1]+C[2] + xc=C[0]*nc[1]*nc[2]+C[1]*nc[2]+C[2] return xc def cellndx_of_ldx(self,i):