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>
SMARTS queries complain when bond orders are left unset - they're needed to compute the valence.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Including new test classes in module suite.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
A tractable set of cycles for aromaticity perception - required as we're going to use the new aromaticity in the SMARTS Query Tool.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Removing the option which was a work around for different aromaticity models. We now have different models and set that instead.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Using the new aromaticity model.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Use the atom invariants instead of the formal neighbour count. The first requires atom typing.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
SMARTS extension matching for hybridisation requires atom typing.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Don't need to preserve the aromaticity anymore as we can apply the correct model and get the expected matches or non-matches.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Default aromaticity model is now daylight - to use the CDK model it must be set. The test testBasicAmineOnDrugs_cdkAromaticModel causes an error because one or more atom types are not identified by the CDKAtomTypeMatcher. These atom types are likely to be fixed by another pending patch.

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