Skip to content

Search and ranking rules

Documentation · 简体中文 · Architecture overview

For a metal complex, MolGR first assigns a possible formal charge and number of unpaired electrons to each metal. Each combination of metal states sets two targets for the remaining ligands. The search reconstructs ligand graphs that meet these targets, then scores them with the metal assignments.

For a metal-free molecule, the input charge and multiplicity minus one are already the targets. Start at ligand preparation.

Rule index

Metal states set the ligand targets
Ligand preparation, seeds, and recovery layers
Resonance recovery
Local geometry and recovery eligibility
Additional local geometry constraints
Metal candidate scoring
Coordination restoration

Metal states set the ligand targets

Metal-state enumeration

The ligand charge q is the total charge minus the sum of metal formal charges. The ligand unpaired-electron target r is multiplicity minus one, minus the electrons already assigned as unpaired on the metals. Skip combinations with negative r.

In the neutral singlet JEGLOA example, Ru assigned +2 with no unpaired electrons leaves q = −2 and r = 0. The two chlorides each carry −1 in the reconstruction. Compare the JEGLOA graphs

Where do candidate metal states come from?

Open Babel identifies the metal atoms. MolGR tries preferred and alternative valences from element tables and estimates possible unpaired-electron counts from the surrounding donors. One valence paired with one such count defines a metal state.

Ligand reconstruction temporarily removes metals from the bonding graph but retains their elements, atom indices, and coordinates. Two metal assignments can therefore share a ligand graph and still receive independent scores.

How does the ligand field constrain spin?

Low-spin assignments pair more electrons. High-spin assignments leave more unpaired. MolGR estimates shell occupation for each element and valence. Transition-metal s and p electrons can fill the d shell up to ten. Covalent radii and coordination cutoffs identify nearby donor atoms. Halides contribute weak fields, O/S weak to intermediate, N intermediate, and neutral phosphines and carbon donors strong. Distances and coordination geometry adjust the estimate.

Ligand-field score Spin states tried
Below weak_field_threshold - field_ambiguity_margin High-spin end only
Above strong_field_threshold + field_ambiguity_margin Low-spin end only
Between those bounds, including equality Both ends, nearer end first

Square-planar d⁷, d⁸, and d⁹ centers have a separate geometry-specific low-spin rule.

How is the spin budget shared?

The spin budget is multiplicity minus one. A triplet gives a budget of two. Assigning one unpaired electron to a metal leaves one for the ligands. A combination assigning three to the metals is skipped immediately. For a singlet the budget is zero throughout. Identifying local radicals coupled to a singlet requires independent electronic-structure or experimental evidence.

Search-space compression

In a neutral, closed-shell bimetallic system, swapping +1 and +2 between the sites leaves the same ligand targets. Within a search layer, MolGR reconstructs that ligand pool once and checks each metal assignment against it.

Swapping +1 and +2 between metal sites A and B leaves ligand targets (−3, 0) in both rows.

When can metal combinations share a ligand search?

Pruning skips partial assignments that can no longer satisfy the input. Above the same-element count threshold, MolGR prioritizes identical states at those sites. For open-shell multimetal systems it groups assignments by priority and moves to a lower layer only if the entire preceding layer yields no scorable pair. It builds partial assignments for two halves of the metal list and joins compatible halves. Within one layer, equal q and equal r allow a shared ligand search.

Ligand preparation, seeds, and recovery layers

Each set of ligand coordinates and targets (q, r) defines one organic reconstruction problem. A seed is a starting graph with provisional bond orders and electronic assignments. Metal coordinates remain available even while the ligand graph contains no metals.

Why distinguish the inner and outer spheres?

Ligand reconstruction runs before metal–ligand bonds are assigned. To decide where a metal might influence a local charge assignment, MolGR first uses the XYZ coordinates. Even when both oxygens of a carboxylate are far from the metal, one can still be closer. The inner sphere limits the comparison to plausible direct contacts using a distance cutoff specific to the metal and ligand elements. Atoms beyond that cutoff are in the outer sphere. An inner-sphere atom also has to have an unobstructed path to the metal to count as visible. Bond completion later checks the donor's electronic state and geometry.

Which oxygen gets the negative charge?

Both C–O distances in this formate are 1.25 Å. The two inputs differ only in the position of sodium. When the chemical criteria tie, the oxygen closer to sodium receives the single bond and negative charge.

Moving sodium from the upper to the lower oxygen moves the C–O⁻ assignment to that oxygen.

If both oxygens are distant, neither has an inner-sphere contact. If the C–O lengths differ substantially, their existing bond-order assignment takes precedence. Coordination completion is disabled in this illustration so the change within formate is visible. Formate comparison tests

How is the initial metal-free graph prepared?
  1. Remove excessively long connections and fill missing bonds using distance and available valence (make_connections).
  2. Normalize susceptible local bond orders (pre_clean), including the initial drawing of isolated CO.
  3. Infer initial formal charges and unpaired electrons (fresh_omol_charge_radical_initial).
  4. Subtract the assigned charges from the target. For example, a target of −2 with −1 already assigned leaves −1 to distribute. Update this residual budget as local assignments change.

Python implementation · C++ implementation

When can the carboxylate oxygens exchange assignments?

With unassigned metal sites present, ligand reconstruction computes the nearest visible inner-sphere metal distance for each atom once per target bucket, rounded to 0.001 Å. Negative-charge actions retain their SMARTS, budget and element priorities. Shorter contact distance breaks a chemical tie, followed by the existing atom order when distances tie or neither site has a contact. Local compensation around positive centers still compares electronegativity first. The cyclopentadienyl anion rule uses the same distances among eligible matches. Positive-charge placement keeps its existing ordering.

Initial bond perception may assign either carboxylate oxygen the double bond. At the existing carboxyl charge-assignment step, two terminal hydrogen-free oxygens on a neutral three-coordinate carbon with a third C/H neighbor are interchangeable when both C–O bonds are 1.20–1.34 Å and differ by at most 0.03 Å. The closer oxygen then receives the single bond and the formal −1. This consumes the same radical and charge budget within the existing search.

If one C–O length changes from 1.25 to 1.32 Å, the 0.07 Å difference exceeds the 0.03 Å tolerance. The shorter bond stays C=O even with the metal nearby.

When is an extra starting graph useful?

In a four-coordinate seesaw, the two axial bonds are nearly collinear. Suitable P–ligand lengths and angles support testing both a P⁻ assignment and the ordinary seed. The inset shows the two O and two N atoms bound to phosphorus in BUBNUK.

