quemb.molbe.chemfrag.BondConnectivity.from_cell¶
- classmethod BondConnectivity.from_cell(cell, *, bonds_atoms=None, vdW_radius=None, treat_H_different=True)¶
Create a
BondConnectivity
from 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.Cell
to 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_atoms
isNone
, 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
.treat_H_different (
bool
) – If True, we treat hydrogen atoms differently from heavy atoms.
- Return type:
Self