A small optimisation thought of whilst writing up ring perception. If the graph is biconnected we know how many cycles there should be in the MCB. Adding this check doesn't show much improvement on datasets of chemical compounds but has a dramatic affect on fullerenes.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Atom and bond matchers allow us to move the matching logic outside of the (subgraph)-isomorphism mappers.

Conflicts:
	src/test/org/openscience/cdk/modulesuites/MisomorphismTests.java

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Defines the internal state API for (subgraph)-isomorphism mappers and implements an abstract superclass for the Vento-Foggia (VF) algorithm.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Concrete implementations of the VF for matching substructures (substate) and identity (state). The test are quite tricky to write but higher level integration tests will be added later.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Including tests in module suite.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Stream matching states as an iterator.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
The (current) front end access to the Vento-Foggia substructure/isomorphism algorithm.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Implementation of the mapping state for the Ullmann algorithm.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Missing annotations.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Current front end API for Ullman.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
High level tests for substructure matching. We need to put these in the smarts module for now to avoid a cyclic dependency - ‘test-smiles’ already depends on ‘isomorphism’.

Conflicts:
	src/test/org/openscience/cdk/modulesuites/MsmartsTests.java

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Correcting typo - caught by a test.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
A predicate to filter for (sub)graph-isomorphisms that also match stereochemistry. Implemented as predicate means any (sub)structure mapper can be made stereo sensitive. Currently the functionality doesn’t allow partial mappings (MCS) but could be adapted/extends to do this easily.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Stereochemistry integration tests.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Fixup unit tests

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Store the ‘target’ as an invariant required for SMARTS.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Format SMARTS atoms that need to be updated.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Remove specialised initialisation of recursive/hydrogen atoms.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Simplified recursive query - the query is no longer mutable which means the recursive queries are rerun. We may want to reintroduce the cache but it should be ‘safe’ and not depend on the query being mutable.

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Less ‘stringy’ programming. Rather than define an ‘op’ as a string create separate objections. This will simplify the stereo-matching (later).

Signed-off-by: Stephan Beisken <sbeisken@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>