The axial O–P–O angle is about 178°. Both backends select P⁻ and Pd(II) for this input.

Both backends satisfy the input charge and singlet constraint with Pd at +2 and this phosphorus at −1. Regression test

When does preparation retain another seed?

When local coordination geometry supports another bond order or electronic assignment, preparation adds the eligible alternative alongside the ordinary seed. Each alternative updates the residual charge budget for its formal charges and keeps the same radical target. A seed can record local bond orders and electronic labels for validation. Each seed follows the same resonance search. The metal stage scores the pooled valid candidates. Coordination seed rules

Four-coordinate phosphorus and the seed limit

After deterministic preparation, expand_geometry_electronic_seeds(...) retains the ordinary seed and adds a P⁻ hypothesis for four-single-bond C/F phosphorus centers with two axial F atoms in a seesaw geometry, or O/N phosphorus centers with two axial O atoms. It requires P–F lengths of 1.45–1.85 Å, P–C lengths of 1.60–2.05 Å, or P–O/P–N lengths of 1.55–1.90 Å for the O/N family. Both families require axial angles above 165°, axial/equatorial angles of 75–105°, and equatorial angles of 80–140°. Ambiguous or degenerate geometry does not enable the extra branch. Each P⁺→P⁻ change increases the remaining charge budget by two; ordinary charge/spin validation and candidate selection determine whether it survives. The original hypothesis is retained, and combined local alternatives are bounded to 256 seeds. Both backends preserve the admitted P⁻ state during electron refresh, without changing scoring weights or prescribing the metal oxidation state.

Structural evidence for BUBNUK

A Pd(II) phosphoranide/phosphoramidite complex with the same ligand combination has been structurally characterized. This provides experimental support for considering a negatively charged, four-coordinate phosphorus center. Candidate selection still depends on the geometry, total charge and spin multiplicity of the input. Original report

Electronic occupation of two-coordinate silicon

Neutral two-coordinate silicon uses the same deferred two-electron-center bookkeeping as carbon. Validation resolves singlet or triplet occupancy against the requested radical budget; heteroatom donation can instead produce a charge-separated Si⁻–N⁺ contributor. Resonance traversal, singlet-center scoring, and coordination restoration recognize the same silicon state. This does not force all silicon centers to be singlets or prescribe the metal oxidation state.

Initial bond order of isolated CO and CS

For isolated neutral CO and CS in the metal-free graph, pre_clean uses a C=X precursor regardless of the seed's single, double, or triple bond. Fresh electron inference and the existing heteroatom donor rule then produce C−≡X+ (X = O, S). Both atoms must have total degree one; substituted carbonyl and thiocarbonyl groups retain their existing preparation path. Heteroatom donation requires at least two remaining nonbonding valence electrons, computed as outer-shell electrons minus formal charge minus total bond valence. Neutral five-bond P therefore cannot acquire a sixth bond-valence unit by donating a nonexistent pair.

When does a three-carbon fragment admit a reduced branch?

Seed expansion also admits reduction of a neutral C=C radical pair within a noncyclic, two-coordinate three-carbon chain when at least two negative charge units remain. Both chain bonds must be 1.35–1.50 Å, differ by at most 0.05 Å, and all three local angles must be 110–150°. The adjacent carbon must retain the two-single-bond carbene topology. The extra C⁻=C⁻ seed consumes the two negative charges while retaining the ordinary bond-closure seed.

During metal selection, a validated reduced pair in this geometry is exempt from the generic adjacent-carbanion conflict only when all three carbons are visible to one metal. A competing localized alkyne/carbene is marked as a geometry conflict only if that reduced alternative exists at the same site. Pairs are counted once and repeated annotation restores prior adjustments. Ring alkynes and isolated η²-alkynes retain their existing selection behavior; neither the charge-localization margin nor other score weights are changed.

Why start with the least charge separation?

Two adjacent radicals may pair to form a higher-order bond. The same atoms may also admit opposite charges. Search layers count how many charge-separation choices a seed uses, so neutral bond closure is tried first.

Layer zero tries A=B. Layer one allows a charge-separated A–B bond in either orientation.

Combining choices for adjacent radicals

The deterministic preparation stops before neighboring-radical resolution. enumerate_neighbor_radical_seeds(...) then enumerates complete local action sequences. Each adjacent pair may increase bond order or become either orientation of charge separation. Disjoint and overlapping pairs can therefore produce mixed strategies rather than one global branch choice.

The production pipeline calls enumerate_neighbor_radical_seeds(...) with an exact discrepancy budget. Layer zero contains bond-order-only resolutions; later layers contain resolutions with one or more charge-separation actions.

When does an unclosed N/O seed survive?

For a single-bonded N/O radical pair with terminal hydrogen-free O and a heavy substituent on N, layer zero also retains the unclosed prepared seed. It passes through the same resonance, charge/spin validation, and selection as the closed branches, so early N=O closure cannot exclude an oximate assignment. build_resonance_seed_pool(...) keeps each layer's original branch states and adds distinct states produced by carbene-radical relocation. Initialization is the only phase that infers electronic labels globally; every later transformation updates its affected atoms explicitly.

Where does an individual seed stop?

For each prepared seed, the primary search opens one session for all its discrepancy layers. The session tracks raw resonance states, Pareto traversal labels, and processed states. The first layer with valid candidates contributes its entire validated set and ends the primary search for that seed.

Resonance recovery

Each seed keeps all valid candidates in its first successful layer. A seed that succeeds in the primary search can stop while another still needs a deeper search.

One seed succeeds immediately. The other first succeeds after increasing depth. Each skips its remaining retries.

If every primary layer is empty, the search can increase depth and widen traversal. It then tries restoring a distorted π bond (T1) and finally breaking a bond (T2). Stopping-condition tests

Traversal order and deduplication

In the allyl radical, ·CH₂–CH=CH₂ ↔ CH₂=CH–CH₂· moves a double bond and one unpaired electron without moving the atoms. This is one resonance move. Traversal explores sequences of these moves from a seed.

Which move is tried first?

The default uff_lite_gain estimates how a move changes local bond lengths and angles relative to the proposed bond orders, radical placement, and conjugation. Moves with the greatest estimated improvement go first. Python and C++ sum geometric terms in atom-index order so near-ties do not depend on summation order. With input_order, moves follow enumeration order.

What do depth and discrepancy allow?

Depth counts steps along one path. Discrepancy counts departures from the first-ranked move. The first choice adds zero, the second one, the third two. With a budget of one, second then first is allowed (1 + 0), but second then second exceeds it (1 + 1).

