when the kpts are converted to fractional coordinates in pbc.enforce_pbc, if the fractions are 1 - 1e-16, they don't mod back to zero. Instead of calling enforce_pbc, run it in create_supercell_twists and round the fractions to tol.
The other change to the orbital object kpts shape helps with consistency.
when the kpts are converted to fractional coordinates in pbc.enforce_pbc, if the fractions are
1 - 1e-16
, they don't mod back to zero. Instead of calling enforce_pbc, run it in create_supercell_twists and round the fractions totol
.The other change to the orbital object kpts shape helps with consistency.