コード例 #1
0
        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))))));
        }
コード例 #2
0
        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))))));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
ファイル: Functions.cs プロジェクト: roddickchen/NCDK
 /// <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))));
 }