Each prepared seed starts with depth at most 2 and walk discrepancy at most 1. If every primary layer is empty, retry the accumulated resonance seeds at the configured depth when it exceeds 2, keeping the initial walk budget. If still empty, retry with the full walk budget when it exceeds 1. T1 and T2 follow in order while results are empty. Each depth, walk-budget or structural retry opens a fresh session. The next prepared seed starts its own primary session even when a preceding seed succeeded. All stages respect smaller configured limits. Equivalence enumeration uses separate budgets.

Why deduplicate twice?

Before normalization, two paths can reach the same electronic assignment. A state key records atom-indexed electronic labels and bond orders. A bond index map locates the changed bond by its endpoints. The same raw key and residual charge require normalization only once per session.

After normalization, different inputs may again coincide. For example, process_resonance can pair adjacent radical electrons into a bond. Each distinct normalized key and residual charge enters validate_omol once to check charge, unpaired electrons, and local bonding.

How are metal-free candidates ranked?

Compare the following criteria in order. Move on only when the preceding criteria tie.

  1. Minimize scoped azinium geometry conflicts, then the sum of absolute atomic formal charges, then elongated carbonyl multiple bonds. A +1/−1 pair contributes two to the absolute charge sum.
  2. Maximize aromatic atom count, aromatic ring count, and aromatic stability in sequence.
  3. Compare the charge-adjusted size of the largest conjugated region, conjugated atom count, and conjugated bond count.
  4. Prefer fewer excess radical labels, then greater hyperconjugation (delocalization involving neighboring σ bonds).
  5. Prefer lower universal force field (UFF) energy for the organic skeleton at the supplied coordinates. Atom-index graph information resolves a final tie.

Local geometry and recovery eligibility

A final candidate is a complete graph that could end the search. An incompatible local geometry can rule out that endpoint while leaving the intermediate graph available for further moves. In this closed-shell O=N⁺=O example both N–O distances are 1.23 Å. Only the angle changes.

At 125° the nitronium assignment fails the final check. At 180° the same assignment passes it.

The 180° candidate can proceed to ranking. Nitrite has a different charge and bond pattern and falls outside this check. Angle and electronic-state tests

Where does geometry enter the search?
Role Effect on search Implemented example
Place negative charge Resolve a chemical tie in the existing assignment step Prefer the nearer visible inner-sphere metal contact
Enable a hypothesis Add a branch while retaining the ordinary seed Four-coordinate C/F or O/N phosphorus with a seesaw arrangement
Reject a final assignment Prevent a conflicting candidate from ending recovery; intermediate states can still be transformed Bent, resolved O=N⁺=O
Compare valid alternatives Prefer a supported allocation only when a compatible alternative is present Folded C8 segments and planar macrocycles

Geometry recognition uses coordinates, element identities and explicit neighbors. The proposed bond orders and electronic labels are checked separately against each rule's scope; they do not establish the geometry by inferred hybridization. Failure to recognize a motif does not by itself exclude a candidate. Ligand-local rules operate after metal removal. Rules that inspect coordination contacts receive metal elements and coordinates explicitly from the metal pipeline. Every additional branch remains subject to the original charge and spin targets.

Phosphorus centers
Three-coordinate R₂P–S

For a visible three-coordinate R2P–S site, a pyramidal P geometry can distinguish existing P⁺=S and P–S⁻ candidates. The three ligand-only angles must each lie between 80° and 130°, with their sum between 300° and 330°; S must be terminal and the two P–C bonds single. A conflict is added to P⁺=S only when a resolved P–S⁻ partner has a metal formal charge higher by two, identical metal and ligand spin budgets and terminal coordination geometry penalty, no worse independent conflicts, and identical outside atom labels and bonds, including boundary bonds. This comparison neither creates a candidate nor waives the normal cation-donor penalty. Its diagnostic field is metal_pyramidal_ps_geometry_conflict_count.

Cyclic RPN₂

The analogous cyclic RPN2 comparison is restricted to a metal-visible, three-coordinate P with one saturated carbon and two cyclic nitrogen neighbors. At a P–N distance of 1.64–1.85 Å and the same pyramidal angle limits, resolved P⁺=N and P–N⁻ candidates are compared only when the changed N has two P neighbors and the complete redox partner satisfies the same outside-graph, spin and metal-charge constraints. Under these conditions the comparison favors the P–N⁻ candidate, which retains a lone pair on P. Planar phosphazenes, open shells and candidates without a compatible partner abstain. Pi-active carbon substituents also abstain because their coupled redox alternatives exceed this local model. The diagnostic field is metal_pyramidal_pn_geometry_conflict_count; donor penalty weights are unchanged.

Pyramidal P⁺=C

A P⁺=C endpoint is screened jointly by bond length and pyramidal geometry when P is acyclic, has three carbon neighbors and bond-order sum four, and the double-bonded carbon is neutral. P=C must be strictly between 1.78 and 2.10 Å, each C–P–C angle between 80 and 130 degrees, and their sum between 300 and 330 degrees. P and C must be resolved, closed-shell and without implicit H. Rings, heteroatom substitution and C⁻=P⁺ representations remain eligible. This ligand-local screen does not change the penalty for cationic donors with an available lone pair or prescribe a metal oxidation state.

Aromatic rings and conjugated ligands
Ortho-dioxygen-substituted aryl rings

An ortho-dioxygen ring preference compares resolved quinonoid and aromatic O/O candidates. It requires a planar six-carbon ring (torsions within 15°), C–C distances of 1.35–1.45 Å with a spread no greater than 0.06 Å, and both C–O distances of 1.32–1.45 Å. Terminal oxygen atoms must be visible to the same metal. A substituted oxygen may remain outside the coordination sphere. The aromatic partner must have the same metal identity, metal and ligand spin, a metal formal charge higher by two, no worse independent structural score, and identical outside atoms and boundary bonds. Only then does the quinonoid candidate receive metal_ortho_dioxygen_geometry_conflict_count. Short carbonyls, radicals, missing geometry and candidates without a complete partner abstain. These bounds apply to this local candidate comparison.

Ortho amido and N-heterocyclic carbene (NHC) substituents

For an ortho amido/NHC-substituted aryl ring, the analogous comparison requires both aryl C–N distances at 1.36–1.46 Å and the same six-carbon ring geometry. The NHC must be a resolved, planar N2C3 five-membered ring with ring distances of 1.30–1.46 Å, a C=C backbone and a two-coordinate C⁻ between two three-coordinate nitrogens. Both C⁻=N⁺ contributors are allowed. The amido N and carbene C must be visible to the same metal; the aryl-bound NHC nitrogen need not be. The whole NHC ring belongs to the compared local motif. A quinonoid candidate receives metal_aryl_amido_nhc_geometry_conflict_count only when a complete aromatic/amido partner satisfies the same outside-graph, two-electron metal-charge, spin and independent-score constraints. This count affects the ranking of existing candidates. Cationic donors retain their separate penalty.

