/// <summary>
        /// This test is checking all permutations of an atom container to see
        /// if the refiner gives the canonical labelling map (effectively).
        /// </summary>
        /// <param name="atomContainer"></param>
        public void CheckForCanonicalForm(IAtomContainer atomContainer)
        {
            AtomContainerAtomPermutor    permutor = new AtomContainerAtomPermutor(atomContainer);
            AtomDiscretePartitionRefiner refiner  = new AtomDiscretePartitionRefiner();

            refiner.Refine(atomContainer);
            Permutation best = refiner.GetBest().Invert();
            string      cert = AtomContainerPrinter.ToString(atomContainer, best, true);

            while (permutor.MoveNext())
            {
                IAtomContainer permutedContainer = permutor.Current;
                refiner.Refine(permutedContainer);
                best = refiner.GetBest().Invert();
                string permCert = AtomContainerPrinter.ToString(permutedContainer, best, true);
                Assert.AreEqual(cert, permCert);
            }
        }
 public static string ToString(IAtomContainer atomContainer)
 {
     return(AtomContainerPrinter.ToString(atomContainer, new Permutation(atomContainer.Atoms.Count)));
 }
 public static void Print(IAtomContainer atomContainer)
 {
     Console.Out.WriteLine(AtomContainerPrinter.ToString(atomContainer));
 }