Prepare release v.1.3.2
Changelog
[1.3.2] - 2026-05-04
Fixed
synkit/IO/mol_to_graph.py
- Bug:
_create_detailed_graphhad incorrect default parameters
(drop_non_aam=True,use_index_as_atom_map=True). Changed both defaults
toFalse, consistent with the publicmol_to_graphand
_create_light_weight_graphmethods. - Bug:
atomLabelFontSizeis not a validMolDrawOptionsattribute in
current RDKit versions. Replaced withbaseFontSizeinrxn_vis.py.
synkit/Chem/Molecule/atom_features.py
- Removed
implicit_hcountfrom_build_minimal. This field duplicated
information already available viahcount(GetTotalNumHs()), which
already accounts for both explicit and implicit hydrogens. - Updated atom-feature tests to match the current minimal-profile output and
assert thatimplicit_hcountis no longer emitted.
synkit/Chem/Reaction/standardize.py
- Added user control for invalid reaction fragments via
remove_invalid.
Existing behavior is preserved withremove_invalid=True, which drops
invalid fragments and standardizes the remaining valid molecules. - When
remove_invalid=False,standardize_rsmi()andfit()now return
Noneif any reactant or product fragment is invalid, instead of silently
removing it.
Added
GitHub Actions
verify-pypi-install.ymlnow verifiessynkit[all]installation on both
Linux (ubuntu-latest) and macOS (macos-latest).conda-forge-publish.ymlnow validates conda recipe builds on both Linux
and macOS before publishing.- Conda publishing remains a single Ubuntu-built artifact because the recipe is
noarch: python.
synkit/IO/mol_to_graph.py — radical attribute
_create_light_weight_graph: addedradicalnode attribute
(atom.GetNumRadicalElectrons()), which was silently missing._augment_atom_properties: now always setsradicalexplicitly,
ensuring it is present regardless of whichAtomFeatureExtractorpath is
taken.
synkit/IO/mol_to_graph.py — profile-aware node attributes
_augment_atom_propertiesand_gather_atom_propertiesnow accept a
profilekeyword argument ("minimal"or"full", default"full").transform()forwardsself.attr_profileto both methods, so the
"minimal"profile no longer emits verbose intermediate fields.- Minimal profile node keys:
element,aromatic,hcount,charge,
radical,isomer,partial_charge,hybridization,in_ring,
neighbors,atom_map,oxidation_state,available_lp,lone_pairs. - Full profile additionally includes:
bond_order_sum,
lp_bond_order_sum,valence_electrons,estimated_lone_pairs,
available_lone_pairs. _create_light_weight_graph(legacymol_to_graph(light_weight=True))
aligned to minimal-profile semantics: removedbond_order_sum,
lp_bond_order_sum,estimated_lone_pairs,available_lone_pairs.
synkit/Vis/rxn_vis.py — reaction-center highlighting
- New constructor parameters:
highlight_reaction_center(bool),
rc_atom_color,rc_broken_color,rc_formed_color. - New static method
_find_reaction_center(rsmi): compares mapped-bond
connectivity on the reactant and product sides to identify formed bonds,
broken bonds, order-changed bonds, and the atoms involved. Parses with
SmilesParserParams(removeHs=False)to correctly handle explicitly mapped
hydrogen atoms (e.g.[H:7]). - New instance methods
_draw_mol,_render_rc,_make_separator,
_compose_reaction_image: draw each molecule individually with per-atom
and per-bond highlight colors, then compose the full reaction image with
+and arrow separators. - When
highlight_reaction_center=Truebut no atom mapping is detected,
falls back to the standardDrawReactionlayout automatically. - Existing
render(),save_png(),save_pdf()public API unchanged. - Docstrings converted to
:param:/:type:style throughout.
Changed
synkit/IO/mol_to_graph.py — docstring improvements
_augment_atom_properties: lists all guaranteed output fields by profile._gather_atom_properties: enumerates minimal vs full key sets._create_light_weight_graph: documents current node/edge attribute sets
and clarifiesuse_index_as_atom_mapfallback behaviour.
Tests
Test/Chem/Reaction/test_standardize.py
- Added coverage for mixed valid/invalid reaction fragments.
- Added tests for default invalid-fragment removal and strict
remove_invalid=Falsebehavior in bothstandardize_rsmi()andfit().
Test/IO/test_mol_to_graph.py
Expanded from 4 to 37 test cases covering:
- Constructor validation (
invalid profile,valid profiles,__repr__). transformnode keys (minimal asserts absence of verbose fields; full
asserts their presence), edge keys, whitelists,drop_non_aam,
use_index_as_atom_map.transform_store/graphproperty (includingRuntimeErrorbefore
store).mol_to_graphlegacy classmethod (basic,light_weight=True,
drop_non_aamerror path).radicalattribute: zero for closed-shell molecules, non-zero for radical
species, present in light-weight graph.- Lone-pair estimation:
estimate_lone_pairsfor water oxygen and pyrrolic N,
estimate_available_lone_pairsfor pyrrolic N (must be 0),available_lp
flag. - Oxidation-state estimation:
estimate_oxidation_states,
oxidation_states_by_atom_map,reaction_oxidation_state_delta_from_rsmi. - Static helpers:
add_partial_charges,get_stereochemistry,
get_bond_stereochemistry,has_atom_mapping,random_atom_mapping.