mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-01-09 11:43:55 +01:00
account for kmesh==None or [] in pyscf pbc converter
This commit is contained in:
parent
d98bda5b11
commit
db366cc4ed
@ -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])),
|
||||||
|
Loading…
Reference in New Issue
Block a user