update_with_covalent_bonds
go-to Fast Rust covalent bond assignment; prerequisite for most graph and aromatic routines.
analyze.update_with_covalent_bonds(
ase_atoms,
nlist=None,
*,
timeout=None,
skip_if_atoms_above=None,
neighbor_method=None,
)Compute covalent bonds using Rust (mgr_rust.covalent_bonds) — 100x+ faster than pymatgen.
For bonds crossing periodic boundaries, creates image atoms (copies of atoms across periodic boundaries) so that bond vectors don’t appear to wrap across the unit cell. The returned Atoms object includes these image atoms, and bond indices reference them.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ase_atoms | ASE Atoms object | required | |
| nlist | optional list of (i, j) neighbor pairs. If None, uses aabb_neighbors_on_atoms (env MOFOGRAPHY_BOND_NEIGHBORS=voronoi for legacy). | None |
Returns
| Name | Type | Description |
|---|---|---|
| ASE Atoms object with ‘covalent_bonds’ and ‘covalent_bond_orders’ in info. |