Amino-substituted cyclopentadienyl (Cp) and indenyl rings

Amino-substituted Cp/indenyl candidates use a separate local comparison. The planar C5 ring must be visible to one metal, with C–C distances of 1.38–1.48 Å and spread at most 0.06 Å. The exocyclic C–N distance is 1.36–1.46 Å; nitrogen has two saturated carbon substituents and approximately planar geometry (each angle 100–140°, sum at least 355°). An optional fused six-carbon ring must be neutral, planar, and have C–C distances of 1.35–1.48 Å with spread at most 0.10 Å. It belongs to the local core so its Kekule bonds can change. A ring-neutral/iminium candidate receives metal_amino_c5_geometry_conflict_count only in the presence of a complete ring-anion/neutral-amino partner with metal formal charge higher by two, unchanged outside atoms and boundary bonds, and compatible spin and independent structural score. Missing geometry, unresolved electrons, other fused-ring systems and absent partners abstain.

Bis(ortho-phenoxy) formazans

For bis(ortho-phenoxy) formazans, a candidate-set comparison recognizes a planar N–N–C–N–N core attached to two disjoint planar C6 rings. It requires N–N at 1.24–1.33 Å, central C–N at 1.32–1.43 Å (each pair differs by at most 0.04 Å), aryl C–N at 1.36–1.46 Å and terminal C–O at 1.30–1.40 Å. Ring C–C lengths are 1.35–1.46 Å with a spread at most 0.06 Å; local torsions depart from planarity by less than 15°. All H atoms are explicit, and local electron labels are resolved and closed-shell. Both outer N and both O donors must be visible to one metal. A monoanionic quinoid allocation receives one conflict only when an existing trianionic alternative has a metal charge higher by two, identical metal/ligand spin budgets and terminal coordination geometry penalty, no worse independent conflicts, and unchanged atom labels and bonds outside the site, including boundary bonds. The diagnostic field is metal_formazan_geometry_conflict_count. This comparison does not reject an intermediate state or change the global charge-localization margin. The reduced N–N–C–N–N core is recognized by its total charge (−1) and resolved C/N valences, admitting both C⁻ and N⁻ resonance contributors.

Quinodiimines

The quinodiimine comparison recognizes a planar C6 ring (C–C 1.35–1.45 Å, spread at most 0.06 Å, torsions within 15° of planar) with two adjacent exocyclic two-coordinate N atoms at C–N 1.36–1.46 Å, both visible to the same metal. It compares resolved C=N and reduced C–N allocations only against compatible partners with metal charge higher by two per changed site. Metal/ligand spin budgets and terminal coordination geometry penalties must agree, and independent conflicts cannot increase. Outside atoms and boundary bonds must match. A copy-only normalization may move an anionic C/N/O endpoint along an alternating attached-arm path onto a core N; it cannot cross another core atom. Bounds are 32 atoms per path, 4096 visited path states and 32 variants. Exhaustion abstains from this preference instead of using a partial traversal. Actual candidate graphs are unchanged. The diagnostic is metal_quinodiimine_geometry_conflict_count.

Terminal polyenamines

The polyenamine comparison recognizes a complete acyclic N–C3/C5/C7/C9 chain ending in explicit CH2. The three-coordinate N must be planar (angle sum >355°), C–N is 1.30–1.43 Å, and C–C lengths are 1.30–1.50 Å with a short/long difference

0.02 Å in every adjacent pair. Chain angles are 105–145° and torsions within 15° of planar. The last two C atoms, but not N, must be visible to one metal. An inverted iminium allocation is compared only with an existing +2-metal partner containing neutral N and one reduced chain C. Alternative anionic resonance contributors within the chain remain eligible. Outside atom labels and boundary bonds, spin budgets and terminal coordination geometry penalties must agree; independent conflicts cannot increase. The diagnostic is metal_polyenamine_geometry_conflict_count. Both comparisons act on validated candidates and leave search intermediates available.

Oxygen-containing fragments
C–O multiple bonds

Candidate validation rejects two narrowly defined C–O patterns: a substituted carbon with terminal oxygen assigned a triple bond at 1.20 < C–O < 1.60 Å and 0° < R–C–O < 150°; and a double C–O bond to two-coordinate oxygen at 1.42 < C–O < 1.65 Å. These screens leave isolated CO, linear acylium, and ordinary terminal carbonyls available. Invalid candidates cannot end the search; intermediate states remain traversable because later transformations can repair their bond orders.

C–N=O and C=N–O

A further local screen excludes C–N=O when N is two-coordinate, O is terminal and hydrogen-free, 1.30 < N–O < 1.50 Å, and the single C–N is 1.20–1.34 Å. The same screen covers O linked by a single bond to a four-single-bond borate cap; other oxygen substituents remain outside this extension. C=N–O candidates remain available. The haptic arene-reduction metric also excludes rings containing a four-coordinate carbon, which interrupts the continuous pi system.

Bent O=N⁺=O

Resolved closed-shell O=N⁺=O is also rejected when both oxygens are terminal, N has exactly two explicit neighbors, both N–O distances are 1.05–1.40 Å, and 0° < O–N–O < 150°. Nitrite, substituted atoms, unpaired or deferred electron labels, missing coordinates, and coincident oxygen positions remain outside this screen. The metal-free check uses only ligand coordinates. Rejected candidates cannot terminate recovery, but remain traversable intermediate states.

Charge compensation in N⁺–C(=S)–S⁻

Local cation compensation additionally recognizes N⁺–C(=S)–S⁻ when the three-coordinate iminium N has an external C=N bond and the central carbon and both terminal sulfurs carry resolved closed-shell labels. This specific local path is exempt from the uncompensated-organic-cation conflict; a remote anion, a saturated spacer, or a substituted sulfur does not provide that exemption.

Fragments with an N–N bond
Acyclic C–N=N–C

For C–N=N–C, a separate screen requires both nitrogens to have exactly two explicit neighbors and no implicit H, a non-ring N–N at 1.30–1.50 Å, and a single C–N of 1.20–1.35 Å at each end. Ring N–N bonds abstain because this chain-local screen does not model cyclic delocalization. This combination excludes the conflicting N=N candidate while leaving C=N–N=C available. A long N–N distance alone does not exclude an azo structure. The screen runs before deferred electron labels are resolved; rejected intermediate states remain available for further exploration.

