def template_cvs_adc2_h2o(self, basis):
     results = {}
     for b in backends:
         scfres = cached_backend_hf(b, "h2o", basis, conv_tol=1e-10)
         results[b] = adcc.cvs_adc2(scfres,
                                    n_singlets=5,
                                    core_orbitals=1,
                                    conv_tol=1e-9)
     compare_adc_results(results, 5e-8)
Beispiel #2
0
mol = gto.M(
    atom="""
        O 0 0 0
        H 0 0 1.795239827225189
        H 1.693194615993441 0 -0.599043184453037
    """,
    basis='cc-pcvtz',
    unit="Bohr"
)
scfres = scf.RHF(mol)
scfres.conv_tol = 1e-12
scfres.conv_tol_grad = 1e-9
scfres.kernel()

# Run CVS-ADC(2) and relax to ADC(2) for O-edge
state = adcc.cvs_adc2(scfres, conv_tol=1e-8, core_orbitals=1, n_singlets=10)
state_relaxed = relax_cvs(scfres, "adc2", state)

# Print results
print()
print(state.describe())
print()
print()
print(state_relaxed.describe())
print()

state.plot_spectrum(label="CVS-ADC(2)")
state_relaxed.plot_spectrum(label="General ADC(2)")
print("Residual norms: ", state_relaxed.residual_norms)

plt.legend()
Beispiel #3
0
#!/usr/bin/env python3
## vi: tabstop=4 shiftwidth=4 softtabstop=4 expandtab
import adcc

from import_data import import_data

# Gather preliminary data
data = import_data()

# Run an cvs-adc2 calculation:
singlets = adcc.cvs_adc2(data, n_core_orbitals=1, n_singlets=1, conv_tol=1e-8)
triplets = adcc.cvs_adc2(singlets.matrix, n_triplets=2, conv_tol=1e-8)
# Note: Above n_core_orbitals is not required again, since the precise CVS
#       splitting is already encoded in the matrix.

print(singlets.describe())
print(triplets.describe())
Beispiel #4
0
import adcc

mol = psi4.geometry("""
    O 0 0 0
    H 0 0 1.795239827225189
    H 1.693194615993441 0 -0.599043184453037
    symmetry c1
    units au
    """)

# set the number of cores equal to the auto-determined value from
# the adcc ThreadPool
psi4.set_num_threads(adcc.thread_pool.n_cores)
psi4.core.be_quiet()
psi4.set_options({
    'basis': "cc-pvdz",
    'scf_type': 'pk',
    'e_convergence': 1e-12,
    'd_convergence': 1e-8
})
scf_e, wfn = psi4.energy('SCF', return_wfn=True)

# Run an adc2 calculation:
state = adcc.cvs_adc2(wfn, n_singlets=5, n_core_orbitals=1)

print(state.describe())

state.plot_spectrum()
plt.savefig("psi4_ccpvdz_cvs_adc2_spectrum.pdf")