This repository was archived by the owner on Nov 11, 2026. It is now read-only.
Repository navigation
v0.0.26
Added
rd.mol.from_connectivity(symbols, bonds, *, charge, spin, coords)— builds a sanitized RDKitMolfrom connectivity alone, perceiving bond orders, formal charges, and radical electrons that exactly match the requested charge and spin via an integer linear program (scipy.optimize.milp). RaisesNotImplementedErrorfor metals.utils.element.electronegativity()(Pauling) andutils.element.is_metal(), backed by newelectronegativity/metalfields in the generated element data.Geometryvalidation: symbols are checked against the periodic table and canonicalized ("cl"→"Cl"), andspinmust be non-negative and consistent with the electron count. Cross-field checks now also run on assignment, and a failed assignment leaves the geometry unchanged.- Value-based
Geometry.__eq__. Previously,==raisedValueErroron the coordinate arrays. rd.mol.max_bond_count(), the maximum number of bonds to an atom allowing formal charges of ±1.seedparameter onrd.mol.add_coordinates()(defaultrd.mol.EMBED_SEED;Nonefor random).geom.translate,geom.rotate,geom.reflect,geom.view,geom.render_svg, andgeom.render_gifexported fromautomol.geom.from_xyz_blockaccepts atomic numbers and lowercase symbols as atom labels, and floats with a leading dot (.74).- A
datapixi environment withmendeleevandsqlalchemyfor theelements-datatask.
Fixed
adjacency_matrix(..., flood_fill=True, enforce_valence=True)no longer loops forever when valence caps prevent fragments from connecting.rdkit_smiles.identity_fnno longer raisesStopIterationwhen noother_geosentry matches.hill_formulafollows strict Hill order: without carbon, all elements (including H) are alphabetical (e.g.ClH).Geometry.relabel_atomsrejects indices that aren't a permutation and keeps subclass fields.from_xyz_blockchecks the atom count line, and rejects multi-frame blocks and fused tokens such asH1 0 0 0with a clearXYZFormatError.- Invalid SMILES/InChI/xyz input to
rd.mol.from_smiles/from_inchi/from_xyz_blockand thegeometry_fns raisesValueErrorinstead of an RDKitArgumentError. Failed InChI generation raises instead of returning"". rd.mol.add_coordinatesraisesGeometryConversionErrorwhen embedding fails, after retrying with random initial coordinates.geom.reflectrejects a zero normal vector instead of returning NaN coordinates.Viewlabels and styles apply only to the most recently added geometry.center_of_mass/inertia_tensorhandle empty geometries, andbonds/angles/dihedralsreturn correctly shaped empty arrays.Element.groupis typedint | None. It isNonefor lanthanides and actinides.
Changed
- Breaking: The
automol.geom.core,automol.geom.analysis, andautomol.geom.iosubmodules are merged into a singleautomol.geommodule. Import fromautomol.geominstead (e.g.geom.reflect, notgeom.core.reflect). The public names are unchanged. automol.utils.elementis now a single module (utils/element.py), soautomol.utils.element.coreno longer exists. The publicutils.element.*functions are unchanged.rd/mol.pyis reorganized into sections (conversion, accessors, coordinates, stereochemistry, Lewis structure perception). There are no API changes.- Documentation: Docstrings use Google style, validated by Ruff and rendered by Sphinx through Napoleon. Types come from annotations and are no longer repeated in
Returns:orAttributes:, and emptyReturns: Nonesections are omitted. Module docstrings and comments are clearer and shorter. geom.rdkit_molno longer depends onstereomolgraph: connectivity comes fromadjacency_matrix, the Lewis structure fromrd.mol.from_connectivity, and stereochemistry from the 3D coordinates. Radicals, charged species, and closed-shell singlet carbenes are now represented faithfully.- Breaking:
geom.dihedralsreturns rows[z1, z2, z3, z4, phi]keyed by atomic numbers, oriented canonically and sorted, consistent withbondsandangles. Previously, rows held atom indices. adjacency_matrix(enforce_valence=True)caps bonds atrd.mol.max_bond_countinstead of the valence-electron count, and keeps the shortest bonds (relative to covalent radii). The result no longer depends on atom order.anglesanddihedralsare built from neighbor lists instead of dense O(N³)/O(N⁴) tensors, andinertia_tensoris vectorized.rd.mol.from_smiles/from_inchi(and sogeometry_fn) embed coordinates with a fixed seed, so the results are reproducible.Algorithmvalidates thatidentity_fnaccepts(geo, other_geos)andgeometry_fnaccepts(value).xyz_filewrites a trailing newline.xyz_blockrejects multi-line comments.rd.mol.from_inchisanitizes the parsed molecule.- The
elements-datatask moved to the newdataenvironment.
Removed
AlgorithmRegistry.get(),.all_algorithms(),.algorithms_for_kind()— unused lookup helpers; algorithms are now accessed via their module-levelAlgorithminstances (e.g.rdkit_inchi,rdkit_smiles,hill_formula) instead of by name.geom.inertia_moments(),inertia_axes(),rotational_analysis(),rotation_to_inertia_axes(), andeckart_frame().geom.mass_weight_vector(),translational_normal_modes(),rotational_normal_modes(),normal_mode_projection(),vibrational_analysis(), andharmonic_zpv().geom.bond_graph(),orbit_classes(),kabsch_align(),hungarian_correspondence(), andassignment_rmsd().geom.stereo_mol_graph(),from_stereo_mol_graph(),set_bond(), andtransition().pynautyandstereomolgraphdependencies.Algorithm.deterministicand thedeterministicparameter ofAlgorithmRegistry.register(...).- Unused
HashGenerationError,UnknownAlgorithmError, andXTBErrorexceptions, and the unusedgeom.analysis.RMSD_THRESHOLDconstant. - Public internals
geom.FLOOD_FILL_STEP, the xyz grammar constants (SYMBOL,FLOAT,XYZ_LINE), andutils.element.ELEMENT_BY_NUMBER/ELEMENT_BY_SYMBOL/PERIOD_SHELL_CAPACITYare now private.