﻿# RDKit conformer identity is not its current collection position

RDKit conformer identity is not its current collection position. A focused scientific-computing guide with the documented mechanism, a reproducible validation scenario, evidence and operational limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/science-rdkit-conformer-id-not-position/
Language: en

An RDKit conformer's identifier is not necessarily its current position in the molecule's conformer collection. Removing or assigning conformers can leave identifiers that are not consecutive list indexes. A molecular AI loader that uses a collection position as the identifier can retrieve the wrong geometry or fail while the intended conformer still exists.

## The scientific interface

The rdchem interface exposes GetConformer with an identifier argument, GetConformers as a collection and each Conformer's GetId. RemoveConformer also takes an identifier. These operations do not establish that a loop counter and the stored ID are interchangeable. A filtered collection can have a new positional order while surviving conformers retain their identities under the selected object operations. Serialization or other reconstruction can have additional identity behavior, so a library-local ID should not automatically be treated as a permanent global scientific-record key.

## Implementation details

Carry molecule identity, actual conformer ID and any external scientific-record ID together. When iterating, read the conformer's own identifier rather than substituting the iteration index into another API. Preserve geometry-to-target association through filtering and reordering. If exporting and reloading changes local IDs, construct and validate an explicit mapping to the stable record identity. Do not assign an energy or force label to whichever conformer happens to occupy the same position after a rejected geometry was removed. Check coordinate identity, not just atom count or array shape.

## A constructed validation case

Construct distinguishable conformers with intentionally nonconsecutive identifiers, then remove one and reorder processing of the survivors. Compare retrieval by actual ID with a deliberately position-as-ID wrapper. Attach known fixture targets and verify they stay with the intended geometry after export and reload under the selected mapping. Acceptance requires preserved conformer-target identity, not a demand that all conformer IDs be contiguous or that every format retains the same internal numbering. Keep original coordinates and mapping evidence for reproducible tests.

## Numerical and data limits

Correct identity handling does not establish conformer energy accuracy or representative ensemble weighting. Those need separate scientific evidence. It prevents a collection-management detail from becoming a silent molecular labeling error before model training, inference evaluation or geometry-based retrieval.

## Primary references

[RDKit Chem rdchem API](https://www.rdkit.org/docs/source/rdkit.Chem.rdchem.html); [The RDKit Book: molecular representations and fingerprints](https://www.rdkit.org/docs/RDKit_Book.html).

This is a proposed scientific-interface validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the accuracy or performance of a scientific model.

## Related reading

[GEOM: conformer count is not molecular population weight](/journal/fg2-geom-conformer-ensemble-molecule-weighting/); [SPICE: atomic numbers alone do not identify a charged molecular state](/journal/fg2-spice-charge-state-molecular-target-schema/).