Asymmetric azo/thione units

A separate asymmetric C–N=N–C(=S) screen requires resolved neutral N/N/C/S labels, two-coordinate nitrogens with carbon substituents, non-ring N–N at 1.30–1.50 Å, one single C–N at 1.20–1.35 Å, and a terminal C=S at 1.72–1.90 Å. The carbon bearing sulfur has three explicit neighbors. This retains exploration of N–N=C–S assignments instead of accepting the conflicting azo/thione endpoint. Substituted sulfur, N–H, open-shell/deferred labels and missing geometry abstain.

Long, bent C–N⁺≡N

A resolved C–N⁺≡N assignment is screened when the neutral terminal N has one ligand neighbor, the positive N has two, N–N is 1.24–1.50 Å, and the single C–N is 1.15–1.60 Å. A C–N–N angle below 150 degrees excludes this long, bent triple-bond endpoint. Both nitrogens must be acyclic, closed-shell and have no implicit H. Short or near-linear diazonium units, rings and unresolved labels remain eligible. The check uses only ligand geometry and does not prescribe metal charges or change candidate-scoring weights.

Bent C=N⁺=N

A resolved acyclic C=N⁺=N assignment is also screened when the outer N is neutral with two ligand neighbors or negative with one; the carbon is neutral and has three, C–N is 1.15–1.50 Å, and N–N is 1.20–1.50 Å. A bent C–N–N angle below 150 degrees excludes this cumulene endpoint. All three atoms must be closed-shell, resolved and without implicit H. Near-linear terminal diazo units and missing geometry remain outside this screen. Candidate validation and proposed pi-bond cleanup use the same predicate in both backends.

Short N–N and the two flanking C–N bonds

The complementary short-N–N screen excludes resolved neutral C=N–N=C when N–N is 1.20–1.31 Å and both C–N bonds are 1.35–1.50 Å. Both nitrogens must be acyclic with two explicit neighbors; both carbons have three neighbors, with only C/H substituents beyond the examined nitrogen. All four atoms must be closed-shell, resolved and without implicit H. The joint lengths support an azo unit, while additional heteroatom conjugation, such as formazans, is left to the broader candidate comparison. No metal oxidation state is imposed.

How are proposed N–N and N–O electron transfers checked?

Positive-charge assignment also probes each proposed N–N/N–O donation with the final-validation predicates, after applying its charge and electron changes to a temporary graph. A rejected operation consumes no charge or radicals; the next ranked action remains available. This prevents a bent nitronium or C=N⁺=N choice from discarding an otherwise viable charge allocation. Original input constraints and the ordering of geometrically eligible actions are retained.

Nitrogen macrocycles and folded carbon rings
Phthalocyanine metal displacement from the donor plane

The macrocycle partner comparison also recognizes a planar, alternating C8N8 16-member circuit fused to four C4N five-membered rings, as in phthalocyanines. Only the four N atoms shared with those five-rings must face the same metal; the four bridging N atoms remain part of the electron count. In a single-metal candidate, each triple of donor N atoms defines a plane. If all four planes are well defined and the perpendicular metal distance exceeds 0.80 Å for every plane, scoring skips the 16π/18π conflict for this circuit. Both charge assignments remain eligible for the other scoring criteria. The distance threshold is empirical for this motif.

Comparing 4n and 4n+2 tetrapyrrole circuits

Count the π electrons on the inner ligand circuit. For example, 16 is a 4n count and 18 is a 4n+2 count.

For tetrapyrroles, geometry recognition requires a 15/16-member C/N inner circuit with four two-coordinate nitrogens, each in a C4N five-membered ring sharing three circuit atoms. Circuit carbons have three explicit neighbors; implicit H is excluded. Circuit bonds must be 1.25–1.50 Å, angles 60–170 degrees, and every local torsion within 15 degrees of planar. This bounded motif opens additional exploration; it is not a general test of aromaticity or oxidation state. For resolved closed-shell labels C(0, valence 4)/C(−1, 3) and N(0, 3)/N(−1, 2), the inner-circuit model counts one electron per atom minus its formal charge. A 4n assignment receives a conflict only if an existing 4n+2 candidate differs by two electrons at that same circuit, balanced by the same metal's formal charge. All four N atoms must be visible to one metal; radical budgets and terminal coordination geometry penalties must agree, and independent structural conflicts must not increase. Isolated candidates and unresolved/open-shell circuits abstain. metal_macrocycle_electron_conflict_count records this comparison; it does not impose a universal 18-electron metal rule.

Fifteen-membered aza circuits with a fused six-membered ring

The same candidate comparison also recognizes a bounded aza-macrocycle motif: a planar 15-member C/N circuit fused to three C4N five-membered rings and one C4N2 six-membered ring, each sharing three circuit atoms. It uses the same length/angle/torsion windows. Circuit C has three explicit neighbors and N has two or three; all H is explicit. Exactly four two-coordinate N atoms in these fused rings must be visible to one metal; bridging N atoms need not be donors. A resolved neutral three-coordinate N contributes two electrons from its p lone pair; the other admitted sites contribute one minus their formal charge. This extension compares existing candidates.

Folded eight-carbon rings

For a folded eight-carbon ring, a separate local motif recognizes a planar C4 segment with three 1.40–1.46 Å bonds (spread at most 0.03 Å), flanked by 1.43–1.55 Å bonds. The opposite segment has two 1.30–1.40 Å bonds separated by a 1.40–1.50 Å bond. Local torsion is within 15 degrees of planar, both hinge torsions depart from planar by 25–75 degrees, and ring angles are 90–150 degrees. Every ring C has three explicit neighbors, no implicit H, and resolved closed-shell labels. The four segment atoms must be visible to one metal. An existing C⁻–C=C–C⁻ candidate can support a conflict on the corresponding neutral C=C–C=C assignment only with identical recognized sites, compatible spin budgets and terminal coordination geometry penalties, and no larger independent structural conflict count. Each changed segment must be balanced by a +2 change in the same metal's formal charge; two segments may transfer together. The diagnostic is metal_folded_ring_geometry_conflict_count. This is a local electronic-assignment preference, not a global C8 aromaticity test.

Nearly equal ring bond lengths alone do not exclude quinoid or reduced-ring electronic assignments.

Multiple bonds between and outside rings
Twisted inter-ring C=C

