kartograf.filters#

kartograf.filters.element_change#

kartograf.filters.element_change.filter_atoms_h_only_h_mapped(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Forces a mapping to only allow hydrogens to map to other hydrogens

kartograf.filters.element_change.filter_element_changes(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Forces a mapping to exclude any alchemical element changes in the core

kartograf.filters.element_change.filter_hybridization_changes(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Forces a mapping to exclude any alchemical atom hybridization changes. Such a change could be for example -C-C >> -C=C .

kartograf.filters.ring_changes#

kartograf.filters.ring_changes.filter_fused_ring_changes(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Remove cases where a fused ring is partially mapped and could be considered broken, the entire fused ring system is then to be considered unique resulting in larger alchemical regions following the recomended best practices <https://livecomsjournal.org/index.php/livecoms/article/view/v2i1e18378>.

See <OpenFreeEnergy/kartograf#56> for more details.

kartograf.filters.ring_changes.filter_hybridization_rings(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Ensure that any mapped rings are either both aromatic or aliphatic

e.g. this filter would unmap hexane to benzene type transformations

kartograf.filters.ring_changes.filter_ringbreak_changes(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Prevent any ring cleaving transformations in the mapping

This filter prevents any non-ring atom turning into a ring atom (or vice versa)

kartograf.filters.ring_changes.filter_ringsize_changes(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Prevents mutating the size of rings in the mapping

kartograf.filters.ring_changes.filter_whole_rings_only(molA: Mol, molB: Mol, mapping: dict[int, int]) dict[int, int]#

Ensure that any mapped rings are wholly mapped