quemb.molbe.chemfrag.Fragmented.from_mole

classmethod Fragmented.from_mole(mol, n_BE, *, treat_H_different=True, bonds_atoms=None, vdW_radius=None)

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

Parameters:
  • mol (Mole) – The pyscf.gto.mole.Mole to extract the connectivity data from.

  • n_BE (int) – The BE fragmentation level.

  • treat_H_different (bool) – If True, we treat hydrogen atoms differently from heavy atoms.

  • bonds_atoms (Mapping[int, set[int]] | None) – 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 of chemcoord.Cartesian.get_bonds(). The keyword is mutually exclusive with vdW_radius.

  • vdW_radius (Real | Callable[[Real], Real] | Mapping[str, Real] | None) –

    If bonds_atoms is None, 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.

Return type:

Self