#! 6-31G** UHF CH2 3B1 optimization.  Uses a Z-Matrix with dummy atoms, just for demo and testing purposes.

memory 250 mb

nucenergy = 6.197322440574482    # TEST
refenergy = -38.925486977153     # TEST

molecule ch2 {
0 3
c
x 1 1.0
h 1 b1 2 a1
h 1 b1 2 a1 3 180.0

b1 = 1.0
a1 = 60.0
}

set globals {
  reference uhf
  basis 6-31G**
  docc [2, 0, 0, 1]
  socc [1, 0, 1, 0]
}

thisenergy = optimize('scf')
  
compare_values(nucenergy, ch2.nuclear_repulsion_energy(), 3, "Nuclear repulsion energy") # TEST
compare_values(refenergy, thisenergy, 3, "Reference energy") # TEST
