10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-11 22:03:55 +02:00

account for kmesh==None or [] in pyscf pbc converter

This commit is contained in:
Kevin Gasperich 2021-06-01 11:35:49 -05:00
parent f66a098eb2
commit a9a0c03732

View File

@ -133,7 +133,7 @@ def get_supcellPhase(cell, kpts=[], kmesh=[]):
from pyscf import lib
latt_vec = cell.lattice_vectors()
if len(kmesh)== 0:
if not bool(kmesh):
# Guess kmesh
scaled_k = cell.get_scaled_kpts(kpts).round(8)
kmesh = (len(np.unique(scaled_k[:,0])),