def test_cubic_interpolation_x_tpss_cs(): fn_fchk = context.get_fn('test/water_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap() kin = mol.obasis.compute_kinetic() na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers) terms = [ RGridGroup(mol.obasis, grid, [RLibXCMGGA('x_tpss')]), ] ham = REffHam(terms) check_interpolation(ham, olp, kin, na, [mol.orb_alpha])
def test_cubic_interpolation_x_tpss_os(): # mixing of LDA and GGA fn_fchk = context.get_fn('test/h3_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap(mol.lf) kin = mol.obasis.compute_kinetic(mol.lf) na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, mol.lf) terms = [ UGridGroup(mol.obasis, grid, [ULibXCMGGA('x_tpss')]), ] ham = UEffHam(terms) check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha, mol.exp_beta])
def test_cubic_interpolation_c_pbe_os(): fn_fchk = context.get_fn('test/h3_pbe_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap() kin = mol.obasis.compute_kinetic() na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers) terms = [ UGridGroup(mol.obasis, grid, [ ULibXCGGA('c_pbe'), ]), ] ham = UEffHam(terms) check_interpolation(ham, olp, kin, na, [mol.orb_alpha, mol.orb_beta])
def test_cubic_interpolation_hfs_cs(): fn_fchk = context.get_fn('test/co_pbe_sto3g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap(mol.lf) kin = mol.obasis.compute_kinetic(mol.lf) na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, mol.lf) er = mol.obasis.compute_electron_repulsion(mol.lf) terms = [ RGridGroup(mol.obasis, grid, [ RLibXCLDA('x'), ]), ] ham = REffHam(terms) check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha])
def test_cubic_interpolation_o3lyp_os(): fn_fchk = context.get_fn('test/h3_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap(mol.lf) kin = mol.obasis.compute_kinetic(mol.lf) na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, mol.lf) er = mol.obasis.compute_electron_repulsion(mol.lf) libxc_term = ULibXCHybridGGA('xc_o3lyp') terms = [ UGridGroup(mol.obasis, grid, [libxc_term]), UExchangeTerm(er, 'x_hf', libxc_term.get_exx_fraction()), ] ham = UEffHam(terms) check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha, mol.exp_beta])
def test_cubic_interpolation_o3lyp_os(): fn_fchk = context.get_fn('test/h3_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap() kin = mol.obasis.compute_kinetic() na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers) er = mol.obasis.compute_electron_repulsion() libxc_term = ULibXCHybridGGA('xc_o3lyp') terms = [ UGridGroup(mol.obasis, grid, [libxc_term]), UExchangeTerm(er, 'x_hf', libxc_term.get_exx_fraction()), ] ham = UEffHam(terms) check_interpolation(ham, olp, kin, na, [mol.orb_alpha, mol.orb_beta])
def test_cubic_interpolation_x_pbe_c_vwn_cs(): # mixing of GGA and LDA fn_fchk = context.get_fn('test/water_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap(mol.lf) kin = mol.obasis.compute_kinetic(mol.lf) na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, mol.lf) terms = [ RGridGroup(mol.obasis, grid, [ RLibXCGGA('x_pbe'), RLibXCLDA('c_vwn'), ]), ] ham = REffHam(terms) check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha])
def test_cubic_interpolation_hfs_cs(): fn_fchk = context.get_fn('test/water_hfs_321g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False) olp = mol.obasis.compute_overlap(mol.lf) kin = mol.obasis.compute_kinetic(mol.lf) na = mol.obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, mol.lf) er = mol.obasis.compute_electron_repulsion(mol.lf) terms = [ RTwoIndexTerm(kin, 'kin'), RDirectTerm(er, 'hartree'), RGridGroup(mol.obasis, grid, [ RDiracExchange(), ]), RTwoIndexTerm(na, 'ne'), ] ham = REffHam(terms) check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha])
def test_cubic_interpolation_x_pbe_cs(): mol, olp, kin, na, ham = setup_gga_cs('x_pbe') check_interpolation(ham, olp, kin, na, [mol.orb_alpha])
def test_cubic_interpolation_hfs_os(): mol, olp, kin, na, ham = setup_hfs_os() check_interpolation(ham, olp, kin, na, [mol.orb_alpha, mol.orb_beta])
def test_cubic_interpolation_o3lyp_cs(): mol, olp, kin, na, ham = setup_o3lyp_cs() check_interpolation(ham, olp, kin, na, [mol.orb_alpha])
def test_cubic_interpolation_c_pbe_cs(): mol, olp, kin, na, ham = setup_gga_cs('c_pbe') check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha])
def test_cubic_interpolation_hfs_cs(): mol, olp, kin, na, ham = setup_hfs_cs() check_interpolation(ham, mol.lf, olp, kin, na, [mol.exp_alpha])