mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-19 04:22:32 +01:00
adding mo 2e ints
This commit is contained in:
parent
4893703e9c
commit
e63c95c9ed
@ -248,7 +248,6 @@ def convert_kpts_cd(filename,qph5path,qmcpack=True):
|
||||
|
||||
# should this be in ao_basis? ao_two_e_ints?
|
||||
with h5py.File(qph5path,'r') as qph5:
|
||||
qph5[]
|
||||
nchol_per_kpt = qph5['Hamiltonian']['NCholPerKP'][:]
|
||||
nchol_per_kpt = nchol_per_kpt[nchol_per_kpt != 0]
|
||||
nchol_per_kpt_max = max(nchol_per_kpt)
|
||||
@ -288,7 +287,6 @@ def convert_kpts_cd(filename,qph5path,qmcpack=True):
|
||||
ezfio.set_ao_two_e_ints_io_df_ao_integrals('Read')
|
||||
"""
|
||||
else:
|
||||
ezfio.set_io_chol_mo_integrals('Read')
|
||||
"""
|
||||
ezfio.set_io_chol_mo_integrals('Read')
|
||||
df_num = qph5['ao_two_e_ints'].attrs['df_num']
|
||||
@ -297,6 +295,28 @@ def convert_kpts_cd(filename,qph5path,qmcpack=True):
|
||||
ezfio.set_mo_two_e_ints_df_mo_integrals_complex(dfmo_reim)
|
||||
ezfio.set_mo_two_e_ints_io_df_mo_integrals('Read')
|
||||
"""
|
||||
mo_num_per_kpt = ao_num//kpt_num
|
||||
ezfio.set_io_chol_mo_integrals('Read')
|
||||
#ao_chol_two_e_ints = np.zeros((2, ao_num_per_kpt, ao_num_per_kpt, nchol_per_kpt_max, kpt_num, len(nchol_per_kpt)))
|
||||
L_list = []
|
||||
for i in len(nchol_per_kpt):
|
||||
L = qph5['Hamiltonian']['KPFactorized'][f'L{i}'][:]
|
||||
L.reshape(kpt_num, mo_num_per_kpt, mo_num_per_kpt, nchol_per_kpt[i], 2)
|
||||
L = np.einsum("ijklm->ilkjm", A, B)
|
||||
L_list.append(L)
|
||||
|
||||
#(6, 5184, 2)
|
||||
"""
|
||||
for cmplx in range(2):
|
||||
for ao_idx_i in range(ao_num_per_kpt):
|
||||
for ao_idx_j in range(ao_num_per_kpt):
|
||||
for chol_idx in range(nchol_per_kpt[i]):
|
||||
for kpt_idx in range(kpt_num):
|
||||
ao_chol_two_e_ints[cmplx][ao_idx_i][ao_idx_j][chol_idx][kpt_idx][i] = L[kpt_idx][ao_idx_i][ao_idx_j][chol_idx][cmplx]
|
||||
"""
|
||||
mo_chol_two_e_ints = np.vstack(L_list)
|
||||
mo_chol_two_e_ints = mo_chol_two_e_ints.transpose()
|
||||
ezfio.set_chol_mo_integrals_complex(mo_chol_two_e_ints)
|
||||
return
|
||||
|
||||
|
||||
@ -827,4 +847,3 @@ if __name__ == '__main__':
|
||||
#
|
||||
#to be sure your MOs will be orthogonal, which is not the case when
|
||||
#the MOs are read from output files (not enough precision in output).""")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user