10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-09-13 14:28:30 +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 committed by Kevin Gasperich
parent d98bda5b11
commit db366cc4ed

View File

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