vayesta.core.fragmentation

Submodules

vayesta.core.fragmentation.cas

class vayesta.core.fragmentation.cas.CAS_Fragmentation(emb, add_symmetric=True, log=None)[source]

Bases: Fragmentation

Fragmentation into mean-field states.

name = 'CAS'
get_coeff()[source]

Return MO coefficients as “fragment” orbitals.

get_labels()[source]

Abstract method.

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

Convert a list of integer or strings to atom indices and symbols.

get_orbital_indices_labels(orbitals)[source]

Convert a list of integer or strings to orbital indices and labels.

add_cas_fragment(ncas, nelec, name=None, degen_tol=1e-08, **kwargs)[source]

Create a single fragment containing a CAS.

Parameters:
  • ncas (int) – Number of spatial orbitals within the fragment.

  • nelec (int) – Number of electrons within the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the orbital indices. Default: None.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

class vayesta.core.fragmentation.cas.CAS_Fragmentation_UHF(emb, add_symmetric=True, log=None)[source]

Bases: Fragmentation_UHF, CAS_Fragmentation

get_labels()[source]

Abstract method.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_cas_fragment(ncas, nelec, name=None, degen_tol=1e-08, **kwargs)

Create a single fragment containing a CAS.

Parameters:
  • ncas (int) – Number of spatial orbitals within the fragment.

  • nelec (int) – Number of electrons within the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the orbital indices. Default: None.

add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(*args, **kwargs)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_coeff()

Return MO coefficients as “fragment” orbitals.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
name = 'CAS'
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

vayesta.core.fragmentation.fragmentation

vayesta.core.fragmentation.fragmentation.check_orthonormal(log, mo_coeff, ovlp, mo_name='orbital', tol=1e-07)[source]

Check orthonormality of mo_coeff.

Supports both RHF and UHF.

class vayesta.core.fragmentation.fragmentation.Fragmentation(emb, add_symmetric=True, log=None)[source]

Bases: object

Fragmentation for a quantum embedding method class.

name = '<not set>'
kernel()[source]
add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)[source]

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)[source]
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)[source]

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_all_atomic_fragments(**kwargs)[source]

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_full_system(name='full-system', **kwargs)[source]
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')[source]
inversion_symmetry(center=(0, 0, 0), unit='Ang')[source]
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')[source]
secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')[source]
property mf
property mol
property nao
property nmo
get_ovlp()[source]
property mo_coeff
property mo_occ
get_coeff()[source]

Abstract method.

get_labels()[source]

Abstract method.

search_labels(labels)[source]

Abstract method.

get_atoms()[source]

Get the base atom for each fragment orbital.

symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)[source]

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)[source]
get_atom_indices_symbols(atoms)[source]

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)[source]

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_orbital_indices_labels(orbitals)[source]

Convert a list of integer or strings to orbital indices and labels.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)[source]
get_frag_coeff(indices)[source]

Get fragment coefficients for a given set of orbital indices.

get_env_coeff(indices)[source]

Get environment coefficients for a given set of orbital indices.

vayesta.core.fragmentation.helper

vayesta.core.fragmentation.helper.log_orbitals(logger, labels, ncol=8)[source]

vayesta.core.fragmentation.iao

vayesta.core.fragmentation.iao.get_default_minao(basis)[source]
class vayesta.core.fragmentation.iao.IAO_Fragmentation(*args, minao='auto', **kwargs)[source]

Bases: Fragmentation

name = 'IAO'
property n_iao
get_coeff(mo_coeff=None, mo_occ=None, add_virtuals=True)[source]

Make intrinsic atomic orbitals (IAOs).

Returns:

c_iao – Orthonormalized IAO coefficients.

Return type:

(n(AO), n(IAO)) array

check_nelectron(c_iao, mo_coeff, mo_occ)[source]
get_labels()[source]

Get labels of IAOs.

Returns:

iao_labels – Orbital label (atom-id, atom symbol, nl string, m string) for each IAO.

Return type:

list of length nIAO

search_labels(labels)[source]

Abstract method.

get_virtual_coeff(c_iao, mo_coeff=None)[source]
add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

class vayesta.core.fragmentation.iao.IAO_Fragmentation_UHF(*args, minao='auto', **kwargs)[source]

Bases: Fragmentation_UHF, IAO_Fragmentation

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_nelectron(c_iao, mo_coeff, mo_occ)
check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_coeff(mo_coeff=None, mo_occ=None, add_virtuals=True)[source]

Abstract method.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_labels()

Get labels of IAOs.

Returns:

iao_labels – Orbital label (atom-id, atom symbol, nl string, m string) for each IAO.

Return type:

list of length nIAO

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
get_virtual_coeff(c_iao, mo_coeff=None)
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property n_iao
name = 'IAO'
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

vayesta.core.fragmentation.iaopao

class vayesta.core.fragmentation.iaopao.IAOPAO_Fragmentation(*args, **kwargs)[source]

Bases: IAO_Fragmentation

name = 'IAO/PAO'
get_pao_coeff(iao_coeff)[source]
get_coeff(order=None)[source]

Make projected atomic orbitals (PAOs).

get_labels(order=None)[source]

Get labels of IAOs.

Returns:

iao_labels – Orbital label (atom-id, atom symbol, nl string, m string) for each IAO.

Return type:

list of length nIAO

search_labels(labels)[source]

Abstract method.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_nelectron(c_iao, mo_coeff, mo_occ)
check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
get_virtual_coeff(c_iao, mo_coeff=None)
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property n_iao
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

class vayesta.core.fragmentation.iaopao.IAOPAO_Fragmentation_UHF(*args, **kwargs)[source]

Bases: IAOPAO_Fragmentation, IAO_Fragmentation_UHF

