vayesta.solver

Subpackages

Submodules

vayesta.solver.ccsd

class vayesta.solver.ccsd.CCSD_Solver(*args, **kwargs)[source]

Bases: ClusterSolver

class Options(max_cycle: int = 100, conv_tol: float = None, conv_tol_normt: float = None, init_guess: str = 'MP2', sc_mode: int = None, dm_with_frozen: bool = False, tcc: bool = False, tcc_fci_opts: dict = <factory>, c_cas_occ: <built-in function array> = None, c_cas_vir: <built-in function array> = None, tailoring: bool = False, solve_lambda: bool = True)[source]

Bases: Options

max_cycle: int = 100
conv_tol: float = None
conv_tol_normt: float = None
init_guess: str = 'MP2'
sc_mode: int = None
dm_with_frozen: bool = False
tcc: bool = False
tcc_fci_opts: dict
c_cas_occ: array = None
c_cas_vir: array = None
tailoring: bool = False
solve_lambda: bool = True
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
get_solver_class()[source]
get_cisd_solver()[source]
reset()[source]
get_eris()[source]
get_init_guess(eris=None)[source]
add_screening(*args, **kwargs)[source]
add_potential(eris, v_ext)[source]
kernel(t1=None, t2=None, eris=None, l1=None, l2=None, seris_ov=None, coupled_fragments=None, t_diagnostic=True)[source]
Parameters:
  • t1 (array, optional) – Initial guess for T1 amplitudes. Default: None.

  • t2 (array, optional) – Initial guess for T2 amplitudes. Default: None.

  • l1 (array, optional) – Initial guess for L1 amplitudes. Default: None.

  • l2 (array, optional) – Initial guess for L2 amplitudes. Default: None.

t_diagnostic()[source]
set_callback(callback)[source]
couple_iterations(fragments)[source]
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property spinsym
class vayesta.solver.ccsd.UCCSD_Solver(*args, **kwargs)[source]

Bases: CCSD_Solver

get_solver_class()[source]
get_cisd_solver()[source]
get_c2(intermed_norm=True)[source]

C2 in intermediate normalization.

add_screening(eris, seris_ov)[source]
t_diagnostic()[source]

T diagnostic not implemented for UCCSD in PySCF.

class Options(max_cycle: int = 100, conv_tol: float = None, conv_tol_normt: float = None, init_guess: str = 'MP2', sc_mode: int = None, dm_with_frozen: bool = False, tcc: bool = False, tcc_fci_opts: dict = <factory>, c_cas_occ: <built-in function array> = None, c_cas_vir: <built-in function array> = None, tailoring: bool = False, solve_lambda: bool = True)

Bases: Options

asdict(deepcopy=False)
c_cas_occ: array = None
c_cas_vir: array = None
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = None
conv_tol_normt: float = None
static dict_with_defaults(**kwargs)
dm_with_frozen: bool = False
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'MP2'
items()
keys()
max_cycle: int = 100
replace(**kwargs)
sc_mode: int = None
solve_lambda: bool = True
tailoring: bool = False
tcc: bool = False
update(**kwargs)
values()
tcc_fci_opts: dict
add_potential(eris, v_ext)
property base

Remove fragment/embedding dependence…?

Type:

TODO

couple_iterations(fragments)
get_eris()
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_init_guess(eris=None)
property is_rhf
property is_uhf
kernel(t1=None, t2=None, eris=None, l1=None, l2=None, seris_ov=None, coupled_fragments=None, t_diagnostic=True)
Parameters:
  • t1 (array, optional) – Initial guess for T1 amplitudes. Default: None.

  • t2 (array, optional) – Initial guess for T2 amplitudes. Default: None.

  • l1 (array, optional) – Initial guess for L1 amplitudes. Default: None.

  • l2 (array, optional) – Initial guess for L2 amplitudes. Default: None.

make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
set_callback(callback)
property spinsym

