10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-19 04:22:32 +01:00

Added flag for small/large core

This commit is contained in:
Anthony Scemama 2019-05-15 15:46:23 +02:00
parent 122650e6d9
commit 81a3997853

View File

@ -13,10 +13,11 @@ zero.
Usage: Usage:
qp_set_frozen_core [-q|--query] EZFIO_DIR qp_set_frozen_core [-q|--query] [-l|--large] EZFIO_DIR
Options: Options:
-q --query Prints in the standard output the number of frozen MOs -q --query Prints in the standard output the number of frozen MOs
-l --large Use a large core
""" """
@ -46,7 +47,34 @@ def main(arguments):
except: except:
do_pseudo = False do_pseudo = False
large = 0
small = 1
size = small
if arguments["--large"]:
size = large
if not do_pseudo: if not do_pseudo:
if size == large:
for charge in ezfio.nuclei_nucl_charge:
if charge <= 2:
pass
elif charge <= 10:
n_frozen += 1
elif charge <= 18:
n_frozen += 5
elif charge <= 36:
n_frozen += 9
elif charge <= 54:
n_frozen += 18
elif charge <= 86:
n_frozen += 27
elif charge <= 118:
n_frozen += 43
if size == small:
for charge in ezfio.nuclei_nucl_charge: for charge in ezfio.nuclei_nucl_charge:
if charge < 5: if charge < 5:
pass pass
@ -54,8 +82,12 @@ def main(arguments):
n_frozen += 1 n_frozen += 1
elif charge < 31: elif charge < 31:
n_frozen += 5 n_frozen += 5
else: elif charge < 49:
n_frozen += 9 n_frozen += 9
elif charge < 81:
n_frozen += 18
elif charge < 113:
n_frozen += 27
mo_num = ezfio.mo_basis_mo_num mo_num = ezfio.mo_basis_mo_num
@ -65,10 +97,10 @@ def main(arguments):
if n_frozen == 0: if n_frozen == 0:
os.system("""qp_set_mo_class -a "[1-%d]" %s""" % os.system("""qp_set_mo_class -a "[1-%d]" %s""" %
(mo_num, sys.argv[1])) (mo_num, filename))
else: else:
os.system("""qp_set_mo_class -c "[1-%d]" -a "[%d-%d]" %s""" % os.system("""qp_set_mo_class -c "[1-%d]" -a "[%d-%d]" %s""" %
(n_frozen, n_frozen+1, mo_num, sys.argv[1])) (n_frozen, n_frozen+1, mo_num, filename))