# Test: OpenMP parallelization import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> openmp/CO-C2v/R') sym = 'C2v' nthreads = [1, 2, 4, 8] for nth in nthreads: dirac_inp = "TRA.inp" dirac_mol = "CO-C2v.mol" execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") execute("mv MRCONEE MRCONEE-" + sym) execute("mv MDCINT MDCINT-" + sym) t1_scf = Filter("Total SCF energy = ", -112.820480227130517, 1e-7) t1_mp2c = Filter("MP2 correlation energy = ", -0.290892396007590, 1e-7) t1_mp2 = Filter("Total MP2 energy = ", -113.111372623138109, 1e-7) t1_ccsd = Filter("CCSD correlation energy = ", -0.298117912056231, 1e-7) Test('%s - %d threads' % (sym, nth), "input-%s-%s" % (sym, str(nth)), filters=[t1_scf, t1_mp2, t1_mp2c, t1_ccsd]).run() execute("rm -rf MRCONEE* MDCINT*") execute("rm -rf HINT VINT*")
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> CO molecule exc energies (1h1p) with imaginary shifts') # all symmetries to be tested symmetries = ['C1', 'Cs', 'C2', 'C2v', 'Cinfv'] for sym in symmetries: dirac_inp = "TRA.inp" dirac_mol = "CO-%s.mol" % (sym) execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") t1_scf = Filter("Total SCF energy = ", -112.820480227130517, 1e-7) t1_mp2c = Filter("MP2 correlation energy = ", -0.290892396007590, 1e-7) t1_mp2 = Filter("Total MP2 energy = ", -113.111372623138109, 1e-7) t1_mp2 = Filter("CCSD correlation energy = ", -0.298117912056231, 1e-7) ee2 = Filter("@ 2", 0.2338425936, 1e-7) ee3 = Filter("@ 3", 0.2338427622, 1e-7) ee4 = Filter("@ 4", 0.2340738270, 1e-7) ee5 = Filter("@ 5", 0.2343060898, 1e-7) ee6 = Filter("@ 6", 0.3074679705, 1e-7) ee7 = Filter("@ 7", 0.3074718331, 1e-7) ee60= Filter("@ 60", 1.0037554050, 1e-7) ee61= Filter("@ 61", 1.0829364322, 1e-7) ee62= Filter("@ 62", 1.0829364663, 1e-7)
sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute print '>>> sector(0,1)/Hg+/SOREP' # all symmetries to be tested symmetries = ['C1', 'C2', 'Cs', 'C2v', 'Ci', 'C2h', 'D2', 'D2h'] for sym in symmetries: if sym == 'C1' or sym == 'C2' or sym == 'Cs' or sym == 'C2v' or sym == 'D2': dirac_inp = "TRA.inp" else: dirac_inp = 'TRAi.inp' dirac_mol = "Hg-%s.mol" % (sym) execute("pam --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") execute("mv MRCONEE MRCONEE-" + sym) execute("mv MDCINT MDCINT-" + sym) t1_scf = Filter("Total SCF energy = ", -152.230646138773693, 1e-7) t1_mp2c = Filter("MP2 correlation energy = ", -0.148339079147, 1e-7) t1_mp2 = Filter("Total MP2 energy = ", -152.378985217920, 1e-7) t1_ccsd = Filter("CCSD correlation energy = ", -0.153561572006815, 1e-7) t1_e1 = Filter("@ 1", -0.6518859983, 1e-7) t1_e2 = Filter("@ 2", -0.4268435202, 1e-7) t1_e3 = Filter("@ 3", -0.3884627843, 1e-7) Test(sym, "input-%s" % (sym), filters=[t1_scf, t1_mp2, t1_mp2c, t1_ccsd, t1_e1, t1_e2, t1_e3]).run() execute("rm -rf MRCONEE* MDCINT*") execute("rm -rf HINT VINT* modelvectors* HEFF")
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> sector(1h1p)/N2/nonrel') # all symmetries to be tested symmetries = ['C1', 'Cs', 'Cinfv', 'Dinfh'] for sym in symmetries: dirac_inp = 'TRA.inp' dirac_mol = "N2-%s.mol" % (sym) execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT MDPROP\"") t1_e2 = Filter("@ 2", 0.2847991452, 1e-7) t1_e3 = Filter("@ 3", 0.2970409016, 1e-7) t1_e4 = Filter("@ 4", 0.3352715553, 1e-7) t1_e5 = Filter("@ 5", 0.3457793799, 1e-7) t1_e6 = Filter("@ 6", 0.3714861226, 1e-7) t1_e7 = Filter("@ 7", 0.3790725681, 1e-7) t1_e8 = Filter("@ 8", 0.3966063834, 1e-7) t1_e9 = Filter("@ 9", 0.4202318050, 1e-7) t1_e10 = Filter("@ 10", 0.5148711303, 1e-7) t1_e11 = Filter("@ 11", 0.6227912851, 1e-7) Test(sym, "input", filters=[t1_e2,t1_e3,t1_e4,t1_e5,t1_e6,t1_e7,t1_e8,t1_e9,t1_e10,t1_e11]).run(options="--no-clean") execute("mv input-1h1p.test.out expt_N2_%s_1h1p.out" % (sym)) execute("rm -rf MRCONEE* MDCINT* MDPROP*") execute("rm -rf scratch") execute("rm -rf HINT VINT* modelvectors* HEFF")
sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH #======================================================================= # non-relativistic #======================================================================= print('>>> sector(1,1)/LiF/nonrel') # all symmetries to be tested symmetries = ['C1', 'Cinfv'] for sym in symmetries: dirac_inp = 'TRA_NR.inp' dirac_mol = "LiF-%s.mol" % (sym) execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT MDPROP\"") execute("expt.x --no-clean input-0h0p > expt_LiF_%s_NR_0h0p.out" % (sym)) t1_scf = Filter("Total SCF energy = ", -106.964946434870, 1e-7) t1_cc_tot = Filter("Total CCSD energy = ", -107.194656109696, 1e-7) t1_ccsd = Filter("CCSD correlation energy = ", -0.229709674826, 1e-7) t1_e2 = Filter("@ 2", 0.2298230870, 1e-7) t1_e3 = Filter("@ 3", 0.2299751759, 1e-7) t1_e4 = Filter("@ 4", 0.2448229001, 1e-7) t1_e5 = Filter("@ 5", 0.2463911062, 1e-7) Test(sym, "input-1h1p", filters=[t1_scf, t1_cc_tot, t1_ccsd, t1_e2, t1_e3, t1_e4, t1_e5]).run(options="--no-clean") execute("mv input-1h1p.test.out expt_LiF_%s_NR_1h1p.out" % (sym)) execute("mv scratch/HEFF HEFF_NR_%s" % (sym)) execute("rm -rf MRCONEE* MDCINT* MDPROP*")
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> efield/LiNa/relativistic(4c-DC)') symmetries = ['C1', 'C2', 'Cs', 'C2v'] for sym in symmetries: dirac_scf = "scf.inp" dirac_tra = "TRA.inp" dirac_mol = "LiNa-%s.mol" % (sym) execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_scf + " --mol=" + dirac_mol + " --outcmo") execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_tra + " --mol=" + dirac_mol + " --incmo --get=\"MRCONEE MDCINT\"") execute("mv MRCONEE MRCONEE-%s" % (sym)) execute("mv MDCINT MDCINT-%s" % (sym)) t1_scf = Filter("SCF reference energy = ", -169.073977054460, 1e-8) t1_mp2c = Filter("MP2 correlation energy = ", -0.039137634196386, 1e-8) t1_mp2 = Filter("Total MP2 energy = ", -169.113114688656, 1e-8) t1_ccsd = Filter("CCSD correlation energy = ", -0.058503275496498, 1e-8) Test("%s" % (sym), "input-%s" % (sym), filters=[t1_scf, t1_mp2, t1_mp2c, t1_ccsd]).run() execute("rm -rf MRCONEE* MDCINT* DFCOEF") execute("rm -rf HINT VINT*")
#!/usr/bin/env python # Test: H2O+ ion / cc-pVTZ / non-relativistic Hamiltonian / sector (1h,0p) # FSCC scheme: H2O -> H2O+ import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> sector(1,0)/H2O->H2O+/cc-pVTZ/nonrel') dirac_mol = "H2O-C2v.mol" dirac_inp = "TRA.inp" execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") t1_scf = Filter("Total SCF energy = ", -76.057114619775, 1e-7) t1_mp2c = Filter("MP2 correlation energy = ", -0.275116992297, 1e-7) t1_mp2 = Filter("Total MP2 energy = ", -76.332231612072, 1e-7) t1_ccsd = Filter("CCSD correlation energy = ", -0.280866129199, 1e-7) t1_e1 = Filter("@ 1", 0.4557505780, 1e-7) t1_e2 = Filter("@ 2", 0.5376795920, 1e-7) t1_e3 = Filter("@ 3", 0.6919460871, 1e-7) t1_e4 = Filter("@ 4", 1.2211489399, 1e-7) Test("H2O -> H2O+", "input", filters=[t1_scf, t1_mp2, t1_mp2c, t1_ccsd, t1_e1, t1_e2, t1_e3, t1_e4]).run() execute("rm -rf MRCONEE MDCINT") execute("rm -rf HINT VINT* modelvectors* HEFF")
# Test: N2 molecule / cc-pVDZ / non-relativistic Hamiltonian / FS-CCSDT(1h1p) # The Cinfv point group is employed. # # This test is borrowed from M. Musial, R. J. Bartlett, # J. Chem. Phys. 121, 1670 (2004); doi: 10.1063/1.1765096. # import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> ccsdt 1h1p / N2 molecule excitations / Non-rel') execute(DIRAC_PATH + " --nobackup --noarch --inp=TRA --mol=N2 --get=\"MRCONEE MDCINT MDPROP\"") t_scf = Filter("Total SCF energy = ", -108.95453941355765 , 1e-8) t_scf_ref = Filter("SCF reference energy = ", -108.954539413558, 1e-8) t_mp2 = Filter("Total MP2 energy = ", -109.259826827630, 1e-8) t_ccsdt_corr = Filter("CCSDT correlation energy = ", -0.320348289208, 1e-8) t_ccsdt = Filter("Total CCSDT energy = ", -109.274887702766, 1e-8) t_e2 = Filter("@ 2", 0.2906764563, 1e-8) t_e3 = Filter("@ 3", 0.2995912335, 1e-8) t_e4 = Filter("@ 4", 0.3382594556, 1e-8) t_e5 = Filter("@ 5", 0.3535514212, 1e-8) t_e6 = Filter("@ 6", 0.3682194407, 1e-8) t_e7 = Filter("@ 7", 0.3795176318, 1e-8) t_e8 = Filter("@ 8", 0.3940401922, 1e-8) t_e9 = Filter("@ 9", 0.4197055451, 1e-8) t_e10 = Filter("@ 10", 0.5065655757, 1e-8)
sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> ccsdt_0h2p/C/DC') # all symmetries to be tested #symmetries = ['C1', 'Cs', 'C2v', 'Cinfv'] symmetries = ['Cinfv'] for sym in symmetries: dirac_inp = "TRA.inp" dirac_mol = "C-%s.mol" % (sym) # external electric field F=0.1 is added at the integral # transformation step (see TRA.inp) execute(DIRAC_PATH + " --nobackup --noarch --inp=TRA --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT MDPROP\"") t_scf = Filter("Total SCF energy = ", -36.423980694324, 1e-8) t_scf_ref = Filter("SCF reference energy = ", -36.423980694324, 1e-8) t_mp2 = Filter("Total MP2 energy = ", -36.474422551054, 1e-8) t_ccsdt_corr = Filter("CCSDT correlation energy = ", -0.079842226731, 1e-8) t_ccsdt = Filter("Total CCSDT energy = ", -36.503822921054, 1e-8) t_e1 = Filter("@ 1", -1.3027424379, 1e-8) t_e2 = Filter("@ 2", -1.3026583880, 1e-8) t_e3 = Filter("@ 3", -1.3024915838, 1e-8) t_e4 = Filter("@ 4", -1.2536383035, 1e-8) t_e5 = Filter("@ 5", -1.2005053045, 1e-8) Test(sym, "input", filters=[t_scf,t_scf_ref,t_mp2,t_ccsdt_corr,t_ccsdt,t_e1,t_e2,t_e3,t_e4,t_e5]).run() execute("cp input.test.out input-%s.test.out" % (sym))
#!/usr/bin/env python # Test: CO / cc-pvdz / Dirac-Coulomb Hamiltonian / CCSDT-3 / ext elec field = 0.01 au import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '../../')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> ccsdt-3/CO/DC/F=0.01') # external electric field F=0.01 is added at the integral # transformation step (see TRA.inp) execute(DIRAC_PATH + " --nobackup --noarch --inp=SCF --mol=CO-Cinfv --outcmo") execute(DIRAC_PATH + " --nobackup --noarch --inp=TRA --mol=CO-Cinfv --incmo --get=\"MRCONEE MDCINT\"") t_scf = Filter("Total SCF energy = ", -112.820480227131, 1e-8) t_scf_ref = Filter("SCF reference energy = ", -112.819539718659, 1e-8) t_mp2 = Filter("Total MP2 energy = ", -113.112174768284, 1e-8) t_ccsdt3_corr = Filter("CCSDT-3 correlation energy = ", -0.311325279213, 1e-8) t_ccsdt3 = Filter("Total CCSDT-3 energy = ", -113.130864997872, 1e-8) Test("Cinfv", "input", filters=[t_scf,t_scf_ref,t_mp2,t_ccsdt3_corr,t_ccsdt3]).run() execute("rm -rf DFCOEF MRCONEE* MDCINT* scratch") execute("rm -rf HINT VINT* modelvectors* HEFF")
#!/usr/bin/env python # Test: high-spin openshell CC calculation (sector 0h0p) import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from minitest import Test, Filter, execute, DIRAC_PATH print('>>> highspin/O2 triplet') dirac_inp = "TRA.inp" dirac_mol = "O2.mol" execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") t1_scf_read = Filter("Total SCF energy = ", -149.686661451845, 1e-7) t1_scf_recalc = Filter("SCF reference energy = ", -149.718144633814, 1e-7) t1_mp2_corr = Filter("MP2 correlation energy = ", -0.383061310628, 1e-7) t1_mp2_total = Filter("Total MP2 energy = ", -150.101205944442, 1e-7) t1_ccsd_corr = Filter("CCSD correlation energy = ", -0.366958682628, 1e-7) t1_ccsd_total = Filter("Total CCSD energy = ", -150.085103316442, 1e-7) Test('O2 high spin CCSD (triplet)', "input", filters=[t1_scf_read,t1_mp2_total,t1_mp2_corr,t1_ccsd_corr,t1_ccsd_total,t1_scf_recalc]).run() # cleanup execute("rm -rf HINT VINT*") execute("rm -rf MRCONEE* MDCINT* scratch")
from minitest import Test, Filter, execute, DIRAC_PATH print('>>> sector(1,1)/Ne/nonrel') # all symmetries to be tested symmetries = [ 'C1', 'C2', 'Cs', 'C2v', 'Ci', 'C2h', 'D2', 'D2h', 'Cinfv', 'Dinfh' ] for sym in symmetries: if sym == 'C1' or sym == 'C2' or sym == 'Cs' or sym == 'C2v' or sym == 'D2' or sym == 'Cinfv': dirac_inp = "TRA.inp" else: dirac_inp = 'TRAi.inp' dirac_mol = "Ne-%s.mol" % (sym) execute(DIRAC_PATH + " --nobackup --noarch --inp=" + dirac_inp + " --mol=" + dirac_mol + " --get=\"MRCONEE MDCINT\"") t1_scf = Filter("Total SCF energy = ", -128.52777688911166, 1e-7) t1_mp2c = Filter("MP2 correlation energy = ", -0.270756916860, 1e-7) t1_mp2 = Filter("Total MP2 energy = ", -128.798533805971, 1e-7) t1_ccsd = Filter("CCSD correlation energy = ", -0.271995247737, 1e-7) t1_e1 = Filter("@ 1", 0.0000000000, 1e-7) t1_e2 = Filter("@ 2", 0.6046595005, 1e-7) t1_e3 = Filter("@ 3", 0.6107148345, 1e-7) t1_e4 = Filter("@ 4", 0.6674738228, 1e-7) t1_e5 = Filter("@ 5", 0.6770335172, 1e-7) t1_e6 = Filter("@ 6", 0.6801407839, 1e-7) t1_e7 = Filter("@ 7", 0.6815529646, 1e-7) t1_e8 = Filter("@ 8", 0.6815831430, 1e-7) t1_e9 = Filter("@ 9", 0.6938805723, 1e-7) Test(sym, "input",