This repository was archived by the owner on Nov 11, 2026. It is now read-only.
Repository navigation
v0.0.25
Added
AlgorithmBaseModelrepresenting a registered algorithm as a standalone instance (name,kind,identity_fn,geometry_fn,parent_algorithm,deterministic), replacing theAlgorithmDefdataclass /AlgorithmFnsABC pair.IdentityProtocol/GeometryProtocol(@runtime_checkableProtocols) describing theidentity_fn/geometry_fncallable shapes, replacing theCallable[...]type aliases used byAlgorithmDef.parent_algorithmfield onAlgorithm/ parameter onAlgorithmRegistry.register(...)so a non-canonical algorithm (e.g.rdkit_smiles,hill_formula) can disambiguateother_geosvia a canonical parent (e.g.rdkit_inchi);rdkit_smiles'sidentity_fnnow returns the original (possibly non-canonical) SMILES fromother_geoswhen its InChI matches, instead of always returning RDKit's canonical form.deterministicfield onAlgorithm/ parameter onAlgorithmRegistry.register(...)(defaultTrue) flagging whether an algorithm produces deterministic strings;rdkit_smilesandhill_formulaare registered as non-deterministic.- Module-level
rdkit_inchi,rdkit_smiles,hill_formulaAlgorithminstances, exported from the top-levelautomolnamespace and called directly (rdkit_inchi.identity_fn(...),.geometry_fn(...)) instead of through iIdentity. OTHER_GEOStype alias (Mapping[str, Geometry] | None) for theother_geosparameter.
Changed
AlgorithmRegistry.register(...)is now a plain classmethod that registers anAlgorithminstance directly (AlgorithmRegistry.register(name=..., kind=..., identity_fn=..., geometry_fn=...)), instead of a decorator applied to anAlgorithmFnssubclass.AlgorithmRegistrystores algorithms in a publicalgorithms: ClassVar[list[Algorithm]]instead of a private_algorithms: ClassVar[dict[str, AlgorithmDef]].
Removed
IdentityBaseModel(.from_geometry(),.from_value(),.geometry(), and thekind/algorithmconsistency validator) — replaced by callingidentity_fn/geometry_fndirectly on the registeredAlgorithminstances.AlgorithmDefdataclass andAlgorithmFnsABC — superseded by theAlgorithmmodel andIdentityProtocol/GeometryProtocol.AlgorithmRegistry.register_def()— folded intoAlgorithmRegistry.register().RDKIT_INCHI,RDKIT_SMILES,HILL_FORMULAstring constants — replaced by therdkit_inchi,rdkit_smiles,hill_formulaAlgorithminstances.