vayesta.solver.cisd

class vayesta.solver.cisd.CISD_Solver(*args, **kwargs)[source]

Bases: CCSD_Solver

kernel(eris=None)[source]
Parameters:
  • t1 (array, optional) – Initial guess for T1 amplitudes. Default: None.

  • t2 (array, optional) – Initial guess for T2 amplitudes. Default: None.

  • l1 (array, optional) – Initial guess for L1 amplitudes. Default: None.

  • l2 (array, optional) – Initial guess for L2 amplitudes. Default: None.

get_solver_class()[source]
get_t1()[source]
get_t2()[source]
get_c1(intermed_norm=False)[source]
get_c2(intermed_norm=False)[source]
get_l1(**kwargs)[source]
get_l2(**kwargs)[source]
get_init_guess()[source]
make_rdm1(*args, **kwargs)[source]

To support DMET.

make_rdm2(*args, **kwargs)[source]

To support DMET.

class Options(max_cycle: int = 100, conv_tol: float = None, conv_tol_normt: float = None, init_guess: str = 'MP2', sc_mode: int = None, dm_with_frozen: bool = False, tcc: bool = False, tcc_fci_opts: dict = <factory>, c_cas_occ: <built-in function array> = None, c_cas_vir: <built-in function array> = None, tailoring: bool = False, solve_lambda: bool = True)

Bases: Options

asdict(deepcopy=False)
c_cas_occ: array = None
c_cas_vir: array = None
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = None
conv_tol_normt: float = None
static dict_with_defaults(**kwargs)
dm_with_frozen: bool = False
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'MP2'
items()
keys()
max_cycle: int = 100
replace(**kwargs)
sc_mode: int = None
solve_lambda: bool = True
tailoring: bool = False
tcc: bool = False
update(**kwargs)
values()
tcc_fci_opts: dict
add_potential(eris, v_ext)
add_screening(*args, **kwargs)
property base

Remove fragment/embedding dependence…?

Type:

TODO

couple_iterations(fragments)
get_cisd_solver()
get_eris()
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
set_callback(callback)
property spinsym
t_diagnostic()
class vayesta.solver.cisd.UCISD_Solver(*args, **kwargs)[source]

Bases: CISD_Solver

get_solver_class()[source]
get_t2()[source]
get_c1(intermed_norm=False)[source]
get_c2(intermed_norm=False)[source]
class Options(max_cycle: int = 100, conv_tol: float = None, conv_tol_normt: float = None, init_guess: str = 'MP2', sc_mode: int = None, dm_with_frozen: bool = False, tcc: bool = False, tcc_fci_opts: dict = <factory>, c_cas_occ: <built-in function array> = None, c_cas_vir: <built-in function array> = None, tailoring: bool = False, solve_lambda: bool = True)

Bases: Options

asdict(deepcopy=False)
c_cas_occ: array = None
c_cas_vir: array = None
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = None
conv_tol_normt: float = None
static dict_with_defaults(**kwargs)
dm_with_frozen: bool = False
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'MP2'
items()
keys()
max_cycle: int = 100
replace(**kwargs)
sc_mode: int = None
solve_lambda: bool = True
tailoring: bool = False
tcc: bool = False
update(**kwargs)
values()
tcc_fci_opts: dict
add_potential(eris, v_ext)
add_screening(*args, **kwargs)
property base

Remove fragment/embedding dependence…?

Type:

TODO

couple_iterations(fragments)
get_cisd_solver()
get_eris()
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_init_guess()
get_l1(**kwargs)
get_l2(**kwargs)
get_t1()
property is_rhf
property is_uhf
kernel(eris=None)
Parameters:
  • t1 (array, optional) – Initial guess for T1 amplitudes. Default: None.

  • t2 (array, optional) – Initial guess for T2 amplitudes. Default: None.

  • l1 (array, optional) – Initial guess for L1 amplitudes. Default: None.

  • l2 (array, optional) – Initial guess for L2 amplitudes. Default: None.

