#! cc-pvdz N2 (6,6) active space Test DQG

# job description:
print('        N2 / cc-pVDZ / DQG(6,6), scf_type = DF, rNN = 1.1 A')

sys.path.insert(0, '../../..')
import v2rdm_casscf

molecule n2 {
0 1
n
n 1 r
}

set {
  basis cc-pvdz
  scf_type df
  d_convergence      1e-10
  maxiter 500
  restricted_docc [ 2, 0, 0, 0, 0, 2, 0, 0 ]
  active          [ 1, 0, 1, 1, 0, 1, 1, 1 ]
}
set v2rdm_casscf {
  positivity dqg
  r_convergence  1e-5
  e_convergence  1e-6
  maxiter 20000
}

activate(n2)

n2.r     = 1.1
refscf   = -108.95348837831371 # TEST
refv2rdm = -109.094404909477   # TEST

energy('v2rdm-casscf')

compare_values(refscf, get_variable("SCF TOTAL ENERGY"), 8, "SCF total energy") # TEST
compare_values(refv2rdm, get_variable("CURRENT ENERGY"), 5, "v2RDM-CASSCF total energy") # TEST