get_coeff(order=None)[source]

Make projected atomic orbitals (PAOs).

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_nelectron(c_iao, mo_coeff, mo_occ)
check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_labels(order=None)

Get labels of IAOs.

Returns:

iao_labels – Orbital label (atom-id, atom symbol, nl string, m string) for each IAO.

Return type:

list of length nIAO

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
get_pao_coeff(iao_coeff)
get_virtual_coeff(c_iao, mo_coeff=None)
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property n_iao
name = 'IAO/PAO'
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

vayesta.core.fragmentation.sao

class vayesta.core.fragmentation.sao.SAO_Fragmentation(emb, add_symmetric=True, log=None)[source]

Bases: Fragmentation

name = 'SAO'
get_coeff()[source]

Abstract method.

get_labels()[source]

Abstract method.

search_labels(labels)[source]

Abstract method.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

class vayesta.core.fragmentation.sao.SAO_Fragmentation_UHF(emb, add_symmetric=True, log=None)[source]

Bases: Fragmentation_UHF, SAO_Fragmentation

get_coeff()[source]

Abstract method.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_labels()

Abstract method.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
name = 'SAO'
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

vayesta.core.fragmentation.site

class vayesta.core.fragmentation.site.Site_Fragmentation(emb, add_symmetric=True, log=None)[source]

Bases: SAO_Fragmentation

name = 'Site'
add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_coeff()

Abstract method.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_labels()

Abstract method.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

class vayesta.core.fragmentation.site.Site_Fragmentation_UHF(emb, add_symmetric=True, log=None)[source]

Bases: SAO_Fragmentation_UHF

name = 'Site'
add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_coeff()

Abstract method.

get_env_coeff(indices)

Get environment coefficients for a given set of orbital indices.

get_frag_coeff(indices)

Get fragment coefficients for a given set of orbital indices.

get_labels()

Abstract method.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
property nao
property nmo
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

vayesta.core.fragmentation.ufragmentation

class vayesta.core.fragmentation.ufragmentation.Fragmentation_UHF(emb, add_symmetric=True, log=None)[source]

Bases: Fragmentation

Fragmentation for unrestricted HF.

property nmo
get_frag_coeff(indices)[source]

Get fragment coefficients for a given set of orbital indices.

get_env_coeff(indices)[source]

Get environment coefficients for a given set of orbital indices.

add_all_atomic_fragments(**kwargs)

Create a single fragment for each atom in the system.

Parameters:

**kwargs – Additional keyword arguments are passed through to each fragment constructor.

add_atomic_fragment(atoms, orbital_filter=None, name=None, **kwargs)

Create a fragment of one or multiple atoms, which will be solved by the embedding method.

Parameters:
  • atoms (int, str, list[int], or list[str]) – Atom indices or symbols which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen atoms. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

add_atomshell_fragment(atoms, shells, **kwargs)
add_full_system(name='full-system', **kwargs)
add_orbital_fragment(orbitals, atom_filter=None, name=None, **kwargs)

Create a fragment of one or multiple orbitals, which will be solved by the embedding method.

Parameters:
  • orbitals (int, str, list[int], or list[str]) – Orbital indices or labels which should be included in the fragment.

  • name (str, optional) – Name for the fragment. If None, a name is automatically generated from the chosen orbitals. Default: None.

  • **kwargs – Additional keyword arguments are passed through to the fragment constructor.

Returns:

Fragment object.

Return type:

Fragment

check_orthonormal(mo_coeff, mo_name=None, tol=1e-07)
get_atom_indices_symbols(atoms)

Convert a list of integer or strings to atom indices and symbols.

get_atomic_fragment_indices(atoms, orbital_filter=None, name=None)

Get fragment indices for one atom or a set of atoms.

Parameters:
  • atoms (list or int or str) – List of atom IDs or labels. For a single atom, a single integer or string can be passed as well.

  • orbital_filter (list, optional) – Additionally restrict fragment orbitals to a specific orbital type (e.g. ‘2p’). Default: None.

  • name (str, optional) – Name for fragment.

Returns:

  • name (str) – Name of fragment.

  • indices (list) – List of fragment orbitals indices, with coefficients corresponding to self.coeff[:,indices].

get_atoms()

Get the base atom for each fragment orbital.

get_coeff()

Abstract method.

get_labels()

Abstract method.

get_orbital_fragment_indices(orbitals, atom_filter=None, name=None)
get_orbital_indices_labels(orbitals)

Convert a list of integer or strings to orbital indices and labels.

get_ovlp()
inversion_symmetry(center=(0, 0, 0), unit='Ang')
kernel()
property mf
mirror_symmetry(axis, center=(0, 0, 0), unit='Ang')
property mo_coeff
property mo_occ
property mol
name = '<not set>'
property nao
rotational_symmetry(order, axis, center=(0, 0, 0), unit='Ang')
search_labels(labels)

Abstract method.

secondary_fragments(bno_threshold=None, bno_threshold_factor=0.1, solver='MP2')
symmetric_orth(mo_coeff, ovlp=None, tol=1e-15)

Use as mo_coeff = np.dot(mo_coeff, x) to get orthonormal orbitals.

Module contents

vayesta.core.fragmentation.SAO_Fragmentation(emb, *args, **kwargs)[source]
vayesta.core.fragmentation.Site_Fragmentation(emb, *args, **kwargs)[source]
vayesta.core.fragmentation.IAO_Fragmentation(emb, *args, **kwargs)[source]
vayesta.core.fragmentation.IAOPAO_Fragmentation(emb, *args, **kwargs)[source]
vayesta.core.fragmentation.CAS_Fragmentation(emb, *args, **kwargs)[source]