Aromaticity requires atom typing.

Change-Id: If676dddd2f0cf414557475af68e31e7443d39f35
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Don't check for aromatic atoms before checking charge. Carbon, 'C.plus' cation can also be aromatic and so the charge types should be checked first.

Change-Id: I5c75fabcb004f1cb6839733f0d92c1b3187045da
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Correctly consider the heavy bonds and hydrogen counts. When connectedHeavyAtoms == 2 the full bond list was checked for the aromatic bonds. As the full bond list could contain an explicit hydrogen we should filter it to ensure the aromatic bond checking works correctly.

Change-Id: Ie9952a4da175996acf6f7bf4af5d93aa7c95cc5d
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Ensure non-negative height is passed when drawing a rectangle - bug #1163.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Minimising the scope of SMARTS parser classes. These classes are specific to the parser and don't need to be exposed in the public API. The atom matchers in isomorphism.matchers.smarts are still public but could also be hidden behind a factory. This commit removes about 50 classes from the JavaDoc making it easier to find other parts.

Change-Id: I01d6ae9b713c36fd521c7dacf089b71cd5315869
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Don't repurpose SMARTS query atoms for other uses. We can define our own matchers internally.

Change-Id: I7b690d148c67413a64eaa40f4a7ee86303d0538b
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Move SMARTSAtoms back to the smarts module.
Three classes already have explicit @cdk.module annotation

Change-Id: Icf9c8c297bb048fb62230bf2a1c00c3cd2bb81e7
Using the pattern *Visitor.java ignores adding a cdk module tag to a generated class - avoid this by specifying the full the names of those we actually want to ignore.

Change-Id: Ic5126c300a21bb75265d61981021501450d1ee58
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Storage of SMARTS invariants which replaces the setting of multiple properties with a single type safe data holder. Different invariants (i.e. for rings) can be computed but for now the default daylight implementation is provided.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Access the new atom invariants from every SMARTS atom. If the invariants are required by the matcher they must be set!

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Adapting and cleaning up several SMARTS query matchers to use the new invariants. The query value is now stored in the class and not on the query atom - this mirrors how other matchers work and generally makes things cleaner. Access to the values was not used (or currently useful). Serialization was removed - the class did not implement the interface and it looks like the UID was just added by default. Serialization was removed rather than fixed as it is rarely useful and there are much better techniques. Several unused classes were removed - these fullfilled the same functionality as others and it was confusing to have two for the same purpose. The RingAtom/SmallestRingAtom can now be done by using different invariants. The DegreeAtom was incorrect, matching charge, and the ExplicitConnectionAtom fulfilled it's use case.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Clean up of some other matchers which didn't need adapting to the new invariants.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Incorrect bug report (824) changed the meaning of degree in SMARTS. This should be put back but will likely need discussion first.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Temporary class to allow access between the two SMARTS class trees. They're currently in separate package and the SMARTSAtomInvariants shouldn't really be a public class but for now we need a way to expose functionality.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Set the 'ISINRING' flag on the query container to indicate ring properties are required.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Compute the invariant properties using the new class.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Type safe lists and renaming atom mapping method. Atom mapping means given an atom in the query matched which atom in the target. This is not provided but instead only the set of atoms which were matched.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Simplified identification of unique matches using sets.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Ensuring implicit hydrogen count is not null. The fingerprint molcules may need more attention.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>