private void Transform(string input, string expected) { Graph g = Parser.Parse(input); ImplicitToExplicit ite = new ImplicitToExplicit(); ToSubsetAtoms tsa = new ToSubsetAtoms(); ExplicitToImplicit eti = new ExplicitToImplicit(); string actual = Generator.Generate(eti.Apply( tsa.Apply( ite.Apply(g)))); Assert.AreEqual(expected, actual); }
/// <summary> /// Collapse a graph with specified atom properties to one with organic /// subset atoms. /// </summary> /// <param name="g">a chemical graph</param> /// <returns>the chemical graph expanded</returns> public static Graph Collapse(Graph g) { return(eti.Apply(tsa.Apply(ite.Apply(g)))); }