make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
set_callback(callback)
property spinsym
t_diagnostic()

vayesta.solver.coupling

vayesta.solver.coupling.transform_amplitude(t, u_occ, u_vir, u_occ2=None, u_vir2=None, spinsym='restricted', inverse=False)[source]

u: (old basis|new basis)

vayesta.solver.coupling.couple_ccsd_iterations(solver, fragments)[source]

Requires MPI.

vayesta.solver.coupling.tailor_with_fragments(solver, fragments, project=False, tailor_t1=True, tailor_t2=True, ovlp_tol=1e-06)[source]

Tailor current CCSD calculation with amplitudes of other fragments.

This assumes orthogonal fragment spaces.

Parameters:
  • mode (int, optional) –

    Level of external correction of T2 amplitudes: 1: Both occupied indices are projected to each other fragment X. 2: Both occupied indices are projected to each other fragment X

    and combinations of other fragments X,Y.

    3: Only the first occupied indices is projected to each other fragment X.

  • coupled_fragments (list, optional) – List of fragments, which are used for the external correction. Each fragment x must have the following attributes defined: c_active_occ : Active occupied MO orbitals of fragment x c_active_vir : Active virtual MO orbitals of fragment x results.t1 : T1 amplitudes of fragment x results.t2 : T2 amplitudes of fragment x

Returns:

tailor_func – Tailoring function for CCSD.

Return type:

function(cc, t1, t2) -> t1, t2

vayesta.solver.dump

class vayesta.solver.dump.DumpSolver(mf, fragment, cluster, log=None, **kwargs)[source]

Bases: ClusterSolver

class Options(filename: str = None)[source]

Bases: Options

filename: str = None
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
kernel(*args, eris=None, **kwargs)[source]
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
property spinsym

vayesta.solver.ebccsd

class vayesta.solver.ebccsd.EBCCSD_Solver(*args, **kwargs)[source]

Bases: EBClusterSolver

class Options(polaritonic_shift: bool = True, rank: tuple = (2, 1, 1))[source]

Bases: Options

rank: tuple = (2, 1, 1)
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
polaritonic_shift: bool = True
replace(**kwargs)
update(**kwargs)
values()
property ncas
property nelec
property nbos
get_eris()[source]
get_input(eris=None)[source]
kernel(eris=None)[source]

Run FCI kernel.

get_ghf_to_uhf_indices()[source]
make_rdm1()[source]

To support DMET.

make_rdm2()[source]

To support DMET.

make_rdm12()[source]
make_dd_moms(max_mom, coeffs=None)[source]
make_rdm_eb()[source]

P[p,q,b] corresponds to <0|b^+ p^+ q|0>.

property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eb_dm_polaritonic_shift()
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_polaritonic_shift(freqs, couplings)
property is_rhf
property is_uhf
property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property polaritonic_shift
reset()
property spinsym
class vayesta.solver.ebccsd.UEBCCSD_Solver(*args, **kwargs)[source]

Bases: EBCCSD_Solver

get_eris()[source]
get_input(eris=None)[source]
get_ghf_to_uhf_indices()[source]
make_rdm1()[source]

To support DMET.

make_rdm2()[source]

To support DMET.

class Options(polaritonic_shift: bool = True, rank: tuple = (2, 1, 1))

Bases: Options

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
polaritonic_shift: bool = True
rank: tuple = (2, 1, 1)
replace(**kwargs)
update(**kwargs)
values()
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eb_dm_polaritonic_shift()
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_polaritonic_shift(freqs, couplings)
property is_rhf
property is_uhf
kernel(eris=None)

Run FCI kernel.

make_dd_moms(max_mom, coeffs=None)
make_rdm12()
make_rdm_eb()

P[p,q,b] corresponds to <0|b^+ p^+ q|0>.

