mirror of
https://github.com/QuantumPackage/qp2.git
synced 2025-04-27 10:44:43 +02:00
starting separate function with dummy atom
This commit is contained in:
parent
7ce27f6ce8
commit
618df9eed5
@ -9,6 +9,7 @@ Options:
|
|||||||
-o --output=EZFIO_DIR Produced directory
|
-o --output=EZFIO_DIR Produced directory
|
||||||
by default is FILE.ezfio
|
by default is FILE.ezfio
|
||||||
--noqmc don't include basis, cell, etc. for QMCPACK
|
--noqmc don't include basis, cell, etc. for QMCPACK
|
||||||
|
-cd h5 contains cholesky decomposition informatin, these h5 result from RMG and the pyscf AFQMC converter of QMCPACK.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from ezfio import ezfio
|
from ezfio import ezfio
|
||||||
@ -138,6 +139,17 @@ def convert_mol(filename,qph5path):
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def convert_kpts_cd(filename,qph5path,qmcpack=True):
|
||||||
|
|
||||||
|
ezfio.set_file(filename)
|
||||||
|
ezfio.set_nuclei_is_complex(True)
|
||||||
|
# Dummy atom since AFQMC h5 has no atom information
|
||||||
|
nucl_num = 1
|
||||||
|
ezfio.set_nuclei_nucl_num(nucl_num)
|
||||||
|
ezfio.set_nuclei_nucl_charge([0.]*nucl_num)
|
||||||
|
ezfio.set_nuclei_nucl_coord( [ [0.], [0.], [0.] ]*nucl_num )
|
||||||
|
ezfio.set_nuclei_nucl_label( ['He'] * nucl_num )
|
||||||
|
|
||||||
def convert_kpts(filename,qph5path,qmcpack=True):
|
def convert_kpts(filename,qph5path,qmcpack=True):
|
||||||
ezfio.set_file(filename)
|
ezfio.set_file(filename)
|
||||||
ezfio.set_nuclei_is_complex(True)
|
ezfio.set_nuclei_is_complex(True)
|
||||||
@ -640,10 +652,16 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
if ARGUMENTS["--noqmc"]:
|
if ARGUMENTS["--noqmc"]:
|
||||||
qmcpack = False
|
qmcpack = False
|
||||||
|
if ARGUMENTS["--rmg"]:
|
||||||
|
rmg = True
|
||||||
with h5py.File(FILE,'r') as qph5:
|
with h5py.File(FILE,'r') as qph5:
|
||||||
do_kpts = ('kconserv' in qph5['nuclei'].keys())
|
do_kpts = ('kconserv' in qph5['nuclei'].keys())
|
||||||
if (do_kpts):
|
if (do_kpts):
|
||||||
print("converting HDF5 to EZFIO for periodic system")
|
print("converting HDF5 to EZFIO for periodic system")
|
||||||
|
if cd:
|
||||||
|
print("Using RMG and AFQMC h5")
|
||||||
|
convert_kpts_cd(EZFIO_FILE,FILE,qmcpack)
|
||||||
|
else:
|
||||||
convert_kpts(EZFIO_FILE,FILE,qmcpack)
|
convert_kpts(EZFIO_FILE,FILE,qmcpack)
|
||||||
else:
|
else:
|
||||||
print("converting HDF5 to EZFIO for molecular system")
|
print("converting HDF5 to EZFIO for molecular system")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user