Atom roles: donor / skeleton / substituent¶
cTopo assigns each atom a role relative to donor atoms:
- DONOR — atoms that coordinate to the metal (provided or inferred).
- SKELETON — connector atoms on donor–donor shortest paths.
- SUBSTITUENT — everything else.
For complexes an additional type exists:
- CENTER — metal atoms.
Why atom roles matter¶
Classic fingerprints treat all atoms equally. For coordination chemistry, the important question is often:
- Is diversity coming from the cage (skeleton/topology) or from substituent decoration?
Atom roles let you build descriptors that target:
- skeleton-only similarity,
- donor-environment similarity,
- substituent-only diversity,
- mixed “alpha-neighborhood” views around donors or skeleton.
Inspecting roles¶
from ctopo import ligand_from_smiles
lig = ligand_from_smiles("[NH2:1]CC[NH2:2]")
roles = {i: lig.G.nodes[i]["atom_type"] for i in lig.G.nodes}
# roles is keyed by atom index
print(roles)
Role-aware fingerprints (high level)¶
When building fingerprints you typically choose:
1) Graph view: ligand vs skeleton vs substituents
2) Bond mode: keep bond orders everywhere vs only in skeleton vs all-single
3) Emission regime: emit from all atoms vs only donors vs only skeleton, etc.
These knobs are meant to support ML feature engineering and interpretable clustering.
See the tutorials for concrete recipes.