mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-03 18:16:12 +01:00
Add doc and global varialbe in unit_test
This commit is contained in:
parent
aa7bfdc46d
commit
125e7d4c8f
@ -25,6 +25,12 @@ precision = 1.e-8
|
|||||||
# More ezfio condition you set, beter it is
|
# More ezfio condition you set, beter it is
|
||||||
|
|
||||||
|
|
||||||
|
# You cannot order the test flow.
|
||||||
|
# So if you dont whant to remarque on test (for example the HF), set
|
||||||
|
# a global variable and check for it
|
||||||
|
global has_hf_alredy
|
||||||
|
has_hf_alredy = False
|
||||||
|
|
||||||
def init_folder(geo, basis, mult=1):
|
def init_folder(geo, basis, mult=1):
|
||||||
'''
|
'''
|
||||||
Take a geo in arg (aka a existing geo.xyz in test/)
|
Take a geo in arg (aka a existing geo.xyz in test/)
|
||||||
@ -50,8 +56,9 @@ def run_hf(geo, basis):
|
|||||||
"""
|
"""
|
||||||
Run a simle by default hf
|
Run a simle by default hf
|
||||||
EZFIO path = geo.ezfio
|
EZFIO path = geo.ezfio
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
global has_hf_alredy
|
||||||
|
has_hf_alredy = True
|
||||||
|
|
||||||
ref_energy = defaultdict(dict)
|
ref_energy = defaultdict(dict)
|
||||||
|
|
||||||
@ -111,8 +118,9 @@ def run_full_ci_10k_pt2_end(geo, basis):
|
|||||||
|
|
||||||
|
|
||||||
def run_big_test(geo, basis):
|
def run_big_test(geo, basis):
|
||||||
|
if not has_hf_alredy:
|
||||||
|
run_hf(geo, basis)
|
||||||
|
|
||||||
run_hf(geo, basis)
|
|
||||||
run_full_ci_10k_pt2_end(geo, basis)
|
run_full_ci_10k_pt2_end(geo, basis)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user