Bonding
get_molecule_ids(bonds, n_atoms)
¶
Deterministic molecule IDs based on covalent bonding. IDs are assigned based on the following rules:
- The largest molecules get the lowest IDs.
- Tie breakers for atoms with the same number of atoms is done by the lowest atom index contained within the molecule getting lower IDs.
| PARAMETER | DESCRIPTION |
|---|---|
|
A 2D numpy array where each row represents a bond [atom_index_0, atom_index_1].
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
|
A 1D numpy array where each element at index |