quemb.molbe.chemfrag.PurelyStructureFragmented

class quemb.molbe.chemfrag.PurelyStructureFragmented(*, mol, motifs_per_frag, centers_per_frag, edges_per_frag, origin_per_frag, atoms_per_frag, frag_idx_per_edge, conn_data, n_BE)

Data structure to store the fragments of a molecule.

This takes into account only the connectivity data and the fragmentation scheme but is independent of the basis sets or the electronic structure.

Attributes

mol: Final[Mole]

The full molecule

motifs_per_frag: Final[Sequence[OrderedSet[NewType(MotifIdx, NewType(AtomIdx, int))]]]

The motifs per fragment. Note that the full set of motifs for a fragment is the union of all center motifs and edge motifs. The order is guaranteed to be first origin, centers, then edges and in each category the motif index is ascending.

centers_per_frag: Final[Sequence[OrderedSet[NewType(CenterIdx, NewType(MotifIdx, NewType(AtomIdx, int)))]]]

The centers per fragment. Note that the set of centers is the complement of the edges. The order is guaranteed to be ascending.

edges_per_frag: Final[Sequence[OrderedSet[NewType(EdgeIdx, NewType(MotifIdx, NewType(AtomIdx, int)))]]]

The edges per fragment. Note that the set of edges is the complement of the centers. The order is guaranteed to be ascending.

origin_per_frag: Final[Sequence[OrderedSet[NewType(OriginIdx, NewType(CenterIdx, NewType(MotifIdx, NewType(AtomIdx, int))))]]]

The origins per frag. Note that for “normal” BE calculations there is exacctly one origin per fragment, i.e. the SeqOverFrag has one element. The order is guaranteed to be ascending.

atoms_per_frag: Final[Sequence[OrderedSet[NewType(AtomIdx, int)]]]

The atom indices per fragment. it contains both motif and hydrogen indices. The order of the motifs is the same as in motifs_per_frag. The hydrogen atoms directly follow the motif to which they are attached, and are then ascendingly sorted. To given an example: if 1 and 4 are motif indices and hydrogen atoms 5, 6 are connected to 1, while hydrogen atoms 2, 3 are connected to 4, then the order is: [1, 5, 6, 4, 2, 3].

frag_idx_per_edge: Final[Sequence[Mapping[NewType(EdgeIdx, NewType(MotifIdx, NewType(AtomIdx, int))), NewType(FragmentIdx, int)]]]

For each edge in a fragment it points to the index of the fragment where this fragment is a center, i.e. where this edge is correctly described and should be matched against. Variable was formerly known as center.

conn_data: Final[BondConnectivity]

Connectivity data of the molecule.

n_BE: Final[int]

Methods

__init__(*, mol, motifs_per_frag, ...)

Method generated by attrs for class PurelyStructureFragmented.

from_conn_data(mol, conn_data, n_BE)

from_mole(mol, n_BE, *[, treat_H_different, ...])

Construct a PurelyStructureFragmented from a pyscf.gto.mole.Mole.

get_string()

Get a long string representation of the fragments.

is_ordered()

Return if self is ordered.

write_geom([prefix, dir])

Write the structures of the fragments to files.