property mol
property nbos
property ncas
property nelec
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property polaritonic_shift
reset()
property spinsym

vayesta.solver.ebfci

class vayesta.solver.ebfci.EBFCI_Solver(*args, **kwargs)[source]

Bases: FCI_Solver, EBClusterSolver

class Options(threads: int = 1, max_cycle: int = 300, lindep: float = None, conv_tol: float = None, solver_spin: bool = True, fix_spin: bool = True, fix_spin_value: float = None, fix_spin_penalty: float = 1.0, davidson_only: bool = True, init_guess: str = 'default', init_guess_noise: float = 1e-05, polaritonic_shift: bool = True, max_boson_occ: int = 2)[source]

Bases: Options, Options

conv_tol: float = None
max_boson_occ: int = 2
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
davidson_only: bool = True
static dict_with_defaults(**kwargs)
fix_spin: bool = True
fix_spin_penalty: float = 1.0
fix_spin_value: float = None
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'default'
init_guess_noise: float = 1e-05
items()
keys()
lindep: float = None
max_cycle: int = 300
polaritonic_shift: bool = True
replace(**kwargs)
solver_spin: bool = True
threads: int = 1
update(**kwargs)
values()
get_solver_class()[source]
property nbos
kernel(ci0=None, eris=None)[source]

Run FCI kernel.

make_rdm1(civec=None)[source]

To support DMET.

make_rdm12(civec=None)[source]
make_rdm2(civec=None)[source]

To support DMET.

make_dd_moms(max_mom, coeffs=None, civec=None, eris=None)[source]
make_rdm_eb(civec=None)[source]

P[p,q,b] corresponds to <0|b^+ p^+ q|0>.

property base

Remove fragment/embedding dependence…?

Type:

TODO

cisd_solver

alias of CISD_Solver

get_c1(intermed_norm=False)
get_c2(intermed_norm=False)
get_cisd_amps(civec, intermed_norm=False)
get_cisd_init_guess()
get_eb_dm_polaritonic_shift()
get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_init_guess()
get_l1(**kwargs)
get_l2(**kwargs)
get_polaritonic_shift(freqs, couplings)
get_t1()
get_t2()
property is_rhf
property is_uhf
property mol
property ncas
property nelec
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property polaritonic_shift
reset()
property spinsym
class vayesta.solver.ebfci.UEBFCI_Solver(*args, **kwargs)[source]

Bases: EBFCI_Solver, UFCI_Solver

kernel(ci0=None, eris=None)[source]

Run FCI kernel.

make_rdm1(civec=None)[source]

To support DMET.

make_rdm12(civec=None)[source]
make_rdm2(civec=None)[source]

To support DMET.

make_dd_moms(max_mom, coeffs, civec=None, eris=None)[source]
make_rdm_eb(civec=None)[source]

P[p,q,b] corresponds to <0|b^+ p^+ q|0>.

class Options(threads: int = 1, max_cycle: int = 300, lindep: float = None, conv_tol: float = None, solver_spin: bool = True, fix_spin: bool = True, fix_spin_value: float = None, fix_spin_penalty: float = 1.0, davidson_only: bool = True, init_guess: str = 'default', init_guess_noise: float = 1e-05, polaritonic_shift: bool = True, max_boson_occ: int = 2)

Bases: Options, Options

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = None
davidson_only: bool = True
static dict_with_defaults(**kwargs)
fix_spin: bool = True
fix_spin_penalty: float = 1.0
fix_spin_value: float = None
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'default'
init_guess_noise: float = 1e-05
items()
keys()
lindep: float = None
max_boson_occ: int = 2
max_cycle: int = 300
polaritonic_shift: bool = True
replace(**kwargs)
solver_spin: bool = True
threads: int = 1
update(**kwargs)
values()
property base

Remove fragment/embedding dependence…?

Type:

TODO

cisd_solver

alias of UCISD_Solver

