Transition-metal coordination topology
compute_topology locates transition-metal centres and classifies the coordination geometry from the ligand direction vectors. It is a geometric screening tool: it does not assign oxidation states, bond orders or a full molecular graph.
Status. Implemented on the Rust, Python and WASM surfaces. There is no CLI command. The checked wrapper is the external-surface entry point.
Feature. Core.
Detection
For each transition-metal atom
Hydrogen is excluded as a ligand. The unit vectors from
flowchart LR
A[elements + finite 3N coords] --> B[Find transition-metal centres]
B --> C[Distance cutoff per ligand]
C --> D[Ligand direction vectors]
D --> E[Compare with ideal geometries]
E --> F[Best geometry + score + warnings]
API
let cisplatin = sci_form::compute_topology_checked(&elements, &positions)?;
for center in &cisplatin.metal_centers {
println!("{} Z={} CN={} {:?} score={:.3}",
center.atom_index, center.element, center.coordination_number,
center.geometry, center.geometry_score);
}| Surface | Entry point |
|---|---|
| Rust | compute_topology (infallible, tolerant), compute_topology_checked (validating) |
| Python | compute_topology(elements, coords) |
| WASM | compute_topology(elements_json, coords_json) |
| CLI | not exposed |
Python and WASM use compute_topology_checked: mismatched lengths, an empty geometry or non-finite coordinates are errors. The bare Rust compute_topology keeps its historical tolerant behaviour for callers that need to inspect partial data; new external code should use the checked wrapper.
Validation
| Gate | Observable | Result |
|---|---|---|
| Square planar | Cisplatin PtCl₂(NH₃)₂ | CN=4, square_planar |
| Octahedral | CrCl₆ model, 2.30 Å | CN=6, octahedral, score >0.8 |
| Tetrahedral | ZnCl₄ model, 2.25 Å | CN=4, tetrahedral |
| Serialization | TopologyAnalysisResult | stable JSON, geometry enum + CN |
| Invalid geometry | length mismatch, NaN, Z=0/119 | rejected by the checked wrapper |
| No metal | Organic molecule | empty centres + warning |
The classification score is a geometric match, not a quantum stability or spectroscopic assignment.
Limits
- Only transition metals listed by
eht::is_transition_metal. - Cutoff is covalent-radius based; unusual bond lengths can add or miss ligands.
- Ideal geometries are compared by direction, not by symmetry labels or Jahn–Teller distortions.
- No oxidation state, spin state, hapticity or bond-order assignment; see hapticity for ring hapticity.
- Hydrogen is never treated as a ligand.
- Mismatched inputs are tolerated by the bare Rust API; use the checked wrapper.