pyscf.cc package

Submodules

pyscf.cc.addons module

pyscf.cc.addons.convert_to_gccsd(mycc)
pyscf.cc.addons.convert_to_uccsd(mycc)
pyscf.cc.addons.spatial2spin(tx, orbspin=None)

Convert T1/T2 of spatial orbital representation to T1/T2 of spin-orbital representation

pyscf.cc.addons.spatial2spinorb(tx, orbspin=None)

Convert T1/T2 of spatial orbital representation to T1/T2 of spin-orbital representation

pyscf.cc.addons.spin2spatial(tx, orbspin)

pyscf.cc.ccd module

Coupled cluster doubles

class pyscf.cc.ccd.CCD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

kernel(t2=None, eris=None)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

make_rdm1(t2=None, l2=None, ao_repr=False)

Un-relaxed 1-particle density matrix in MO space

make_rdm2(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

2-particle density matrix in MO space. The density matrix is stored as

dm2[p,r,q,s] = <p^+ q^+ s r>

solve_lambda(t2=None, l2=None, eris=None)
update_amps(t1, t2, eris)

pyscf.cc.ccsd module

RCCSD for real integrals 8-fold permutation symmetry has been used (ij|kl) = (ji|kl) = (kl|ij) = …

pyscf.cc.ccsd.CC

alias of pyscf.cc.ccsd.CCSD

class pyscf.cc.ccsd.CCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.lib.misc.StreamObject

restricted CCSD

Attributes:
verboseint

Print level. Default value equals to Mole.verbose

max_memoryfloat or int

Allowed memory in MB. Default value equals to Mole.max_memory

conv_tolfloat

converge threshold. Default is 1e-7.

conv_tol_normtfloat

converge threshold for norm(t1,t2). Default is 1e-5.

max_cycleint

max number of iterations. Default is 50.

diis_spaceint

DIIS space size. Default is 6.

diis_start_cycleint

The step to start DIIS. Default is 0.

iterative_dampingfloat

The self consistent damping parameter.

directbool

AO-direct CCSD. Default is False.

async_iobool

Allow for asynchronous function execution. Default is True.

incore_completebool

Avoid all I/O (also for DIIS). Default is False.

level_shiftfloat

A shift on virtual orbital energies to stablize the CCSD iteration

frozenint or list

If integer is given, the inner-most orbitals are frozen from CC amplitudes. Given the orbital indices (0-based) in a list, both occupied and virtual orbitals can be frozen in CC calculation.

>>> mol = gto.M(atom = 'H 0 0 0; F 0 0 1.1', basis = 'ccpvdz')
>>> mf = scf.RHF(mol).run()
>>> # freeze 2 core orbitals
>>> mycc = cc.CCSD(mf).set(frozen = 2).run()
>>> # freeze 2 core orbitals and 3 high lying unoccupied orbitals
>>> mycc.set(frozen = [0,1,16,17,18]).run()

Saved results

convergedbool

CCSD converged or not

e_corrfloat

CCSD correlation correction

e_totfloat

Total CCSD energy (HF + correlation)

t1, t2 :

T amplitudes t1[i,a], t2[i,j,a,b] (i,j in occ, a,b in virt)

l1, l2 :

Lambda amplitudes l1[i,a], l2[i,j,a,b] (i,j in occ, a,b in virt)

EOMEA(*args, **kwargs)
EOMEA_Ta(*args, **kwargs)

Class for EOM EACCSD(T)*(a) method by Matthews and Stanton.

EOMEE(*args, **kwargs)
EOMEESinglet(*args, **kwargs)
EOMEESpinFlip(*args, **kwargs)
EOMEETriplet(*args, **kwargs)
EOMIP(*args, **kwargs)
EOMIP_Ta(*args, **kwargs)

Class for EOM IPCCSD(T)*(a) method by Matthews and Stanton.

amplitudes_to_vector(t1, t2, out=None)
ao2mo(mo_coeff=None)
as_scanner()

Generating a scanner/solver for CCSD PES.

The returned solver is a function. This function requires one argument “mol” as input and returns total CCSD energy.

The solver will automatically use the results of last calculation as the initial guess of the new calculation. All parameters assigned in the CCSD and the underlying SCF objects (conv_tol, max_memory etc) are automatically applied in the solver.

Note scanner has side effects. It may change many underlying objects (_scf, with_df, with_x2c, …) during calculation.

Examples:

>>> from pyscf import gto, scf, cc
>>> mol = gto.M(atom='H 0 0 0; F 0 0 1')
>>> cc_scanner = cc.CCSD(scf.RHF(mol)).as_scanner()
>>> e_tot = cc_scanner(gto.M(atom='H 0 0 0; F 0 0 1.1'))
>>> e_tot = cc_scanner(gto.M(atom='H 0 0 0; F 0 0 1.5'))
async_io = True
cc2 = False
ccsd(t1=None, t2=None, eris=None)
ccsd_t(t1=None, t2=None, eris=None)
conv_tol = 1e-07
conv_tol_normt = 1e-05
density_fit(auxbasis=None, with_df=None)
diis = True
diis_file = None
diis_space = 6
diis_start_cycle = 0
diis_start_energy_diff = 1000000000.0
direct = False
dump_chk(t1_t2=None, frozen=None, mo_coeff=None, mo_occ=None)
dump_flags(verbose=None)
property e_tot
eaccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
property ecc
eeccsd(nroots=1, koopmans=False, guess=None, eris=None)
energy(t1=None, t2=None, eris=None)

CCSD correlation energy

eomea_method()
eomee_ccsd_singlet(nroots=1, koopmans=False, guess=None, eris=None)
eomee_ccsd_triplet(nroots=1, koopmans=False, guess=None, eris=None)
eomee_method()
eomip_method()
eomsf_ccsd(nroots=1, koopmans=False, guess=None, eris=None)
get_d1_diagnostic(t1=None)
get_d2_diagnostic(t2=None)
get_frozen_mask()

Get boolean mask for the restricted reference orbitals.

In the returned boolean (mask) array of frozen orbital indices, the element is False if it corresonds to the frozen orbital.

get_init_guess(eris=None)
get_nmo()
get_nocc()
get_t1_diagnostic(t1=None)
incore_complete = False
init_amps(eris=None)
ipccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
iterative_damping = 1.0
kernel(t1=None, t2=None, eris=None)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

make_rdm1(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

Un-relaxed 1-particle density matrix in MO space

make_rdm2(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

2-particle density matrix in MO space. The density matrix is stored as

dm2[p,r,q,s] = <p^+ q^+ s r>

max_cycle = 50
property nmo
property nocc
nuc_grad_method()
reset(mol=None)
restore_from_diis_(diis_file, inplace=True)

Reuse an existed DIIS object in the CCSD calculation.

The CCSD amplitudes will be restored from the DIIS object to generate t1 and t2 amplitudes. The t1/t2 amplitudes of the CCSD object will be overwritten by the generated t1 and t2 amplitudes. The amplitudes vector and error vector will be reused in the CCSD calculation.

run_diis(t1, t2, istep, normt, de, adiis)
solve_lambda(t1=None, t2=None, l1=None, l2=None, eris=None)
update_amps(t1, t2, eris)
vector_size(nmo=None, nocc=None)
vector_to_amplitudes(vec, nmo=None, nocc=None)
pyscf.cc.ccsd.RCCSD

alias of pyscf.cc.ccsd.CCSD

pyscf.cc.ccsd.amplitudes_to_vector(t1, t2, out=None)
pyscf.cc.ccsd.amplitudes_to_vector_s4(t1, t2, out=None)
pyscf.cc.ccsd.as_scanner(cc)

Generating a scanner/solver for CCSD PES.

The returned solver is a function. This function requires one argument “mol” as input and returns total CCSD energy.

The solver will automatically use the results of last calculation as the initial guess of the new calculation. All parameters assigned in the CCSD and the underlying SCF objects (conv_tol, max_memory etc) are automatically applied in the solver.

Note scanner has side effects. It may change many underlying objects (_scf, with_df, with_x2c, …) during calculation.

Examples:

>>> from pyscf import gto, scf, cc
>>> mol = gto.M(atom='H 0 0 0; F 0 0 1')
>>> cc_scanner = cc.CCSD(scf.RHF(mol)).as_scanner()
>>> e_tot = cc_scanner(gto.M(atom='H 0 0 0; F 0 0 1.1'))
>>> e_tot = cc_scanner(gto.M(atom='H 0 0 0; F 0 0 1.5'))
pyscf.cc.ccsd.energy(mycc, t1=None, t2=None, eris=None)

CCSD correlation energy

pyscf.cc.ccsd.get_d1_diagnostic(t1)

D1 diagnostic given in

Janssen, et. al Chem. Phys. Lett. 290 (1998) 423

pyscf.cc.ccsd.get_d2_diagnostic(t2)

D2 diagnostic given in

Nielsen, et. al Chem. Phys. Lett. 310 (1999) 568

Note: This is currently only defined in the literature for restricted closed-shell systems.

pyscf.cc.ccsd.get_t1_diagnostic(t1)

Returns the t1 amplitude norm, normalized by number of correlated electrons.

pyscf.cc.ccsd.kernel(mycc, eris=None, t1=None, t2=None, max_cycle=50, tol=1e-08, tolnormt=1e-06, verbose=None)
pyscf.cc.ccsd.restore_from_diis_(mycc, diis_file, inplace=True)

Reuse an existed DIIS object in the CCSD calculation.

The CCSD amplitudes will be restored from the DIIS object to generate t1 and t2 amplitudes. The t1/t2 amplitudes of the CCSD object will be overwritten by the generated t1 and t2 amplitudes. The amplitudes vector and error vector will be reused in the CCSD calculation.

pyscf.cc.ccsd.update_amps(mycc, t1, t2, eris)
pyscf.cc.ccsd.vector_to_amplitudes(vector, nmo, nocc)
pyscf.cc.ccsd.vector_to_amplitudes_s4(vector, nmo, nocc)

pyscf.cc.ccsd_lambda module

Restricted CCSD implementation for real integrals. Permutation symmetry for the 4-index integrals (ij|kl) = (ij|lk) = (ji|kl) are assumed.

Note MO integrals are treated in chemist’s notation

pyscf.cc.ccsd_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4, fintermediates=None, fupdate=None)
pyscf.cc.ccsd_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.ccsd_lambda.update_lambda(mycc, t1, t2, l1, l2, eris=None, imds=None)

pyscf.cc.ccsd_rdm module

pyscf.cc.ccsd_rdm.make_rdm1(mycc, t1, t2, l1, l2, ao_repr=False)

Spin-traced one-particle density matrix in MO basis (the occupied-virtual blocks from the orbital response contribution are not included).

dm1[p,q] = <q_alpha^dagger p_alpha> + <q_beta^dagger p_beta>

The convention of 1-pdm is based on McWeeney’s book, Eq (5.4.20). The contraction between 1-particle Hamiltonian and rdm1 is E = einsum(‘pq,qp’, h1, rdm1)

pyscf.cc.ccsd_rdm.make_rdm2(mycc, t1, t2, l1, l2, ao_repr=False)

Spin-traced two-particle density matrix in MO basis

dm2[p,q,r,s] = sum_{sigma,tau} <p_sigma^dagger r_tau^dagger s_tau q_sigma>

Note the contraction between ERIs (in Chemist’s notation) and rdm2 is E = einsum(‘pqrs,pqrs’, eri, rdm2)

pyscf.cc.ccsd_rdm_slow module

pyscf.cc.ccsd_rdm_slow.make_rdm1(cc, t1, t2, l1, l2)
pyscf.cc.ccsd_rdm_slow.make_rdm2(cc, t1, t2, l1, l2, d1=None, d2=None)

pyscf.cc.ccsd_t module

RHF-CCSD(T) for real integrals

pyscf.cc.ccsd_t.kernel(mycc, eris, t1=None, t2=None, verbose=3)

pyscf.cc.ccsd_t_lambda_slow module

Spin-free lambda equation of RHF-CCSD(T)

Ref: JCP 147, 044104 (2017); DOI:10.1063/1.4994918

pyscf.cc.ccsd_t_lambda_slow.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.ccsd_t_lambda_slow.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.ccsd_t_lambda_slow.update_lambda(mycc, t1, t2, l1, l2, eris=None, imds=None)

pyscf.cc.ccsd_t_rdm_slow module

pyscf.cc.ccsd_t_rdm_slow.make_rdm1(mycc, t1, t2, l1, l2, eris=None, ao_repr=False)
pyscf.cc.ccsd_t_rdm_slow.make_rdm2(mycc, t1, t2, l1, l2, eris=None)
pyscf.cc.ccsd_t_rdm_slow.p6(t)
pyscf.cc.ccsd_t_rdm_slow.r6(w)

pyscf.cc.ccsd_t_slow module

pyscf.cc.ccsd_t_slow.kernel(mycc, eris, t1=None, t2=None, verbose=3)
pyscf.cc.ccsd_t_slow.r3(w)

pyscf.cc.dfccsd module

class pyscf.cc.dfccsd.RCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

ao2mo(mo_coeff=None)
reset(mol=None)

pyscf.cc.eom_gccsd module

class pyscf.cc.eom_gccsd.EOMEA(cc)

Bases: pyscf.cc.eom_rccsd.EOMEA

amplitudes_to_vector(r1, r2)
ccsd_star_contract(eaccsd_evals, eaccsd_evecs, leaccsd_evecs, imds=None)
Returns:
e_star (list of float):

The EA-CCSD* energy.

Notes:

See ipccsd_star_contract for description of arguments.

Reference:

Saeh, Stanton “…energy surfaces of radicals” JCP 111, 8275 (1999); DOI:10.1063/1.480171

get_diag(imds=None)
l_matvec(vector, imds=None, diag=None)

EA-CCSD left eigenvector equation.

For description of args, see eaccsd_matvec.

make_imds(eris=None)
matvec(vector, imds=None, diag=None)
vector_size()
vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_gccsd.EOMEA_Ta(cc)

Bases: pyscf.cc.eom_gccsd.EOMEA

Class for EOM EACCSD(T)*(a) method by Matthews and Stanton.

make_imds(eris=None)
class pyscf.cc.eom_gccsd.EOMEE(cc)

Bases: pyscf.cc.eom_rccsd.EOMEE

amplitudes_to_vector(r1, r2)
eeccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

gen_matvec(imds=None, **kwargs)
get_diag(imds=None)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

make_imds(eris=None)
matvec(vector, imds=None, diag=None)
vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_gccsd.EOMIP(cc)

Bases: pyscf.cc.eom_rccsd.EOMIP

amplitudes_to_vector(r1, r2)
ccsd_star_contract(ipccsd_evals, ipccsd_evecs, lipccsd_evecs, imds=None)
Returns:
e_star (list of float):

The IP-CCSD* energy.

Notes:

The user should check to make sure the right and left eigenvalues before running the perturbative correction.

The 2hp right amplitudes are assumed to be of the form s^{a }_{ij}, i.e. the (ia) indices are coupled while the left are assumed to be of the form s^{ b}_{ij}, i.e. the (jb) indices are coupled.

Reference:

Saeh, Stanton “…energy surfaces of radicals” JCP 111, 8275 (1999); DOI:10.1063/1.480171

get_diag(imds=None)
l_matvec(vector, imds=None, diag=None)

IP-CCSD left eigenvector equation.

For description of args, see ipccsd_matvec.

make_imds(eris=None)
matvec(vector, imds=None, diag=None)
vector_size()
vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_gccsd.EOMIP_Ta(cc)

Bases: pyscf.cc.eom_gccsd.EOMIP

Class for EOM IPCCSD(T)*(a) method by Matthews and Stanton.

make_imds(eris=None)
pyscf.cc.eom_gccsd.amplitudes_to_vector_ea(r1, r2)
pyscf.cc.eom_gccsd.amplitudes_to_vector_ip(r1, r2)
pyscf.cc.eom_gccsd.eaccsd_diag(eom, imds=None)
pyscf.cc.eom_gccsd.eaccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_gccsd.eaccsd_star_contract(eom, eaccsd_evals, eaccsd_evecs, leaccsd_evecs, imds=None)
Returns:
e_star (list of float):

The EA-CCSD* energy.

Notes:

See ipccsd_star_contract for description of arguments.

Reference:

Saeh, Stanton “…energy surfaces of radicals” JCP 111, 8275 (1999); DOI:10.1063/1.480171

pyscf.cc.eom_gccsd.eeccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

pyscf.cc.eom_gccsd.eeccsd_diag(eom, imds=None)
pyscf.cc.eom_gccsd.eeccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_gccsd.ipccsd_diag(eom, imds=None)
pyscf.cc.eom_gccsd.ipccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_gccsd.ipccsd_star_contract(eom, ipccsd_evals, ipccsd_evecs, lipccsd_evecs, imds=None)
Returns:
e_star (list of float):

The IP-CCSD* energy.

Notes:

The user should check to make sure the right and left eigenvalues before running the perturbative correction.

The 2hp right amplitudes are assumed to be of the form s^{a }_{ij}, i.e. the (ia) indices are coupled while the left are assumed to be of the form s^{ b}_{ij}, i.e. the (jb) indices are coupled.

Reference:

Saeh, Stanton “…energy surfaces of radicals” JCP 111, 8275 (1999); DOI:10.1063/1.480171

pyscf.cc.eom_gccsd.leaccsd_matvec(eom, vector, imds=None, diag=None)

EA-CCSD left eigenvector equation.

For description of args, see eaccsd_matvec.

pyscf.cc.eom_gccsd.lipccsd_matvec(eom, vector, imds=None, diag=None)

IP-CCSD left eigenvector equation.

For description of args, see ipccsd_matvec.

pyscf.cc.eom_gccsd.vector_to_amplitudes_ea(vector, nmo, nocc)
pyscf.cc.eom_gccsd.vector_to_amplitudes_ip(vector, nmo, nocc)

pyscf.cc.eom_rccsd module

class pyscf.cc.eom_rccsd.EOM(cc)

Bases: pyscf.lib.misc.StreamObject

dump_flags(verbose=None)
reset(mol=None)
class pyscf.cc.eom_rccsd.EOMEA(cc)

Bases: pyscf.cc.eom_rccsd.EOM

amplitudes_to_vector(r1, r2)
ccsd_star_contract(eaccsd_evals, eaccsd_evecs, leaccsd_evecs, imds=None)
eaccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N+1)-electron charged excitations via EA-EOM-CCSD.

Args:

See also ipccd()

eaccsd_star(nroots=1, koopmans=False, right_guess=None, left_guess=None, eris=None, imds=None, **kwargs)

Calculates CCSD* perturbative correction.

Args:

See also ipccd_star()

eaccsd_star_contract(eaccsd_evals, eaccsd_evecs, leaccsd_evecs, imds=None)
property eea
gen_matvec(imds=None, left=False, **kwargs)
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
kernel(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N+1)-electron charged excitations via EA-EOM-CCSD.

Args:

See also ipccd()

l_matvec(vector, imds=None, diag=None)
make_imds(eris=None)
matvec(vector, imds=None, diag=None)
vector_size()
vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_rccsd.EOMEA_Ta(cc)

Bases: pyscf.cc.eom_rccsd.EOMEA

Class for EOM EACCSD(T)*(a) method by Matthews and Stanton.

make_imds(eris=None)
class pyscf.cc.eom_rccsd.EOMEE(cc)

Bases: pyscf.cc.eom_rccsd.EOM

eeccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

property eee
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

make_imds(eris=None)
vector_size()

size of the vector based on spin-orbital basis

class pyscf.cc.eom_rccsd.EOMEESinglet(cc)

Bases: pyscf.cc.eom_rccsd.EOMEE

amplitudes_to_vector(r1, r2)
eomee_ccsd_singlet(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD singlet

gen_matvec(imds=None, diag=None, **kwargs)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD singlet

matvec(vector, imds=None)
vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_rccsd.EOMEESpinFlip(cc)

Bases: pyscf.cc.eom_rccsd.EOMEE

amplitudes_to_vector(r1, r2)
eomsf_ccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

gen_matvec(imds=None, diag=None, **kwargs)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

matvec(vector, imds=None)

Spin flip EOM-CCSD

vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_rccsd.EOMEETriplet(cc)

Bases: pyscf.cc.eom_rccsd.EOMEE

amplitudes_to_vector(r1, r2)
eomee_ccsd_triplet(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD triplet

gen_matvec(imds=None, diag=None, **kwargs)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD triplet

matvec(vector, imds=None)
vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_rccsd.EOMIP(cc)

Bases: pyscf.cc.eom_rccsd.EOM

amplitudes_to_vector(r1, r2)
ccsd_star_contract(ipccsd_evals, ipccsd_evecs, lipccsd_evecs, imds=None)
property eip
gen_matvec(imds=None, left=False, **kwargs)
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
ipccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N-1)-electron charged excitations via IP-EOM-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

partitionbool or str

Use a matrix-partitioning for the doubles-doubles block. Can be None, ‘mp’ (Moller-Plesset, i.e. orbital energies on the diagonal), or ‘full’ (full diagonal elements).

koopmansbool

Calculate Koopmans’-like (quasiparticle) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

ipccsd_star(nroots=1, koopmans=False, right_guess=None, left_guess=None, eris=None, imds=None)

Calculates CCSD* perturbative correction.

Simply calls the relevant kernel() function and perturb_star of the eom class.

Returns:
e_t_a_star (list of float):

The IP-CCSD* energy.

ipccsd_star_contract(ipccsd_evals, ipccsd_evecs, lipccsd_evecs, imds=None)
kernel(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N-1)-electron charged excitations via IP-EOM-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

partitionbool or str

Use a matrix-partitioning for the doubles-doubles block. Can be None, ‘mp’ (Moller-Plesset, i.e. orbital energies on the diagonal), or ‘full’ (full diagonal elements).

koopmansbool

Calculate Koopmans’-like (quasiparticle) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

l_matvec(vector, imds=None, diag=None)

For left eigenvector

make_imds(eris=None)
matvec(vector, imds=None, diag=None)
vector_size()
vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_rccsd.EOMIP_Ta(cc)

Bases: pyscf.cc.eom_rccsd.EOMIP

Class for EOM IPCCSD(T)*(a) method by Matthews and Stanton.

make_imds(eris=None)
pyscf.cc.eom_rccsd.amplitudes_to_vector_ea(r1, r2)
pyscf.cc.eom_rccsd.amplitudes_to_vector_eomsf(t1, t2, out=None)
pyscf.cc.eom_rccsd.amplitudes_to_vector_ip(r1, r2)
pyscf.cc.eom_rccsd.amplitudes_to_vector_triplet(t1, t2, out=None)
pyscf.cc.eom_rccsd.eaccsd(eom, nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N+1)-electron charged excitations via EA-EOM-CCSD.

Args:

See also ipccd()

pyscf.cc.eom_rccsd.eaccsd_diag(eom, imds=None)
pyscf.cc.eom_rccsd.eaccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_rccsd.eaccsd_star(eom, nroots=1, koopmans=False, right_guess=None, left_guess=None, eris=None, imds=None, **kwargs)

Calculates CCSD* perturbative correction.

Args:

See also ipccd_star()

pyscf.cc.eom_rccsd.eaccsd_star_contract(eom, eaccsd_evals, eaccsd_evecs, leaccsd_evecs, imds=None)
pyscf.cc.eom_rccsd.eeccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

pyscf.cc.eom_rccsd.eeccsd_diag(eom, imds=None)
pyscf.cc.eom_rccsd.eeccsd_matvec_sf(eom, vector, imds=None)

Spin flip EOM-CCSD

pyscf.cc.eom_rccsd.eeccsd_matvec_singlet(eom, vector, imds=None)
pyscf.cc.eom_rccsd.eeccsd_matvec_triplet(eom, vector, imds=None)
pyscf.cc.eom_rccsd.eomee_ccsd_singlet(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD singlet

pyscf.cc.eom_rccsd.eomee_ccsd_triplet(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

EOM-EE-CCSD triplet

pyscf.cc.eom_rccsd.eomsf_ccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

pyscf.cc.eom_rccsd.ipccsd(eom, nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None, imds=None)

Calculate (N-1)-electron charged excitations via IP-EOM-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

partitionbool or str

Use a matrix-partitioning for the doubles-doubles block. Can be None, ‘mp’ (Moller-Plesset, i.e. orbital energies on the diagonal), or ‘full’ (full diagonal elements).

koopmansbool

Calculate Koopmans’-like (quasiparticle) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

pyscf.cc.eom_rccsd.ipccsd_diag(eom, imds=None)
pyscf.cc.eom_rccsd.ipccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_rccsd.ipccsd_star(eom, nroots=1, koopmans=False, right_guess=None, left_guess=None, eris=None, imds=None)

Calculates CCSD* perturbative correction.

Simply calls the relevant kernel() function and perturb_star of the eom class.

Returns:
e_t_a_star (list of float):

The IP-CCSD* energy.

pyscf.cc.eom_rccsd.ipccsd_star_contract(eom, ipccsd_evals, ipccsd_evecs, lipccsd_evecs, imds=None)
pyscf.cc.eom_rccsd.kernel(eom, nroots=1, koopmans=False, guess=None, left=False, eris=None, imds=None, **kwargs)
pyscf.cc.eom_rccsd.leaccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_rccsd.lipccsd_matvec(eom, vector, imds=None, diag=None)

For left eigenvector

pyscf.cc.eom_rccsd.perturbed_ccsd_kernel(eom, nroots=1, koopmans=False, right_guess=None, left_guess=None, eris=None, imds=None)

Wrapper for running perturbative excited-states that require both left and right amplitudes.

pyscf.cc.eom_rccsd.vector_to_amplitudes_ea(vector, nmo, nocc)
pyscf.cc.eom_rccsd.vector_to_amplitudes_eomsf(vector, nmo, nocc)
pyscf.cc.eom_rccsd.vector_to_amplitudes_ip(vector, nmo, nocc)
pyscf.cc.eom_rccsd.vector_to_amplitudes_triplet(vector, nmo, nocc)

pyscf.cc.eom_rccsd_hybrid module

class pyscf.cc.eom_rccsd_hybrid.HybridEOMEA(cc, nvir_act=0)

Bases: pyscf.cc.eom_rccsd.EOMEA

get_diag(imds=None)
matvec(vector, imds=None, diag=None)
class pyscf.cc.eom_rccsd_hybrid.HybridEOMIP(cc, nvir_act=0)

Bases: pyscf.cc.eom_rccsd.EOMIP

get_diag(imds=None)
matvec(vector, imds=None, diag=None)
pyscf.cc.eom_rccsd_hybrid.eaccsd_diag(eom, imds=None)
pyscf.cc.eom_rccsd_hybrid.eaccsd_matvec(eom, vector, imds=None, diag=None)
pyscf.cc.eom_rccsd_hybrid.ipccsd_diag(eom, imds=None)
pyscf.cc.eom_rccsd_hybrid.ipccsd_matvec(eom, vector, imds=None, diag=None)

pyscf.cc.eom_uccsd module

class pyscf.cc.eom_uccsd.EOMEA(cc)

Bases: pyscf.cc.eom_rccsd.EOMEA

amplitudes_to_vector(r1, r2)
ccsd_star_contract = None
eaccsd_star = None
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
l_matvec = None
make_imds(eris=None)
matvec(vector, imds=None, diag=None)

For spin orbitals.

R2 operators of the form s_{ j}^{ab}, i.e. indices jb are coupled.

vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_uccsd.EOMEE(cc)

Bases: pyscf.cc.eom_rccsd.EOMEE

eeccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

get_diag(imds=None)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

make_imds(eris=None)
vector_size()

size of the vector based on spin-orbital basis

class pyscf.cc.eom_uccsd.EOMEESpinFlip(cc)

Bases: pyscf.cc.eom_uccsd.EOMEE

amplitudes_to_vector(r1, r2)
eomsf_ccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

gen_matvec(imds=None, diag=None, **kwargs)
get_init_guess(nroots=1, koopmans=True, diag=None)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

matvec(vector, imds=None)

Spin flip EOM-CCSD

vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_uccsd.EOMEESpinKeep(cc)

Bases: pyscf.cc.eom_uccsd.EOMEE

amplitudes_to_vector(r1, r2)
eomee_ccsd(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)
gen_matvec(imds=None, diag=None, **kwargs)
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
kernel(nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

matvec(vector, imds=None)
vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
class pyscf.cc.eom_uccsd.EOMIP(cc)

Bases: pyscf.cc.eom_rccsd.EOMIP

amplitudes_to_vector(r1, r2)
ccsd_star_contract = None
get_diag(imds=None)
get_init_guess(nroots=1, koopmans=True, diag=None)
ipccsd_star = None
l_matvec = None
make_imds(eris=None)
matvec(vector, imds=None, diag=None)

For spin orbitals R2 operators of the form s_{ij}^{ b}, i.e. indices jb are coupled.

vector_size()

size of the vector based on spin-orbital basis

vector_to_amplitudes(vector, nmo=None, nocc=None)
pyscf.cc.eom_uccsd.amplitudes_to_vector_ea(r1, r2)
pyscf.cc.eom_uccsd.amplitudes_to_vector_eomsf(t1, t2, out=None)
pyscf.cc.eom_uccsd.amplitudes_to_vector_ip(r1, r2)

For spin orbitals

pyscf.cc.eom_uccsd.eaccsd_diag(eom, imds=None)
pyscf.cc.eom_uccsd.eaccsd_matvec(eom, vector, imds=None, diag=None)

For spin orbitals.

R2 operators of the form s_{ j}^{ab}, i.e. indices jb are coupled.

pyscf.cc.eom_uccsd.eeccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None)

Calculate N-electron neutral excitations via EOM-EE-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

pyscf.cc.eom_uccsd.eeccsd_diag(eom, imds=None)
pyscf.cc.eom_uccsd.enforce_symm_2p_spin(r1, r2, orbspin, excitation)
pyscf.cc.eom_uccsd.enforce_symm_2p_spin_ea(r1, r2, orbspin)
pyscf.cc.eom_uccsd.enforce_symm_2p_spin_ip(r1, r2, orbspin)
pyscf.cc.eom_uccsd.eomee_ccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)
pyscf.cc.eom_uccsd.eomee_ccsd_matvec(eom, vector, imds=None)
pyscf.cc.eom_uccsd.eomsf_ccsd(eom, nroots=1, koopmans=False, guess=None, eris=None, imds=None, diag=None)

Spin flip EOM-EE-CCSD

pyscf.cc.eom_uccsd.eomsf_ccsd_matvec(eom, vector, imds=None)

Spin flip EOM-CCSD

pyscf.cc.eom_uccsd.ipccsd_diag(eom, imds=None)
pyscf.cc.eom_uccsd.ipccsd_matvec(eom, vector, imds=None, diag=None)

For spin orbitals R2 operators of the form s_{ij}^{ b}, i.e. indices jb are coupled.

pyscf.cc.eom_uccsd.rand_cc_t1_t2(mf, seed=1)
pyscf.cc.eom_uccsd.rand_mf(mol, seed=1)
pyscf.cc.eom_uccsd.spatial2spin_ea(r1, r2, orbspin=None)

Convert R1/R2 of spatial orbital representation to R1/R2 of spin-orbital representation

pyscf.cc.eom_uccsd.spatial2spin_eomsf(rx, orbspin)

Convert EOM spatial R1,R2 to spin-orbital R1,R2

pyscf.cc.eom_uccsd.spatial2spin_ip(r1, r2, orbspin=None)

Convert R1/R2 of spatial orbital representation to R1/R2 of spin-orbital representation

pyscf.cc.eom_uccsd.spin2spatial_ea(r1, r2, orbspin)
pyscf.cc.eom_uccsd.spin2spatial_eomsf(rx, orbspin)

Convert EOM spin-orbital R1,R2 to spatial R1,R2

pyscf.cc.eom_uccsd.spin2spatial_ip(r1, r2, orbspin)
pyscf.cc.eom_uccsd.vector_to_amplitudes_ea(vector, nmo, nocc)
pyscf.cc.eom_uccsd.vector_to_amplitudes_eomsf(vector, nmo, nocc)
pyscf.cc.eom_uccsd.vector_to_amplitudes_ip(vector, nmo, nocc)

For spin orbitals

pyscf.cc.gccsd module

pyscf.cc.gccsd.CCSD

alias of pyscf.cc.gccsd.GCCSD

class pyscf.cc.gccsd.GCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

EOMEA(*args, **kwargs)
EOMEA_Ta(*args, **kwargs)

Class for EOM EACCSD(T)*(a) method by Matthews and Stanton.

EOMEE(*args, **kwargs)
EOMIP(*args, **kwargs)
EOMIP_Ta(*args, **kwargs)

Class for EOM IPCCSD(T)*(a) method by Matthews and Stanton.

amplitudes_from_ccsd(t1, t2)

Convert spatial orbital T1,T2 to spin-orbital T1,T2

amplitudes_from_rccsd(t1, t2, orbspin=None)
amplitudes_to_vector(t1, t2, out=None)
ao2mo(mo_coeff=None)
ccsd(t1=None, t2=None, eris=None, mbpt2=False)

Ground-state unrestricted (U)CCSD.

Kwargs:
mbpt2bool

Use one-shot MBPT2 approximation to CCSD.

ccsd_t(t1=None, t2=None, eris=None)
conv_tol = 1e-07
conv_tol_normt = 1e-06
density_fit()
eaccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
eeccsd(nroots=1, koopmans=False, guess=None, eris=None)
energy(t1, t2, eris)

CCSD correlation energy

eomea_method()
eomee_method()
eomip_method()
get_d1_diagnostic(t1=None)
get_d2_diagnostic(t2=None)
get_t1_diagnostic(t1=None)
init_amps(eris=None)
ipccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
kernel(t1=None, t2=None, eris=None, mbpt2=False)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

make_rdm1(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

Un-relaxed 1-particle density matrix in MO space

make_rdm2(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

2-particle density matrix in MO space. The density matrix is stored as

dm2[p,r,q,s] = <p^+ q^+ s r>

nuc_grad_method()
solve_lambda(t1=None, t2=None, l1=None, l2=None, eris=None)
spatial2spin(tx, orbspin=None)
spin2spatial(tx, orbspin=None)
update_amps(t1, t2, eris)
vector_size(nmo=None, nocc=None)
vector_to_amplitudes(vec, nmo=None, nocc=None)
pyscf.cc.gccsd.amplitudes_from_rccsd(t1, t2, orbspin=None)

Convert spatial orbital T1,T2 to spin-orbital T1,T2

pyscf.cc.gccsd.energy(cc, t1, t2, eris)
pyscf.cc.gccsd.update_amps(cc, t1, t2, eris)

pyscf.cc.gccsd_lambda module

pyscf.cc.gccsd_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.gccsd_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.gccsd_lambda.update_lambda(mycc, t1, t2, l1, l2, eris, imds)

pyscf.cc.gccsd_rdm module

pyscf.cc.gccsd_rdm.make_rdm1(mycc, t1, t2, l1, l2, ao_repr=False)

One-particle density matrix in the molecular spin-orbital representation (the occupied-virtual blocks from the orbital response contribution are not included).

dm1[p,q] = <q^dagger p> (p,q are spin-orbitals)

The convention of 1-pdm is based on McWeeney’s book, Eq (5.4.20). The contraction between 1-particle Hamiltonian and rdm1 is E = einsum(‘pq,qp’, h1, rdm1)

pyscf.cc.gccsd_rdm.make_rdm2(mycc, t1, t2, l1, l2, ao_repr=False)

Two-particle density matrix in the molecular spin-orbital representation

dm2[p,q,r,s] = <p^dagger r^dagger s q>

where p,q,r,s are spin-orbitals. p,q correspond to one particle and r,s correspond to another particle. The contraction between ERIs (in Chemist’s notation) and rdm2 is E = einsum(‘pqrs,pqrs’, eri, rdm2)

pyscf.cc.gccsd_t module

GHF-CCSD(T) with spin-orbital integrals

pyscf.cc.gccsd_t.kernel(cc, eris, t1=None, t2=None, verbose=4)

pyscf.cc.gccsd_t_lambda module

Lambda equation of GHF-CCSD(T) with spin-orbital integrals

Ref: JCP 98, 8718 (1993); DOI:10.1063/1.464480 JCP 147, 044104 (2017); DOI:10.1063/1.4994918

pyscf.cc.gccsd_t_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.gccsd_t_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.gccsd_t_lambda.update_lambda(mycc, t1, t2, l1, l2, eris=None, imds=None)

pyscf.cc.gccsd_t_rdm module

pyscf.cc.gccsd_t_rdm.make_rdm1(mycc, t1, t2, l1, l2, eris=None, ao_repr=False)
pyscf.cc.gccsd_t_rdm.make_rdm2(mycc, t1, t2, l1, l2, eris=None)

pyscf.cc.gccsd_t_slow module

GHF-CCSD(T) with spin-orbital integrals

pyscf.cc.gccsd_t_slow.kernel(cc, eris, t1=None, t2=None, max_memory=2000, verbose=4)

pyscf.cc.gintermediates module

pyscf.cc.gintermediates.Foo(t1, t2, eris)
pyscf.cc.gintermediates.Fov(t1, t2, eris)
pyscf.cc.gintermediates.Fvv(t1, t2, eris)
pyscf.cc.gintermediates.Woooo(t1, t2, eris)
pyscf.cc.gintermediates.Wooov(t1, t2, eris)
pyscf.cc.gintermediates.Wovoo(t1, t2, eris)
pyscf.cc.gintermediates.Wovvo(t1, t2, eris)
pyscf.cc.gintermediates.Wvovv(t1, t2, eris)
pyscf.cc.gintermediates.Wvvvo(t1, t2, eris, _Wvvvv=None)
pyscf.cc.gintermediates.Wvvvv(t1, t2, eris)
pyscf.cc.gintermediates.cc_Foo(t1, t2, eris)
pyscf.cc.gintermediates.cc_Fov(t1, t2, eris)
pyscf.cc.gintermediates.cc_Fvv(t1, t2, eris)
pyscf.cc.gintermediates.cc_Woooo(t1, t2, eris)
pyscf.cc.gintermediates.cc_Wovvo(t1, t2, eris)
pyscf.cc.gintermediates.cc_Wvvvv(t1, t2, eris)
pyscf.cc.gintermediates.get_t3p2_imds_slow(cc, t1, t2, eris=None, t3p2_ip_out=None, t3p2_ea_out=None)

Calculates T1, T2 amplitudes corrected by second-order T3 contribution and intermediates used in IP/EA-CCSD(T)a

Args:
cc (GCCSD):

Object containing coupled-cluster results.

t1 (ndarray):

T1 amplitudes.

t2 (ndarray):

T2 amplitudes from which the T3[2] amplitudes are formed.

eris (_PhysicistsERIs):

Antisymmetrized electron-repulsion integrals in physicist’s notation.

t3p2_ip_out (ndarray):

Store results of the intermediate used in IP-EOM-CCSD(T)a.

t3p2_ea_out (ndarray):

Store results of the intermediate used in EA-EOM-CCSD(T)a.

Returns:
delta_ccsd (float):
Difference of perturbed and unperturbed CCSD ground-state energy,

energy(T1 + T1[2], T2 + T2[2]) - energy(T1, T2)

pt1 (ndarray):

Perturbatively corrected T1 amplitudes.

pt2 (ndarray):

Perturbatively corrected T2 amplitudes.

Reference:
    1. Matthews, J. F. Stanton “A new approach to approximate…”

    JCP 145, 124102 (2016); DOI:10.1063/1.4962910, Equation 14

Shavitt and Bartlett “Many-body Methods in Physics and Chemistry”

2009, Equation 10.33

pyscf.cc.gintermediates.make_tau(t2, t1a, t1b, fac=1, out=None)

pyscf.cc.rccsd module

Restricted CCSD implementation which supports both real and complex integrals. The 4-index integrals are saved on disk entirely (without using any symmetry). This code is slower than the pyscf.cc.ccsd implementation.

Note MO integrals are treated in chemist’s notation

Ref: Hirata et al., J. Chem. Phys. 120, 2581 (2004)

class pyscf.cc.rccsd.RCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

restricted CCSD with IP-EOM, EA-EOM, EE-EOM, and SF-EOM capabilities

Ground-state CCSD is performed in optimized ccsd.CCSD and EOM is performed here.

ao2mo(mo_coeff=None)
ccsd(t1=None, t2=None, eris=None, mbpt2=False)

Ground-state CCSD.

Kwargs:
mbpt2bool

Use one-shot MBPT2 approximation to CCSD.

ccsd_t(t1=None, t2=None, eris=None)
density_fit(auxbasis=None, with_df=None)
energy(t1=None, t2=None, eris=None)

RCCSD correlation energy

kernel(t1=None, t2=None, eris=None, mbpt2=False)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

solve_lambda(t1=None, t2=None, l1=None, l2=None, eris=None)
update_amps(t1, t2, eris)
pyscf.cc.rccsd.energy(cc, t1=None, t2=None, eris=None)

RCCSD correlation energy

pyscf.cc.rccsd.update_amps(cc, t1, t2, eris)

pyscf.cc.rccsd_hybrid module

Restricted hybrid CCSD implementation which supports both real and complex integrals.

Note MO integrals are treated in chemist’s notation

class pyscf.cc.rccsd_hybrid.HybridRCCSD(mf, frozen=0, frozen_occ=0, nvir_act=0, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.rccsd.RCCSD

restricted hybrid CCSD with IP-EOM, EA-EOM, EE-EOM, and SF-EOM capabilities

update_amps(t1, t2, eris)
pyscf.cc.rccsd_hybrid.energy(cc, t1=None, t2=None, eris=None)

RCCSD correlation energy

pyscf.cc.rccsd_hybrid.update_amps(cc, t1, t2, eris)

pyscf.cc.rccsd_lambda module

Restricted CCSD lambda equation solver which supports both real and complex integrals. This code is slower than the pyscf.cc.ccsd_lambda implementation.

Note MO integrals are treated in chemist’s notation

pyscf.cc.rccsd_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.rccsd_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.rccsd_lambda.update_lambda(mycc, t1, t2, l1, l2, eris, imds)

pyscf.cc.rccsd_slow module

Restricted CCSD

Ref: Stanton et al., J. Chem. Phys. 94, 4334 (1990) Ref: Hirata et al., J. Chem. Phys. 120, 2581 (2004)

class pyscf.cc.rccsd_slow.RCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

amplitudes_to_vector_ea(r1, r2)
amplitudes_to_vector_ee(r1, r2)
amplitudes_to_vector_ip(r1, r2)
ao2mo(mo_coeff=None)
ccsd(t1=None, t2=None, eris=None, mbpt2=False, cc2=False)

Ground-state CCSD.

Kwargs:
mbpt2bool

Use one-shot MBPT2 approximation to CCSD.

cc2bool

Use CC2 approximation to CCSD.

dump_flags(verbose=None)
eaccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None)

Calculate (N+1)-electron charged excitations via EA-EOM-CCSD.

Kwargs:

See ipccd()

eaccsd_diag()
eaccsd_matvec(vector)
eaccsd_star_contract(eaccsd_evals, eaccsd_evecs, leaccsd_evecs)
eeccsd(nroots=1, koopmans=False, guess=None, partition=None)

Calculate N-electron neutral excitations via EE-EOM-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

partitionbool or str

Use a matrix-partitioning for the doubles-doubles block. Can be None, ‘mp’ (Moller-Plesset, i.e. orbital energies on the diagonal), or ‘full’ (full diagonal elements).

koopmansbool

Calculate Koopmans’-like (1p1h) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

eeccsd_diag()
eeccsd_matvec(vector)
energy(t1, t2, eris)

CCSD correlation energy

init_amps(eris)
ipccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None)

Calculate (N-1)-electron charged excitations via IP-EOM-CCSD.

Kwargs:
nrootsint

Number of roots (eigenvalues) requested

partitionbool or str

Use a matrix-partitioning for the doubles-doubles block. Can be None, ‘mp’ (Moller-Plesset, i.e. orbital energies on the diagonal), or ‘full’ (full diagonal elements).

koopmansbool

Calculate Koopmans’-like (quasiparticle) excitations only, targeting via overlap.

guesslist of ndarray

List of guess vectors to use for targeting via overlap.

ipccsd_diag()
ipccsd_matvec(vector)
ipccsd_star_contract(ipccsd_evals, ipccsd_evecs, lipccsd_evecs)
kernel(t1=None, t2=None, eris=None, mbpt2=False, cc2=False)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

leaccsd_matvec(vector)
lipccsd_matvec(vector)
nea()
nee()
nip()
update_amps(t1, t2, eris)
vector_to_amplitudes_ea(vector)
vector_to_amplitudes_ee(vector)
vector_to_amplitudes_ip(vector)
pyscf.cc.rccsd_slow.energy(cc, t1, t2, eris)
pyscf.cc.rccsd_slow.update_amps(cc, t1, t2, eris)

pyscf.cc.rintermediates module

Intermediates for restricted CCSD. Complex integrals are supported.

pyscf.cc.rintermediates.Loo(t1, t2, eris)
pyscf.cc.rintermediates.Lvv(t1, t2, eris)
pyscf.cc.rintermediates.W1ovov(t1, t2, eris)
pyscf.cc.rintermediates.W1ovvo(t1, t2, eris)
pyscf.cc.rintermediates.W2ovov(t1, t2, eris)
pyscf.cc.rintermediates.W2ovvo(t1, t2, eris)
pyscf.cc.rintermediates.Woooo(t1, t2, eris)
pyscf.cc.rintermediates.Wooov(t1, t2, eris)
pyscf.cc.rintermediates.Wovoo(t1, t2, eris)
pyscf.cc.rintermediates.Wovov(t1, t2, eris)
pyscf.cc.rintermediates.Wovvo(t1, t2, eris)
pyscf.cc.rintermediates.Wvovv(t1, t2, eris)
pyscf.cc.rintermediates.Wvvvo(t1, t2, eris, _Wvvvv=None)
pyscf.cc.rintermediates.Wvvvv(t1, t2, eris)
pyscf.cc.rintermediates.cc_Foo(t1, t2, eris)
pyscf.cc.rintermediates.cc_Fov(t1, t2, eris)
pyscf.cc.rintermediates.cc_Fvv(t1, t2, eris)
pyscf.cc.rintermediates.cc_Woooo(t1, t2, eris)
pyscf.cc.rintermediates.cc_Wvoov(t1, t2, eris)
pyscf.cc.rintermediates.cc_Wvovo(t1, t2, eris)
pyscf.cc.rintermediates.cc_Wvvvv(t1, t2, eris)
pyscf.cc.rintermediates.get_t3p2_imds_slow(cc, t1, t2, eris=None, t3p2_ip_out=None, t3p2_ea_out=None)

Calculates T1, T2 amplitudes corrected by second-order T3 contribution and intermediates used in IP/EA-CCSD(T)a

For description of arguments, see get_t3p2_imds_slow in gintermediates.py.

pyscf.cc.uccsd module

UCCSD with spatial integrals

pyscf.cc.uccsd.CCSD

alias of pyscf.cc.uccsd.UCCSD

class pyscf.cc.uccsd.UCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

EOMEA(*args, **kwargs)
EOMEE(*args, **kwargs)
EOMEESpinFlip(*args, **kwargs)
EOMEESpinKeep(*args, **kwargs)
EOMIP(*args, **kwargs)
amplitudes_from_rccsd(t1, t2)
amplitudes_to_vector(t1, t2, out=None)
ao2mo(mo_coeff=None)
ccsd(t1=None, t2=None, eris=None, mbpt2=False)

Ground-state unrestricted (U)CCSD.

Kwargs:
mbpt2bool

Use one-shot MBPT2 approximation to CCSD.

ccsd_t(t1=None, t2=None, eris=None)
conv_tol = 1e-07
conv_tol_normt = 1e-06
density_fit()
eaccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
eeccsd(nroots=1, koopmans=False, guess=None, eris=None)
energy(t1=None, t2=None, eris=None)

UCCSD correlation energy

eomea_method()
eomee_ccsd(nroots=1, koopmans=False, guess=None, eris=None)
eomee_method()
eomip_method()
eomsf_ccsd(nroots=1, koopmans=False, guess=None, eris=None)
get_d1_diagnostic(t1=None)
get_d2_diagnostic(t2=None)
get_frozen_mask()

Get boolean mask for the unrestricted reference orbitals.

In the returned boolean (mask) array of frozen orbital indices, the element is False if it corresonds to the frozen orbital.

get_nmo()
get_nocc()
get_t1_diagnostic(t1=None)
init_amps(eris=None)
ipccsd(nroots=1, left=False, koopmans=False, guess=None, partition=None, eris=None)
kernel(t1=None, t2=None, eris=None, mbpt2=False)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

make_rdm1(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

Un-relaxed 1-particle density matrix in MO space

Returns:

dm1a, dm1b

make_rdm2(t1=None, t2=None, l1=None, l2=None, ao_repr=False)

2-particle density matrix in spin-oribital basis.

nuc_grad_method()
solve_lambda(t1=None, t2=None, l1=None, l2=None, eris=None)
spin_square(mo_coeff=None, s=None)
uccsd_t(t1=None, t2=None, eris=None)
update_amps(t1, t2, eris)
vector_size(nmo=None, nocc=None)
vector_to_amplitudes(vector, nmo=None, nocc=None)
pyscf.cc.uccsd.amplitudes_from_rccsd(t1, t2)
pyscf.cc.uccsd.amplitudes_to_vector(t1, t2, out=None)
pyscf.cc.uccsd.energy(cc, t1=None, t2=None, eris=None)

UCCSD correlation energy

pyscf.cc.uccsd.make_tau(t2, t1, r1, fac=1, out=None)
pyscf.cc.uccsd.make_tau_aa(t2aa, t1a, r1a, fac=1, out=None)
pyscf.cc.uccsd.make_tau_ab(t2ab, t1, r1, fac=1, out=None)
pyscf.cc.uccsd.update_amps(cc, t1, t2, eris)
pyscf.cc.uccsd.vector_to_amplitudes(vector, nmo, nocc)

pyscf.cc.uccsd_lambda module

pyscf.cc.uccsd_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.uccsd_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.uccsd_lambda.update_lambda(mycc, t1, t2, l1, l2, eris, imds)

pyscf.cc.uccsd_rdm module

pyscf.cc.uccsd_rdm.make_rdm1(mycc, t1, t2, l1, l2, ao_repr=False)

One-particle spin density matrices dm1a, dm1b in MO basis (the occupied-virtual blocks due to the orbital response contribution are not included).

dm1a[p,q] = <q_alpha^dagger p_alpha> dm1b[p,q] = <q_beta^dagger p_beta>

The convention of 1-pdm is based on McWeeney’s book, Eq (5.4.20).

pyscf.cc.uccsd_rdm.make_rdm2(mycc, t1, t2, l1, l2, ao_repr=False)

Two-particle spin density matrices dm2aa, dm2ab, dm2bb in MO basis

dm2aa[p,q,r,s] = <q_alpha^dagger s_alpha^dagger r_alpha p_alpha> dm2ab[p,q,r,s] = <q_alpha^dagger s_beta^dagger r_beta p_alpha> dm2bb[p,q,r,s] = <q_beta^dagger s_beta^dagger r_beta p_beta>

(p,q correspond to one particle and r,s correspond to another particle) Two-particle density matrix should be contracted to integrals with the pattern below to compute energy

E = numpy.einsum(‘pqrs,pqrs’, eri_aa, dm2_aa) E+= numpy.einsum(‘pqrs,pqrs’, eri_ab, dm2_ab) E+= numpy.einsum(‘pqrs,rspq’, eri_ba, dm2_ab) E+= numpy.einsum(‘pqrs,pqrs’, eri_bb, dm2_bb)

where eri_aa[p,q,r,s] = (p_alpha q_alpha | r_alpha s_alpha ) eri_ab[p,q,r,s] = ( p_alpha q_alpha | r_beta s_beta ) eri_ba[p,q,r,s] = ( p_beta q_beta | r_alpha s_alpha ) eri_bb[p,q,r,s] = ( p_beta q_beta | r_beta s_beta )

pyscf.cc.uccsd_slow module

class pyscf.cc.uccsd_slow.UCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

Bases: pyscf.cc.ccsd.CCSD

amplitudes_from_rccsd(t1, t2)

Convert spatial orbital T1,T2 to spin-orbital T1,T2

amplitudes_to_vector_ea(r1, r2)
amplitudes_to_vector_ee(r1, r2)
amplitudes_to_vector_ip(r1, r2)
ao2mo(mo_coeff=None)
ccsd(t1=None, t2=None, eris=None, mbpt2=False)

Ground-state unrestricted (U)CCSD.

Kwargs:
mbpt2bool

Use one-shot MBPT2 approximation to CCSD.

eaccsd_diag()
eaccsd_matvec(vector)
eeccsd_diag()
eeccsd_matvec(vector)
energy(t1, t2, eris)

CCSD correlation energy

get_frozen_mask()

Get boolean mask for the unrestricted reference orbitals.

In the returned boolean (mask) array of frozen orbital indices, the element is False if it corresonds to the frozen orbital.

get_nmo()
get_nocc()
init_amps(eris)
ipccsd_diag()
ipccsd_matvec(vector)
kernel(t1=None, t2=None, eris=None, mbpt2=False)

Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).

nea()
nee()
nip()
property nmo
property nocc
update_amps(t1, t2, eris)
vector_to_amplitudes_ea(vector)
vector_to_amplitudes_ee(vector)
vector_to_amplitudes_ip(vector)
pyscf.cc.uccsd_slow.energy(cc, t1, t2, eris)
pyscf.cc.uccsd_slow.update_amps(cc, t1, t2, eris)
pyscf.cc.uccsd_slow.uspatial2spin(cc, moidx, mo_coeff)

Convert the results of an unrestricted mean-field calculation to spin-orbital form.

Spin-orbital ordering is determined by orbital energy without regard for spin.

Returns:
fock(nso,nso) ndarray

The Fock matrix in the basis of spin-orbitals

so_coeff(nao, nso) ndarray

The matrix of spin-orbital coefficients in the AO basis

spin(nso,) ndarary

The spin (0 or 1) of each spin-orbital

pyscf.cc.uccsd_t module

UCCSD(T)

pyscf.cc.uccsd_t.kernel(mycc, eris, t1=None, t2=None, verbose=3)

pyscf.cc.uccsd_t_lambda module

Spin-free lambda equation of UHF-CCSD(T)

pyscf.cc.uccsd_t_lambda.kernel(mycc, eris=None, t1=None, t2=None, l1=None, l2=None, max_cycle=50, tol=1e-08, verbose=4)
pyscf.cc.uccsd_t_lambda.make_intermediates(mycc, t1, t2, eris)
pyscf.cc.uccsd_t_lambda.update_lambda(mycc, t1, t2, l1, l2, eris=None, imds=None)

pyscf.cc.uccsd_t_rdm module

pyscf.cc.uccsd_t_rdm.make_rdm1(mycc, t1, t2, l1, l2, eris=None, ao_repr=False)
pyscf.cc.uccsd_t_rdm.make_rdm2(mycc, t1, t2, l1, l2, eris=None)
pyscf.cc.uccsd_t_rdm.p6(t)
pyscf.cc.uccsd_t_rdm.r4(w)
pyscf.cc.uccsd_t_rdm.r6(w)

pyscf.cc.uccsd_t_slow module

pyscf.cc.uccsd_t_slow.kernel(mcc, eris, t1=None, t2=None)

pyscf.cc.uintermediates module

pyscf.cc.uintermediates.Foo(t1, t2, eris)
pyscf.cc.uintermediates.Fov(t1, t2, eris)
pyscf.cc.uintermediates.Fvv(t1, t2, eris)
pyscf.cc.uintermediates.Woooo(t1, t2, eris)
pyscf.cc.uintermediates.Wooov(t1, t2, eris)
pyscf.cc.uintermediates.Woovo(t1, t2, eris)
pyscf.cc.uintermediates.Wovvo(t1, t2, eris)
pyscf.cc.uintermediates.Wvvov(t1, t2, eris)
pyscf.cc.uintermediates.Wvvvo(t1, t2, eris)
pyscf.cc.uintermediates.make_tau(t2, t1, r1, fac=1, out=None)
pyscf.cc.uintermediates.make_tau_aa(t2aa, t1a, r1a, fac=1, out=None)
pyscf.cc.uintermediates.make_tau_ab(t2ab, t1, r1, fac=1, out=None)

pyscf.cc.uintermediates_slow module

pyscf.cc.uintermediates_slow.Foo(t1, t2, eris)
pyscf.cc.uintermediates_slow.Fov(t1, t2, eris)
pyscf.cc.uintermediates_slow.Fvv(t1, t2, eris)
pyscf.cc.uintermediates_slow.Woooo(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wooov(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wovoo(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wovvo(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wvovv(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wvvvo(t1, t2, eris, _Wvvvv=None)
pyscf.cc.uintermediates_slow.Wvvvo_incore(t1, t2, eris)
pyscf.cc.uintermediates_slow.Wvvvv(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Foo(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Fov(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Fvv(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Woooo(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Wovvo(t1, t2, eris)
pyscf.cc.uintermediates_slow.cc_Wvvvv(t1, t2, eris)
pyscf.cc.uintermediates_slow.make_tau(t2, t1a, t1b, fac=1, out=None)

Module contents

Coupled Cluster

Simple usage:

>>> from pyscf import gto, scf, cc
>>> mol = gto.M(atom='H 0 0 0; H 0 0 1')
>>> mf = scf.RHF(mol).run()
>>> cc.CCSD(mf).run()

cc.CCSD() returns an instance of CCSD class. Followings are parameters to control CCSD calculation.

verboseint

Print level. Default value equals to Mole.verbose

max_memoryfloat or int

Allowed memory in MB. Default value equals to Mole.max_memory

conv_tolfloat

converge threshold. Default is 1e-7.

conv_tol_normtfloat

converge threshold for norm(t1,t2). Default is 1e-5.

max_cycleint

max number of iterations. Default is 50.

diis_spaceint

DIIS space size. Default is 6.

diis_start_cycleint

The step to start DIIS. Default is 0.

directbool

AO-direct CCSD. Default is False.

async_iobool

Allow for asynchronous function execution. Default is True.

incore_completebool

Avoid all I/O. Default is False.

frozenint or list

If integer is given, the inner-most orbitals are frozen from CC amplitudes. Given the orbital indices (0-based) in a list, both occupied and virtual orbitals can be frozen in CC calculation.

Saved results

convergedbool

CCSD converged or not

e_totfloat

Total CCSD energy (HF + correlation)

t1, t2 :

t1[i,a], t2[i,j,a,b] (i,j in occ, a,b in virt)

l1, l2 :

Lambda amplitudes l1[i,a], l2[i,j,a,b] (i,j in occ, a,b in virt)

pyscf.cc.CCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

restricted CCSD

Attributes:
verboseint

Print level. Default value equals to Mole.verbose

max_memoryfloat or int

Allowed memory in MB. Default value equals to Mole.max_memory

conv_tolfloat

converge threshold. Default is 1e-7.

conv_tol_normtfloat

converge threshold for norm(t1,t2). Default is 1e-5.

max_cycleint

max number of iterations. Default is 50.

diis_spaceint

DIIS space size. Default is 6.

diis_start_cycleint

The step to start DIIS. Default is 0.

iterative_dampingfloat

The self consistent damping parameter.

directbool

AO-direct CCSD. Default is False.

async_iobool

Allow for asynchronous function execution. Default is True.

incore_completebool

Avoid all I/O (also for DIIS). Default is False.

level_shiftfloat

A shift on virtual orbital energies to stablize the CCSD iteration

frozenint or list

If integer is given, the inner-most orbitals are frozen from CC amplitudes. Given the orbital indices (0-based) in a list, both occupied and virtual orbitals can be frozen in CC calculation.

>>> mol = gto.M(atom = 'H 0 0 0; F 0 0 1.1', basis = 'ccpvdz')
>>> mf = scf.RHF(mol).run()
>>> # freeze 2 core orbitals
>>> mycc = cc.CCSD(mf).set(frozen = 2).run()
>>> # freeze 2 core orbitals and 3 high lying unoccupied orbitals
>>> mycc.set(frozen = [0,1,16,17,18]).run()

Saved results

convergedbool

CCSD converged or not

e_corrfloat

CCSD correlation correction

e_totfloat

Total CCSD energy (HF + correlation)

t1, t2 :

T amplitudes t1[i,a], t2[i,j,a,b] (i,j in occ, a,b in virt)

l1, l2 :

Lambda amplitudes l1[i,a], l2[i,j,a,b] (i,j in occ, a,b in virt)

pyscf.cc.FNOCCSD(mf, thresh=1e-06, pct_occ=None, nvir_act=None)

Frozen natural orbital CCSD

Attributes:
threshfloat

Threshold on NO occupation numbers. Default is 1e-6.

pct_occfloat

Percentage of total occupation number. Default is None. If present, overrides thresh.

pyscf.cc.GCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)
pyscf.cc.RCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)

restricted CCSD

Attributes:
verboseint

Print level. Default value equals to Mole.verbose

max_memoryfloat or int

Allowed memory in MB. Default value equals to Mole.max_memory

conv_tolfloat

converge threshold. Default is 1e-7.

conv_tol_normtfloat

converge threshold for norm(t1,t2). Default is 1e-5.

max_cycleint

max number of iterations. Default is 50.

diis_spaceint

DIIS space size. Default is 6.

diis_start_cycleint

The step to start DIIS. Default is 0.

iterative_dampingfloat

The self consistent damping parameter.

directbool

AO-direct CCSD. Default is False.

async_iobool

Allow for asynchronous function execution. Default is True.

incore_completebool

Avoid all I/O (also for DIIS). Default is False.

level_shiftfloat

A shift on virtual orbital energies to stablize the CCSD iteration

frozenint or list

If integer is given, the inner-most orbitals are frozen from CC amplitudes. Given the orbital indices (0-based) in a list, both occupied and virtual orbitals can be frozen in CC calculation.

>>> mol = gto.M(atom = 'H 0 0 0; F 0 0 1.1', basis = 'ccpvdz')
>>> mf = scf.RHF(mol).run()
>>> # freeze 2 core orbitals
>>> mycc = cc.CCSD(mf).set(frozen = 2).run()
>>> # freeze 2 core orbitals and 3 high lying unoccupied orbitals
>>> mycc.set(frozen = [0,1,16,17,18]).run()

Saved results

convergedbool

CCSD converged or not

e_corrfloat

CCSD correlation correction

e_totfloat

Total CCSD energy (HF + correlation)

t1, t2 :

T amplitudes t1[i,a], t2[i,j,a,b] (i,j in occ, a,b in virt)

l1, l2 :

Lambda amplitudes l1[i,a], l2[i,j,a,b] (i,j in occ, a,b in virt)

pyscf.cc.UCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None)