9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

Minor fix in trexio import

This commit is contained in:
Anthony Scemama 2023-08-25 09:37:05 +02:00
parent f9fdd1effd
commit bb80a3c2a2

View File

@ -459,8 +459,9 @@ def write_ezfio(trexio_filename, filename):
beta = [ i for i in range(num_beta) ] beta = [ i for i in range(num_beta) ]
if trexio.has_mo_spin(trexio_file): if trexio.has_mo_spin(trexio_file):
spin = trexio.read_mo_spin(trexio_file) spin = trexio.read_mo_spin(trexio_file)
beta = [ i for i in range(mo_num) if spin[i] == 1 ] if max(spin) == 1:
beta = [ beta[i] for i in range(num_beta) ] beta = [ i for i in range(mo_num) if spin[i] == 1 ]
beta = [ beta[i] for i in range(num_beta) ]
alpha = qp_bitmasks.BitMask(alpha) alpha = qp_bitmasks.BitMask(alpha)
beta = qp_bitmasks.BitMask(beta ) beta = qp_bitmasks.BitMask(beta )