Customized MolComparators

Introduction

Using customized MolComparators is an easy way to check extra conditions when matching query and target structures. MolComparators can check atom and bond properties (e.g. stereo properties, type of neighbors, ...) and prevent match if these properties do not fit. The extra conditions are checked beyond standard matching conditions, so they restrict the possible matches. On the other hand, relieving some search options can help to obtain more matches (e.g. setting isotope matching option to 'ignore' and check only some specific isotopes in a custom molcomparator).

For technical details see MolComparator API.

Examples

Our custom MolComparator examples are based on requests from our users. At each example, the related Chemaxon forum topics are linked.

A sample program ( ExampleForMolComparators.java) shows usage of these comparators. The structure files used by the sample program: SGroupShortcut.mrv, SGroupExpanded.mrv, SGroupUngrouped.mrv

All downloaded sources can be freely modified and redistributed.

Atom map comparison

Atoms should match only when their atom map number is the same ("Exact" option) or only the target atom has atom map number ("At least" option).

AtomMapComparator.java

Forum topic

Shortcut group comparison

Checks whether structures contain shortcut groups or only their ungrouped equivalents.

SGroupComparator.java

Forum topic

Stereo AND comparison

A wavy bond in query can match only to a wavy bond in target.

StereoANDComparator.java

Forum topic 1

Forum topic 2