def test_VCI4(inpdata): if inpdata is None: return 'VCI quadruples' VSCF = vib.VSCF2D(inpdata.v1, inpdata.v2) VSCF.solve_singles() VCI = vib.VCI(VSCF.get_groundstate_wfn(), inpdata.v1, inpdata.v2) VCI.generate_states(4) VCI.solve() d = np.abs(VCI.energies - inpdata.vci4).mean() return d < 1
def test_VCI4_int(inpdata): if inpdata is None: return 'VCI quadruples intensities' VSCF = vib.VSCF2D(inpdata.v1, inpdata.v2) VSCF.solve_singles() VCI = vib.VCI(VSCF.get_groundstate_wfn(), inpdata.v1, inpdata.v2) VCI.generate_states(4) VCI.solve() VCI.calculate_intensities(inpdata.dm1, inpdata.dm2) d = np.abs(VCI.intensities - inpdata.vci4_int).mean() return d < 1
def test_VSCF_singles(inpdata): if inpdata is None: return 'VSCF gs + singles' VSCF = vib.VSCF2D(inpdata.v1, inpdata.v2) VSCF.solve_singles() # diffrerence between the reference VSCF energies (ground state and singles) # and currect energies d = np.abs(np.array(VSCF.energies) - inpdata.vscf_singles_energies).mean() # test passed if the mean absolute error is below 1cm-1 return d < 1
# Read in anharmonic 1-mode dipole moments dm1 = vib.Dipole(grid) dm1.read_np(os.path.join('potentials', 'Dm1_g16.npy')) # Read in anharmonic 2-mode potentials v2 = vib.Potential(grid, order=2) v2.read_np(os.path.join('potentials', 'V2_g16.npy')) # Read in anharmonic 2-mode dipole moments dm2 = vib.Dipole(grid, order=2) dm2.read_np(os.path.join('potentials', 'Dm2_g16.npy')) # Run VSCF calculations for these potentials # Here we solve only for the vibrational ground state VSCF = vib.VSCF2D(v1, v2) VSCF.solve() # Now run VCI calculations using the VSCF wavefunction VCI = vib.VCI(VSCF.get_groundstate_wfn(), v1, v2) VCI.generate_states_nmax(4, 4) # VCI-3 VCI.solve() VCI.calculate_IR(dm1, dm2) # calculate intensities VCI.print_results(maxfreq=10000, which=3) VCI.print_contributions(maxfreq=10000, which=2)