Final validation also excludes a long, strongly twisted C=C link between ring carbons when an attached planar C6 ring has nearly equal bond lengths. The link must be 1.47–1.65 Å, all four substituent torsions must depart from coplanarity by more than 45°, and the six-ring bonds must lie within 1.35–1.45 Å with a spread below 0.06 Å and local torsion deviations below 15°. Both link carbons must be neutral, resolved, closed-shell and three-coordinate, with only carbon neighbors; their other-neighbor angles must lie between 90° and 150°. Ring bonds, charged or open-shell centers, and missing geometry are outside this screen. Both backends reject only the incompatible final candidate, leaving the original charge and spin constraints intact.

Bent ketenes

For a ring-bound O=C–C=C=O motif, a bent ketene endpoint is screened only when the complete local geometry supports the competing phenoxide/acyl allocation: terminal ketene C=O 1.15–1.35 Å, C=C 1.44–1.65 Å, C–C–O angle 90–150 degrees, adjacent ring C–C 1.38–1.45 Å, and neighboring terminal C=O 1.30–1.42 Å. Both ring carbons have three explicit neighbors; all five motif atoms carry resolved neutral labels and no implicit H. Bending alone is insufficient: other metal-bound ketene structures remain eligible. These are endpoint screens; intermediate states remain traversable and charge/spin accounting selects the eventual formal states. Metal coordinates are not inferred by either screen.

Alkoxy oxonium and reduced alternatives

Candidate selection also compares an alkoxy-oxonium C=C–C=O⁺–R assignment with an existing reduced C⁻–C=C–O–R alternative. All three carbons must be nonaromatic, have three explicit neighbors, have no radicals or implicit H, and be visible to the same metal. The longer C–C must be 1.44–1.55 Å, the shorter 1.30–1.43 Å, with a difference above 0.04 Å; C–O must be 1.30–1.42 Å and R a four-coordinate carbon. Only a valid same-site alternative with metal charge +2, matching radical budgets, and no larger independent structural-conflict count adds a conflict to the inverted bond-order assignment. Aromatic Kekulé bonds and iminium groups remain outside this rule. Counts are restored before reannotation and evaluated from a snapshot, preserving repeatability and candidate-order independence. The diagnostic field is metal_alkoxy_allylic_geometry_conflict_count.

Additional local geometry constraints

Some preferences require a pair of compatible graphs. A long–short three-carbon fragment, for example, also needs a reduced partner at the same site with a metal charge that balances the two electrons.

Three-carbon fragments and links between pyrrole rings

local_cc_geometry compares validated candidates for two bounded C–C motifs: a 1.47–1.58 Å link between compact planar pyrrole rings, and an acyclic three-carbon unit with a 1.46–1.60 Å bond next to a 1.28–1.40 Å bond. The latter requires a length difference above 0.08 Å and a 95–145° angle. A geometry conflict is counted only when a compatible candidate already supplies the reduced ligand at the same site and raises the same metal's formal charge by two. Radical budgets, independent structural conflicts and the outside graph must agree. Comparison copies may normalize isolated Cp anions and neutral alternating six/eight-carbon cycles. For the three-carbon motif, a negative charge delocalized into an attached arm is accepted only when a complete closed-shell alternating-bond path restores the local labels and the entire outside graph matches. This comparison is bounded to 32 variants, 32 path atoms and 4096 search states; exceeding a bound abstains from the preference. These operations do not assign aromaticity or modify the candidates. The diagnostic field is metal_local_cc_redox_geometry_conflict_count.

Long, bent C≡N⁺

Final validation also excludes a long C≡N⁺ assignment when both non-ring atoms have exactly two explicit neighbors, both outside neighbors are carbon, 1.26 < d(C,N) < 1.50 Å, and both endpoint angles are below 150°. This screen abstains for terminal nitriles, short or linear bonds, rings, unresolved centers, radicals and missing geometry. It does not assign charges or infer a metal state. The default Zn state table includes 0, +1, and +2. Excluding that branch can expose an input or reconstruction failure rather than establishing that the next candidate is chemically correct.

Metal candidate scoring

The metal search scores the valid ligands with the assignments that produced their charge and spin targets. In YEVWAX, both O–O fragments have peroxide-range lengths. Assigning a multiple bond to a long O–O pair visible to the metal adds a conflict. The selected ligand graph contains two O⁻–O⁻ pairs.

YEVWAX with explicit hydrogen atoms and two O–O single bonds. Each peroxide carries −2. The selected Mo formal charge is +6.

This criterion applies to isolated O₂ components in the specified distance range with an inner-sphere contact. The Mo assignment depends on the complete comparison. Peroxide and metal-state tests

Which ligand is kept for one metal combination?

Each metal assignment has an enumeration index, combination_index. The metal path retains the entire validated ligand pool, including alternatives to the isolated-ligand winner. It scores each ligand with each assignment in the bucket. After all buckets in a layer have been scored, it retains one ligand per combination_index. Within an assignment, the key starts with the terminal coordination geometry penalty, azinium geometry, absolute formal-charge sum and long-carbonyl conflicts. Both backends then compare chalcogen-bond geometry conflicts, followed by unsupported unsaturated cations, the full organic key, structural metal discordance and finally the atom-index graph key. The first layer with scored pairs supplies the assignments for final selection.

Counting aromatic atoms and rings

Open Babel marks aromatic rings. Rings sharing a bond form a fused system and are evaluated together. A system with absolute net formal charge of at least four over its distinct atoms is excluded. Aromatic-ring and stability deficits remain available for ranking and diagnostics.

Conjugated atoms, bonds, and local planes

In C=C–C=C, rotating the two local π planes toward perpendicular suppresses delocalization across the central bond. The score uses the overlap of these planes.

  • Each endpoint contributes planes defined by its neighboring bonds, including those to explicit H. Average the squared cosines between their normals to obtain an overlap independent of atom numbering and orientation. The default conjugation_min_plane_overlap of 0.5 corresponds to 45° between two planar environments. Degenerate or missing coordinates impose no plane constraint.
  • Evaluate every adjacent π channel. A triple bond retains two perpendicular channels. A three-coordinate C or N with three explicit neighbors, all angles between 80° and 125°, and an angle sum below 330° receives no trigonal π-plane reward.
  • Carbon anions, cations, radicals, and carbenes connecting to a π system through a single bond must also satisfy plane overlap and the pyramidal-center check. Aromatic bonds and bonds to explicit hydrogens contribute to these planes.
  • A neutral sp² heteroatom can contribute a Lewis lone pair even when no pair is active in the search. Check its octet and occupancy separately. Lone-pair donation across a single bond requires plane alignment under the configured normalized tetrahedral-volume tolerance.
  • Exocyclic multiple bonds on aromatic atoms can contribute. Orthogonal cumulene channels remain separate. Ranking also compares the size of the largest connected conjugated region.