get_c1(intermed_norm=False)
get_c2(intermed_norm=False)
get_cisd_amps(civec, intermed_norm=False)
get_cisd_init_guess()

Remove once PySCF PR #1450 is accepted.

get_eb_dm_polaritonic_shift()
get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_init_guess()
get_l1(**kwargs)
get_l2(**kwargs)
get_polaritonic_shift(freqs, couplings)
get_solver_class()
get_t1()
get_t2()
property is_rhf
property is_uhf
property mol
property nbos
property ncas
property nelec
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property polaritonic_shift
reset()
property spinsym

vayesta.solver.fci

class vayesta.solver.fci.FCI_Solver(*args, **kwargs)[source]

Bases: ClusterSolver

class Options(threads: int = 1, max_cycle: int = 300, lindep: float = None, conv_tol: float = 1e-12, solver_spin: bool = True, fix_spin: bool = True, fix_spin_value: float = None, fix_spin_penalty: float = 1.0, davidson_only: bool = True, init_guess: str = 'default', init_guess_noise: float = 1e-05)[source]

Bases: Options

threads: int = 1
max_cycle: int = 300
lindep: float = None
conv_tol: float = 1e-12
solver_spin: bool = True
fix_spin: bool = True
fix_spin_value: float = None
fix_spin_penalty: float = 1.0
davidson_only: bool = True
init_guess: str = 'default'
init_guess_noise: float = 1e-05
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
cisd_solver

alias of CISD_Solver

get_solver_class()[source]
reset()[source]
property ncas
property nelec
get_init_guess()[source]
get_t1()[source]
get_t2()[source]
get_c1(intermed_norm=False)[source]
get_c2(intermed_norm=False)[source]
get_l1(**kwargs)[source]
get_l2(**kwargs)[source]
get_cisd_init_guess()[source]
kernel(ci0=None, eris=None, seris_ov=None)[source]

Run FCI kernel.

get_cisd_amps(civec, intermed_norm=False)[source]
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property spinsym
class vayesta.solver.fci.UFCI_Solver(*args, **kwargs)[source]

Bases: FCI_Solver

FCI with UHF orbitals.

class Options(threads: int = 1, max_cycle: int = 300, lindep: float = None, conv_tol: float = 1e-12, solver_spin: bool = True, fix_spin: bool = False, fix_spin_value: float = None, fix_spin_penalty: float = 1.0, davidson_only: bool = True, init_guess: str = 'default', init_guess_noise: float = 1e-05)[source]

Bases: Options

fix_spin: bool = False
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
conv_tol: float = 1e-12
davidson_only: bool = True
static dict_with_defaults(**kwargs)
fix_spin_penalty: float = 1.0
fix_spin_value: float = None
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
init_guess: str = 'default'
init_guess_noise: float = 1e-05
items()
keys()
lindep: float = None
max_cycle: int = 300
replace(**kwargs)
solver_spin: bool = True
threads: int = 1
update(**kwargs)
values()
cisd_solver

alias of UCISD_Solver

property ncas
property nelec
get_solver_class()[source]
get_t2()[source]
get_c1(intermed_norm=False)[source]
get_c2(intermed_norm=False)[source]
get_cisd_init_guess()[source]

Remove once PySCF PR #1450 is accepted.

get_cisd_amps(civec, intermed_norm=False)[source]
make_rdm1(civec=None)[source]

To support DMET.

make_rdm12(civec=None)[source]
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_init_guess()
get_l1(**kwargs)
get_l2(**kwargs)
get_t1()
property is_rhf
property is_uhf
kernel(ci0=None, eris=None, seris_ov=None)

Run FCI kernel.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
property spinsym

vayesta.solver.mp2

class vayesta.solver.mp2.MP2_Solver(*args, **kwargs)[source]

Bases: ClusterSolver

reset()[source]
get_t1()[source]
get_c1(intermed_norm=True)[source]
get_t2()[source]
get_c2(intermed_norm=True)[source]

