quemb.molbe.chemfrag.BondConnectivity.from_cell¶
- classmethod BondConnectivity.from_cell(cell, *, bonds_atoms=None, vdW_radius=None, h_treatment='treat_H_diff')¶
Create a
BondConnectivityfrom apyscf.pbc.gto.cell.Cell. This function considers the periodic boundary conditions by adding periodic copies of the cell to the molecule. The connectivity graph from the open boundary condition supercell is then used to determine the connectivity graph of the original periodic cell.- Parameters:
cell (
Cell) – Thepyscf.pbc.gto.cell.Cellto extract the connectivity data from.bonds_atoms (Mapping[int, OrderedSet[int]]) – Can be used to specify the connectivity graph of the molecule. Has exactly the same format as the output of
chemcoord.Cartesian.get_bonds(), which is called internally if this argument is not specified. Allows it to manually change the connectivity by modifying the output ofchemcoord.Cartesian.get_bonds(). The keyword is mutually exclusive withvdW_radius.vdW_radius (
int|float|floating|Callable[[int|float|floating],int|float|floating] |Mapping[str,int|float|floating] |None) –If
bonds_atomsisNone, then the connectivity graph is determined by the van der Waals radius of the atoms. It is possible to pass:a single number which is used as radius for all atoms,
a callable which is applied to all radii and can be used to e.g. scale via
lambda r: r * 1.1,a dictionary which maps the element symbol to the van der Waals radius, to change the radius of individual elements, e.g.
{"C": 1.5}.
The keyword is mutually exclusive with
bonds_atoms.h_treatment (
Literal['treat_H_diff','treat_H_like_heavy_atom','at_most_one_H']) –How do we treat the hydrogen atoms? Options include:
"treat_H_diff": Default, treating each H different from heavy atoms. Using the given vdW_radius to determine which H belong to which motif"treat_H_like_heavy_atom": Treating each H the same as the heavy atoms when determining fragments"at_most_one_H": Enforcing that each H can belong to at most one H, if a H is assigned to multiple motifs
- Return type:
Self