10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01: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 committed by Kevin Gasperich
parent d98bda5b11
commit db366cc4ed

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])),