C2 in intermediate normalization.

get_eris()[source]
get_cderi()[source]
get_mo_energy(fock=None)[source]
make_t2(mo_energy, eris=None, cderi=None, cderi_neg=None, blksize=None)[source]

Make T2 amplitudes

kernel(eris=None)[source]
class Options

Bases: OptionsBase

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

property spinsym
class vayesta.solver.mp2.UMP2_Solver(*args, **kwargs)[source]

Bases: MP2_Solver

get_eris()[source]
get_cderi()[source]
get_mo_energy(fock=None)[source]
make_t2(mo_energy, eris=None, cderi=None, cderi_neg=None, blksize=None, workmem=1000000000)[source]

Make T2 amplitudes

class Options

Bases: OptionsBase

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_c1(intermed_norm=True)
get_c2(intermed_norm=True)

C2 in intermediate normalization.

get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
get_t1()
get_t2()
property is_rhf
property is_uhf
kernel(eris=None)
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
property spinsym

vayesta.solver.solver

class vayesta.solver.solver.ClusterSolver(mf, fragment, cluster, log=None, **kwargs)[source]

Bases: object

Base class for cluster solver

class Options[source]

Bases: OptionsBase

asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
property base

Remove fragment/embedding dependence…?

Type:

TODO

property is_rhf
property is_uhf
property spinsym
property mol
get_hcore()[source]
get_fock()[source]
get_heff(eris, fock=None, with_vext=True)[source]
get_eris(*args, **kwargs)[source]
reset()[source]
make_rdm1(*args, **kwargs)[source]

To support DMET.

make_rdm2(*args, **kwargs)[source]

To support DMET.

optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)[source]

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

class vayesta.solver.solver.EBClusterSolver(mf, fragment, cluster, log=None, **kwargs)[source]

Bases: ClusterSolver

class Options(polaritonic_shift: bool = True)[source]

Bases: Options

polaritonic_shift: bool = True
asdict(deepcopy=False)
classmethod change_dict_defaults(field, **kwargs)
static dict_with_defaults(**kwargs)
get(attr, default=None)

Dictionary-like access to attributes. Allows the definition of a default value, of the attribute is not present.

classmethod get_default(field)
classmethod get_default_factory(field)
items()
keys()
replace(**kwargs)
update(**kwargs)
values()
property polaritonic_shift
get_polaritonic_shift(freqs, couplings)[source]
get_eb_dm_polaritonic_shift()[source]
property base

Remove fragment/embedding dependence…?

Type:

TODO

get_eris(*args, **kwargs)
get_fock()
get_hcore()
get_heff(eris, fock=None, with_vext=True)
property is_rhf
property is_uhf
make_rdm1(*args, **kwargs)

To support DMET.

make_rdm2(*args, **kwargs)

To support DMET.

property mol
optimize_cpt(nelectron, c_frag, cpt_guess=0, atol=1e-06, rtol=1e-06, cpt_radius=0.5)

Enables chemical potential optimization to match a number of electrons in the fragment space.

Parameters:
  • nelectron (float) – Target number of electrons.

  • c_frag (array) – Fragment orbitals.

  • cpt_guess (float, optional) – Initial guess for fragment chemical potential. Default: 0.

  • atol (float, optional) – Absolute electron number tolerance. Default: 1e-6.

  • rtol (float, optional) – Relative electron number tolerance. Default: 1e-6

  • cpt_radius (float, optional) – Search radius for chemical potential. Default: 0.5.

Returns:

Solver results.

Return type:

results

reset()
property spinsym

vayesta.solver.tccsd

vayesta.solver.tccsd.make_cas_tcc_function(solver, c_cas_occ, c_cas_vir, eris)[source]

Make tailor function for Tailored CC.

Module contents

vayesta.solver.is_uhf(mf)[source]
vayesta.solver.get_solver_class(mf, solver)[source]