Charge and radical localization

Localization describes where charge and unpaired electrons reside. Directly bonded charged atoms can offset one another. Neutral atoms do not connect distant charges for this purpose. A resolved C⁻–N⁺ ylide with bond-order sums three and four retains local cancellation even when its π planes are misaligned. Radicals, unresolved centers, and implicit H do not qualify. Individual atom and radical penalties are still evaluated separately.

Metal candidate discordance features

Discordance counts local or global conflicts between a proposed metal state and its ligands. These features rank existing assignments. For example, a long coordinated O=O can affect which graph wins.

Sites around a metal

Inner-sphere radius and visibility

The contact cutoff is the sum of metal and ligand covalent radii times metal_access_radius_scale (default 1.0), plus metal_coordination_extra_tolerance_angstrom (default 0.75 Å). A possible blocker uses its covalent radius times the same scale plus metal_access_clearance_angstrom. Coordination completion uses the same distance and visibility checks.

For example, N at 2.10 Å from Zn can be visible. Place a carbon halfway along the line and N loses visibility even though its Zn distance is unchanged.

Visible inner-sphere diradicals

A visible diradical can conflict with the proposed metal state. An isolated neutral diradical oxygen may represent an oxide that needs a different ligand charge target. Diradical markers on P, S, Cl, Br, and I are exempt because they may represent a lone pair.

Adjacent charges of the same sign

Adjacent charges of the same sign add a conflict if either site is outside the inner sphere or occluded. Like-signed carbon ions also count when adjacent or separated by a conjugating double-bond bridge, even if both are visible. An example is C⁻–C=C–C⁻. When metal charge sign is needed, use the nearest metal’s candidate valence.

When donor and metal have the same charge sign

A visible inner-sphere site of the same sign as a nonzero-valent metal, or a positive site next to a zero-valent metal, triggers a local charge check. If its charge plus the charges of adjacent nonmetals sums to zero, it contributes zero. Otherwise a resolved positive donor with an available Lewis pair counts 0.5, a like-signed ion without that pair counts one, and a neutral donor counts zero.

Charge balance across the system

Zero-valent metals and an organic cation

If total charge is nonpositive, every metal is zero-valent, and an uncompensated organic cation remains, count one conflict anywhere in the ligand graph. Adjacent compensation and specific terminal coordination geometries can qualify for exemptions. A neutral conjugated region with negative charge only on carbon also qualifies. Saturated bridges and orthogonal π systems interrupt that region.

Resonance compensation with zero-valent metals

For one remaining resolved +1 cation with a full octet, move the positive charge on a copy along alternating bonds to a neutral N/O/P/S donor adjacent to an anion. Intermediates must be neutral tetravalent carbons. Exclude implicit H, radicals, and unresolved centers along the path. The entire copy must pass compensation. Limits are 32 paths, 32 atoms per path, and 4,096 states. Exhaustion retains the penalty.

Unsaturated organic cations

Count one conflict for an unexempted positive nonmetal whose outer-shell electrons minus formal charge plus total bond order falls below two for H or eight otherwise. Counting bond orders distinguishes a triple bond from a single bond. Aromatic and locally compensated cations are exempt.

Balancing a negative metal

Each negative metal contributes 0.5 unless another metal is positive or an explicit H⁺ lies outside every metal’s inner sphere. Other outer-sphere organic cations do not qualify.

Ligand symmetry and coordination geometry

Charge symmetry of repeated ligands

Group disconnected fragments by element and connectivity, ignoring bond order and formal charge. Count one conflict per group with unequal net charges. Two disconnected CH₃ fragments carrying −1 and zero give one conflict. Two carrying −1 each give zero.

Interrupted π bonding in a multidentate carbon ring

If one metal can see at least three inner-sphere carbons on a five- or six-membered all-carbon ring, inspect its π pattern. Complete aromatic and Kekulé forms are accepted, including three alternating double bonds in a six-ring and two nonadjacent double bonds in an anionic five-ring. Otherwise each negative carbon in the qualifying ring counts once.

High metal valence and coordination geometry

Count one conflict for square-planar Pd/Pt at +4 or above or linear Ag/Au at +3 or above.

Local ligand bonding

Short C–O and long O–O
  • Two oxygen-bond geometry checks contribute one structural conflict per bond: a terminal, hydrogen-free O singly bonded to a negative C with both atoms negative at 1.10 < C–O <1.30 Å; and a hydrogen-free, isolated O2 component with a multiple bond at 1.40–1.65 Å and at least one oxygen visible to a metal. The short C–O check excludes CO and CO2. Intermediate O–O lengths, free O2, and substituted peroxides are outside these two scoring rules. These are conservative candidate-selection windows, not universal oxidation-state assignments. The charge margin and the rest of the selection key are unchanged.
  • Candidate generation preserves elongated isolated O2 radical pairs for charge/spin-aware normalization instead of eagerly resolving them only into O=O or O+/O−. A neutral target can still close O=O; negative charge and spin targets determine whether peroxide or superoxide candidates are valid. Recovery neutralizes overbonded N/P cations before breaking neutral multiple bonds, preserving carbonyls when that earlier correction fills the deficit.
Elongated carbonyls
  • A separate long-carbonyl rule covers terminal, hydrogen-free O attached to a three-coordinate carbon (including explicit/implicit H), whose other substituents are H/C connected by single bonds, at 1.35–1.60 Å. It excludes CO/CO2, amides, esters and phenoxide/enolate sites. Generation defers adjacent C/O radicals to charge/spin-aware normalization. Within a no-metal target, compare the count of remaining C=O conflicts immediately after the absolute formal-charge sum, before topology; this prevents a valid reduced ligand from being lost to hyperconjugation. Metal scoring adds one conflict per double bond only when C and O are both visible to the same metal. Intermediate/short C–O bonds receive no such penalty. The length window is a graph-selection heuristic, not a universal oxidation-state rule.

  • Accepted representation conventions retain C−=N+ at NHC-type carbene sites and reduced coordinated CO2. Neither convention is targeted by the long-carbonyl rule.

Checking N=N and N=O after radical cleanup
  • Four- and six-atom radical cleanup checks proposed N=N and N=O bonds on a copy with all coupled bond-order changes applied, using the same local geometry predicates as final validation. Charge-shifting normalization also applies its proposed endpoint charges. A rejected edit leaves the source graph and terminal electrons intact for charge assignment; it does not change geometry thresholds or candidate scoring. This prevents viable hydrazone/oximate paths from being consumed into products that final validation rejects.
