Skip to main content

connectivity()

The bonds of a species, from its interatomic distances.

Usage

Source

connectivity(geometry)

Two atoms are bonded within 1.05 times the larger of the sum of their covalent radii and the mean of their van der Waals radii. Then an atom with more bonds than its valence loses its longest ones. The excess and the neighbors are counted before any bond is removed, as in the old code.

Examples

    >>> import amchi
    >>> from types import SimpleNamespace
    >>> water = SimpleNamespace(
    ...     symbols=["O", "H", "H"],
    ...     coordinates=[[0, 0, 0], [0.96, 0, 0], [-0.24, 0.93, 0]],
    ... )
    >>> amchi.connectivity(water).bonds
((0, 1), (0, 2))