Tests that Pass, Tests that Fail

The AMG (alternative molecule generator) is now good enough to run proper tests on, with help from Tobias Kind who has long promised - or threatened, perhaps :) - to test a structure generators. It should lead to software that is of more than theoretical interest.

Currently, there is a download available from github, or it can be built from the project directory if you are familiar with ant and are willing to change the build.properties file to point to a CDK directory. There is an instructions.txt file, with some examples of usages; the -h flag also works as might be expected.

As for passing tests, it currently does better with hydrocarbons - CnH2n + x for x in {-2, 0, 2}. However, it's starting to improve on the more mixed formulae, with oxygen, nitrogen, and so on. The two child-listing methods (filter/symmetric) have different behaviour, annoyingly.

Looking at one of the two pairs of duplicates in the set of C6H4 structures shows why it fails. The method here is the symmetry one, where only the minimal representative of an augmentation under the automorphism group of the parent is chosen. Sadly, this picture shows a case where the method fails:

The parent is highlighted in grey, and the child graphs (A, B) are shown on left and right. The central image shows how both 5a and 5b are adding different sets of bonds. Since the automorphism group of the parent has only the identity permutation (ie: it is trivial) any set of bonds will be equivalent.

I had realised that this could happen, but I foolishly assumed that it was rarer than this. That may be the case for simple graphs, but apparently not for multigraphs like this...