Cyclic cumulene angles and metal coordination
  • Ring-pi generation and charge-shifting cleanup avoid introducing a C=C=C center with two ring double bonds at a measured angle below 150 degrees. Adjacent radical pairs that would create such a center remain available to charge/spin normalization; carbonyl-to-anion cleanup cannot create it by moving a charge. The outer metal-candidate angle penalty exempts neutral C=C=C centers that pass the existing inner-sphere distance and visibility checks. Detached ligand representations at such centers can be cumulated; final metal bonds need not exist yet. The penalty remains when another candidate makes the same atom aromatic or preserves more aromatic atoms in the same covalent ligand, with no greater independent structural discordance (excluding ring-angle conflicts). Aromaticity is reperceived on copies to avoid stale flags from candidate edits. This preserves viable aromatic alternatives instead of favoring their de-aromatized cumulene forms. Remote or occluded centers also retain the angle penalty, as do heteroatom-containing or charged cumulenes. The generation guards and other selection priorities are unchanged.
Compact planar six-membered nitrogen rings
  • A scoped azinium geometry preference precedes absolute charge separation in the no-metal selection key. It counts six-membered C/N rings with one carbanion, otherwise zero formal charges, two ring double bonds and a neutral three-coordinate N with two ring single bonds, only when every ring bond is 1.25–1.44 Å and all cyclic torsions are within 15 degrees of planarity. This is a candidate preference for compact planar rings, not a general ban on reduced azinium states. Positive charge assignment also prioritizes N lone-pair donation that completes an alternating six-membered ring under the same geometry screen. The metal selection key and charge-localization margin are unchanged.

Ranking and ties

What enters structural discordance?

Each metal assignment reuses the organic-core force-field score for its ligand. metal_discordance_structural_count includes the fractional negative-metal penalties. metal_discordance_count is the same total. Aromatic deficits and metal-valence list membership are recorded separately. Retain candidates with the lowest structural discordance first.

Reference groups for spin and two-electron centers

Within the minimum-conflict set, find the lowest charge-localization penalty among graphs with the same ligand unpaired-electron target and number of singlet two-electron centers. These are resolved neutral C/N/Si/P centers with a valence deficit of two, one lone pair, and no unpaired electrons. Enumeration index breaks reference ties.

Also find the cheapest reference with the same ligand radical target, aromatic atom and ring counts, and number of other singlet centers. This last count excludes metal-visible carbon carbenes. Use the cheaper reference so that coordinated carbenes and aromatic anions can both remain competitive.

Charge-localization tolerance

Subtract the reference penalty from the candidate’s penalty. With the default margin metal_scoring.charge_localization_selection_margin=0.3, a difference of 0.29 stays within tolerance and 0.30 exceeds it. If any metal valence differs from the reference by more than two, any positive difference exceeds tolerance.

Topology, geometry, UFF, and ties

Among candidates with minimum structural discordance, retain those with the lowest terminal coordination geometry penalty for recognized motifs. Compare the charge-margin flag, conjugated atom and bond deficits, aromatic atom and ring deficits, aromatic stability, radical localization, and hyperconjugation. A deficit measures the shortfall from the reference. Prefer fewer Zn centers above +2 before comparing organic-core UFF scores. Enumeration order resolves any remaining tie.

In the diagnostic selection_key, the terminal geometry term appears after hyperconjugation and before UFF. The final field is combination_index. Scoring conditions and full key

Coordination restoration

After selection, a ligand lone pair can donate along a preferred σ direction. A π bond can donate if the metal is close to both endpoints. Here Fe is closer to the nitrile nitrogen, but Zn lies on the outward extension of the C≡N axis, in line with the nitrogen lone pair.

H–C≡N with Fe and Zn before and after coordination completion. Only the farther, axial Zn receives an N→metal bond.

Nitrile, imine, and amine donor-direction tests

σ-donor directions
  • Sigma donation uses the ligand-only Lewis graph, hybridization and explicit hydrogen coordinates. A terminal sp donor such as nitrile N or the carbon of CO accepts metals in the outward hemisphere. A two-coordinate imine or singlet carbene uses the external bisector. A pyramidal amine, phosphine or arsine uses the open face opposite its three substituents. Sulfoxide S⁺ can donate when its valence leaves a pair. Pyrrole-type neutral aromatic N contributes its pair to the ring and remains eligible for pi coordination.
Lone-pair directions on bent donors and carbonyl oxygen
  • For bent sp³ oxygen and its heavier congeners, including thioethers, the two idealized lone-pair directions lie on opposite sides of the ligand bond plane. For a carbonyl oxygen on a trigonal partner, they lie in the plane, at ±60° to the outward bond extension. Visible metals approaching the same direction compete by alignment, then distance. Existing contacts occupy directions first. Equally good assignments retain only their common metals.
Bridging anions and coordination distances
  • Anions can share a donor direction across metals. For a terminal alkoxide, thiolate or covalently bound halogen, a single bond leaves rotation about its axis undetermined. The angular screen excludes approaches within 60° of the substituent. A free halide has no axis. Terminal heavy multiple-bond donors such as thiocarbonyl sulfur retain the distance and visibility rules because a short side-on approach is also possible. Coordination search orders donors by distance - radius_scale * donor_radius, so early stopping compares a common radius_scale * metal_radius + tolerance bound. Distance and visibility cutoffs themselves are unchanged.

A Cl⁻ midway between Fe²⁺ and Zn²⁺, 2.20 Å from each with both paths unobstructed, can retain both contacts and bridge the metals.

Distance and angle checks for π coordination

Both ligand atoms must be at similar distances from the metal, within pi_dative_distance_difference_tolerance_angstrom (default 0.10 Å). For a donor–X=Y–donor chelate with both donors already bound to the same metal, skip the central π contact if the midpoint-to-metal vector lies within 30° of both donor–X–Y planes. This also covers aromatic linkers.

For S–C=C–S with both sulfurs bound to Fe, equal Fe···C distances alone do not decide. In the ligand plane only S contacts remain. Moving Fe above the double bond at the same distances can admit both carbons.

Radicals and unresolved two-electron centers

Both backends use the same RDKit post-processing step. Radical atoms and unresolved two-electron centers are excluded from both atom donation and pi-contact completion. Resolved singlet C/N/Si/P centers retain their paired-electron donation path; resolved carbynes retain the separate covalent triple-bond path that consumes their unpaired electrons. This donor filter runs before the charge-separated representation of valence-limited acceptors such as Al, so that conversion cannot disguise an invalid radical-to-metal contact.