static void Transform(string smi, string exp) { ImplicitToExplicit ite = new ImplicitToExplicit(); ToTrigonalTopology ttt = new ToTrigonalTopology(); ExplicitToImplicit eti = new ExplicitToImplicit(); Assert.AreEqual(exp, Generator .Generate(eti.Apply(ttt.Apply(ite.Apply(Parser.Parse(smi)))))); }
static void Transform(string smi, int[] p, string exp) { ImplicitToExplicit ite = new ImplicitToExplicit(); FromTrigonalTopology ftt = new FromTrigonalTopology(); ExplicitToImplicit eti = new ExplicitToImplicit(); Assert.AreEqual(exp, Generator .Generate(eti.Apply(ftt.Apply(ite.Apply(Parser.Parse(smi) .Permute(p)))))); }
private void Transform(string input, string expected) { Graph g = Parser.Parse(input); ImplicitToExplicit ite = new ImplicitToExplicit(); FromSubsetAtoms fsa = new FromSubsetAtoms(); ExplicitToImplicit eti = new ExplicitToImplicit(); string actual = Generator.Generate(eti.Apply( fsa.Apply( ite.Apply(g)))); Assert.AreEqual(expected, actual); }
/// <summary> /// Convert any directional bond based stereo configuration to atom-based /// specification. /// </summary> /// <param name="g">chemical graph graph</param> /// <returns>a copy of the original graph but with directional bonds removed /// and atom-based double-bond stereo configruation.</returns> public static Graph AtomBasedDBStereo(Graph g) { return(eti.Apply(ttt.Apply(ite.Apply(g)))); }