You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The supercell indices that within_inf returns are for the atoms translated to the unit cell, is this intended?
Code to reproduce problem
importnumpyasnp# Create a geometry with an atom outside of the unit cellgeometry=sisl.Geometry([-0.5, 0, 0], lattice=np.diag([2, 10, 10]))
# Search for atomssearch=sisl.Lattice(np.diag([3, 10, 10]))
ia, xyz, isc=geometry.within_inf(search, periodic=[True, True, True])
print("ia", ia)
print("xyz", xyz)
print("isc", isc)
ia [0]
xyz [[1.5 0. 0. ]]
isc [[0 0 0]]
As you can see, it says that the image of atom 0 on sc (0,0,0) is inside the search lattice, which is a lie. The supercell index should be (1, 0, 0), unless the function specifies that it will first translate atoms to the unit cell.
I understand even less the output if I change the search to [2, 10, 10]:
Describe the bug
The supercell indices that
within_inf
returns are for the atoms translated to the unit cell, is this intended?Code to reproduce problem
As you can see, it says that the image of atom 0 on sc
(0,0,0)
is inside the search lattice, which is a lie. The supercell index should be(1, 0, 0)
, unless the function specifies that it will first translate atoms to the unit cell.I understand even less the output if I change the search to
[2, 10, 10]
:It says there are no atoms in the search lattice, this is clearly wrong, isn't it? Regardless of whether the first one is intended.
The text was updated successfully, but these errors were encountered: