From 21997af36454816e6b5da003c9e1ff7ee8575673 Mon Sep 17 00:00:00 2001 From: martin-mann Date: Fri, 7 Apr 2017 15:29:18 +0200 Subject: [PATCH] dos2unix ... --- tests/catalan/2-step.input | 32 +- tests/catalan/3-step.input | 52 +- tests/dataChemRule_1.icc | 72 +- tests/dataRule_1.icc | 322 +-- tests/dataRule_2.icc | 196 +- tests/dataRule_3.icc | 134 +- tests/dataRule_4.icc | 140 +- tests/dataSGMgraphs_1.icc | 466 ++--- tests/dataSGMgraphs_2.icc | 352 ++-- tests/dataSGMgraphs_3.icc | 328 ++-- tests/dataTargetGraph_1.icc | 138 +- tests/dataTargetGraph_2.icc | 172 +- tests/dataTargetGraph_3.icc | 178 +- tests/dataTargetGraph_4.icc | 138 +- tests/dielsalder/da1.gml | 18 +- tests/dielsalder/da2.gml | 10 +- tests/dielsalder/da2.smi | 2 +- tests/dielsalder/da_rule.gml | 56 +- tests/game-of-life/gof.glider | 12 +- tests/game-of-life/gof.gun | 62 +- tests/game-of-life/gof.rules | 120 +- tests/hanser/cube.input | 44 +- tests/hanser/four-fused-rings.input | 78 +- tests/hanser/hanser.rules | 1718 ++++++++--------- tests/hanser/single-loop.input | 16 +- tests/hanser/single-ring.input | 36 +- tests/hanser/three-fused-rings.input | 64 +- tests/hanser/two-fused-rings.input | 26 +- tests/sudoku/easy.input | 18 +- tests/sudoku/hard.input | 18 +- tests/sudoku/medium.input | 18 +- tests/sudoku/very-easy.input | 18 +- tests/testbin_aromModelNSPDK.sh | 144 +- tests/testbin_catalan.sh | 58 +- tests/testbin_gameOfLife.sh | 48 +- tests/testbin_hanser.sh | 68 +- tests/testbin_molTool.sh | 190 +- tests/testbin_sudoku.sh | 68 +- tests/testbin_toyChem.sh | 90 +- tests/testggl_CE_Horton.cc | 378 ++-- tests/testggl_GS_STL_pushAll.cc | 356 ++-- tests/testggl_GS_STL_pushAllP.cc | 356 ++-- tests/testggl_GS_STL_pushUnique.cc | 156 +- tests/testggl_GS_STL_pushUniqueP.cc | 160 +- tests/testggl_GS_stream.cc | 76 +- tests/testggl_Graph_GML_grammar.cc | 184 +- tests/testggl_Graph_GML_writer.cc | 136 +- tests/testggl_Graph_GXL_writer.cc | 114 +- tests/testggl_MR_ApplyRule.cc | 716 +++---- tests/testggl_Rule.cc | 280 +-- tests/testggl_Rule_GML_grammar.cc | 678 +++---- tests/testggl_Rule_GML_writer.cc | 620 +++--- tests/testggl_Rule_GMLparser.cc | 750 +++---- tests/testggl_chem_AP_NSPDK.cc | 456 ++--- tests/testggl_chem_GS_SMILES.cc | 376 ++-- tests/testggl_chem_MR_Reactions.cc | 340 ++-- ...tggl_chem_MoleculeComponent_GML_grammar.cc | 332 ++-- tests/testggl_chem_MoleculeDecomposition.cc | 1420 +++++++------- tests/testggl_chem_MoleculeGroups.cc | 486 ++--- tests/testggl_chem_MoleculeOB.cc | 234 +-- tests/testggl_chem_MoleculeUtil.cc | 434 ++--- tests/testggl_chem_RRC_ArrheniusLaw.cc | 260 +-- tests/testggl_chem_SMILES_grammar.cc | 292 +-- tests/testggl_chem_SMILESparser.cc | 308 +-- tests/testggl_chem_SMILESwriter.cc | 462 ++--- tests/testggl_chem_SMILESwriterOB.cc | 118 +- tests/testsgm_GM_vf2.cc | 392 ++-- tests/testsgm_GraphScaffold.cc | 316 +-- tests/testsgm_Graph_boost.cc | 274 +-- tests/testsgm_Graph_boostV_p.cc | 138 +- tests/testsgm_MC_Edge.cc | 650 +++---- tests/testsgm_MC_Node.cc | 1678 ++++++++-------- tests/testsgm_MR_Counting.cc | 150 +- tests/testsgm_MR_Storing.cc | 156 +- tests/testsgm_MR_stream.cc | 146 +- tests/testsgm_RP_Hanser96.cc | 456 ++--- tests/testsgm_SGM_vf2.cc | 468 ++--- tests/testsgm_SubGraph.cc | 218 +-- tests/testtmp.cc | 30 +- tests/toyChem/NADH.smi | 4 +- tests/toyChem/formose-process.rule | 190 +- tests/toyChem/formose-process.smi | 4 +- tests/toyChem/groups.gml | 268 +-- tests/toyChem/lactat-dehydrogenase.gml | 140 +- tests/toyChem/purine.smi | 64 +- tests/utilPrintGraph_Interface.icc | 44 +- tests/utilPrintRule.icc | 172 +- 87 files changed, 11078 insertions(+), 11078 deletions(-) diff --git a/tests/catalan/2-step.input b/tests/catalan/2-step.input index ba7e702..141d301 100644 --- a/tests/catalan/2-step.input +++ b/tests/catalan/2-step.input @@ -1,16 +1,16 @@ -graph [ - node [ id 1 label "1" ] - node [ id 2 label "2" ] - node [ id 3 label "3" ] - node [ id 4 label "4" ] - node [ id 5 label "5" ] - node [ id 6 label "6" ] - node [ id 7 label "7" ] - edge [ source 1 target 2 label "1-2" ] - edge [ source 2 target 3 label "2-3" ] - edge [ source 2 target 4 label "2-4" ] - edge [ source 3 target 5 label "3-5" ] - edge [ source 4 target 5 label "4-5" ] - edge [ source 5 target 6 label "5-6" ] - edge [ source 5 target 7 label "5-7" ] -] +graph [ + node [ id 1 label "1" ] + node [ id 2 label "2" ] + node [ id 3 label "3" ] + node [ id 4 label "4" ] + node [ id 5 label "5" ] + node [ id 6 label "6" ] + node [ id 7 label "7" ] + edge [ source 1 target 2 label "1-2" ] + edge [ source 2 target 3 label "2-3" ] + edge [ source 2 target 4 label "2-4" ] + edge [ source 3 target 5 label "3-5" ] + edge [ source 4 target 5 label "4-5" ] + edge [ source 5 target 6 label "5-6" ] + edge [ source 5 target 7 label "5-7" ] +] diff --git a/tests/catalan/3-step.input b/tests/catalan/3-step.input index ce6cf42..21b1dee 100644 --- a/tests/catalan/3-step.input +++ b/tests/catalan/3-step.input @@ -1,26 +1,26 @@ -graph [ - node [ id 1 label "1" ] - node [ id 2 label "2" ] - node [ id 3 label "3" ] - node [ id 4 label "4" ] - node [ id 5 label "5" ] - node [ id 6 label "6" ] - node [ id 7 label "7" ] - node [ id 8 label "8" ] - node [ id 9 label "9" ] - node [ id 10 label "10" ] - edge [ source 1 target 2 label "1-2" ] - edge [ source 2 target 3 label "2-3" ] - edge [ source 2 target 4 label "2-4" ] - edge [ source 3 target 4 label "3-4" ] - edge [ source 3 target 5 label "3-5" ] - edge [ source 4 target 5 label "4-5" ] - edge [ source 4 target 8 label "4-8" ] - edge [ source 5 target 6 label "5-6" ] - edge [ source 5 target 8 label "5-8" ] - edge [ source 6 target 7 label "6-7" ] - edge [ source 8 target 9 label "8-9" ] - edge [ source 10 target 3 label "10-3" ] - edge [ source 10 target 4 label "10-4" ] - edge [ source 10 target 5 label "10-5" ] -] +graph [ + node [ id 1 label "1" ] + node [ id 2 label "2" ] + node [ id 3 label "3" ] + node [ id 4 label "4" ] + node [ id 5 label "5" ] + node [ id 6 label "6" ] + node [ id 7 label "7" ] + node [ id 8 label "8" ] + node [ id 9 label "9" ] + node [ id 10 label "10" ] + edge [ source 1 target 2 label "1-2" ] + edge [ source 2 target 3 label "2-3" ] + edge [ source 2 target 4 label "2-4" ] + edge [ source 3 target 4 label "3-4" ] + edge [ source 3 target 5 label "3-5" ] + edge [ source 4 target 5 label "4-5" ] + edge [ source 4 target 8 label "4-8" ] + edge [ source 5 target 6 label "5-6" ] + edge [ source 5 target 8 label "5-8" ] + edge [ source 6 target 7 label "6-7" ] + edge [ source 8 target 9 label "8-9" ] + edge [ source 10 target 3 label "10-3" ] + edge [ source 10 target 4 label "10-4" ] + edge [ source 10 target 5 label "10-5" ] +] diff --git a/tests/dataChemRule_1.icc b/tests/dataChemRule_1.icc index a34c3a8..ee59197 100644 --- a/tests/dataChemRule_1.icc +++ b/tests/dataChemRule_1.icc @@ -1,36 +1,36 @@ -#ifndef DATARULE_1_ICC_ -#define DATARULE_1_ICC_ - -#include - -const std::string ruleDielsAlderGML = - "rule [\n\ - ruleID \"Diels-Alder reaction\"\n\ - context [\n\ - node [ id 0 label \"C\" ]\n\ - node [ id 1 label \"C\" ]\n\ - node [ id 2 label \"C\" ]\n\ - node [ id 3 label \"C\" ]\n\ - node [ id 4 label \"C\" ]\n\ - node [ id 5 label \"C\" ]\n\ - ]\n\ - left [\n\ - edge [ source 0 target 1 label \"=\" ]\n\ - edge [ source 1 target 2 label \"-\" ]\n\ - edge [ source 2 target 3 label \"=\" ]\n\ - edge [ source 4 target 5 label \"=\" ]\n\ - constrainNoEdge [ source 3 target 5 ]\n\ - constrainNoEdge [ source 0 target 4 ]\n\ - ]\n\ - right [\n\ - edge [ source 0 target 1 label \"-\" ]\n\ - edge [ source 0 target 5 label \"-\" ]\n\ - edge [ source 1 target 2 label \"=\" ]\n\ - edge [ source 2 target 3 label \"-\" ]\n\ - edge [ source 3 target 4 label \"-\" ]\n\ - edge [ source 4 target 5 label \"-\" ]\n\ - ]\n\ - ]\n\ - "; - -#endif /*DATARULE_1_ICC_*/ +#ifndef DATARULE_1_ICC_ +#define DATARULE_1_ICC_ + +#include + +const std::string ruleDielsAlderGML = + "rule [\n\ + ruleID \"Diels-Alder reaction\"\n\ + context [\n\ + node [ id 0 label \"C\" ]\n\ + node [ id 1 label \"C\" ]\n\ + node [ id 2 label \"C\" ]\n\ + node [ id 3 label \"C\" ]\n\ + node [ id 4 label \"C\" ]\n\ + node [ id 5 label \"C\" ]\n\ + ]\n\ + left [\n\ + edge [ source 0 target 1 label \"=\" ]\n\ + edge [ source 1 target 2 label \"-\" ]\n\ + edge [ source 2 target 3 label \"=\" ]\n\ + edge [ source 4 target 5 label \"=\" ]\n\ + constrainNoEdge [ source 3 target 5 ]\n\ + constrainNoEdge [ source 0 target 4 ]\n\ + ]\n\ + right [\n\ + edge [ source 0 target 1 label \"-\" ]\n\ + edge [ source 0 target 5 label \"-\" ]\n\ + edge [ source 1 target 2 label \"=\" ]\n\ + edge [ source 2 target 3 label \"-\" ]\n\ + edge [ source 3 target 4 label \"-\" ]\n\ + edge [ source 4 target 5 label \"-\" ]\n\ + ]\n\ + ]\n\ + "; + +#endif /*DATARULE_1_ICC_*/ diff --git a/tests/dataRule_1.icc b/tests/dataRule_1.icc index 58987ab..d3257e9 100644 --- a/tests/dataRule_1.icc +++ b/tests/dataRule_1.icc @@ -1,161 +1,161 @@ -#ifndef DATARULE_1_ICC_ -#define DATARULE_1_ICC_ - -#include - - - ggl::Rule::CoreGraph - getRule_1 (std::string & ruleString) { - - // fill rule graph - ggl::Rule::CoreGraph g; - { - ggl::Rule::CoreGraph::vertex_descriptor v; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type - nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type - nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type - nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); - - ggl::Rule::CoreGraph::edge_descriptor e; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type - edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type - edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); - - ruleString = -"\n=============================================\n\n\ - 0(A) -1- 1(B) 0(E) -1- 1(B)\n\ - | | |\n\ - 2 ==> 4 3\n\ - | | |\n\ - 2(C) 2(C) 3(D)\n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(g); - nodeLabel[v] = "A"; - nodeRightLabel[v] = "E"; - nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; - // node 1 - v = boost::add_vertex(g); - nodeLabel[v] = "B"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 2 - v = boost::add_vertex(g); - nodeLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 3 - v = boost::add_vertex(g); - nodeLabel[v] = "D"; - nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; - - // 0(A) -1- 1(B) 0(E) -1- 1(B) - // | | | - // 2 ==> 4 3 - // | | | - // 2(C) 2(C) 3(D) - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; - edgeLabel[e] = "-1-"; - edgeLevel[e] = ggl::Rule::RULE_CONTEXT; - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-2-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-4-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - // edge 1 - 3 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-3-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - - } - - return g; - } - - ggl::Rule::CoreGraph - getRule_1_WC (std::string & ruleString) { - - // fill rule graph - ggl::Rule::CoreGraph g; - { - ggl::Rule::CoreGraph::vertex_descriptor v; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type - nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type - nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type - nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); - - ggl::Rule::CoreGraph::edge_descriptor e; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type - edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type - edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); - - ruleString = -"\n=============================================\n\n\ - 0(*) -1- 1(B) 0(*) -1- 1(E)\n\ - | | |\n\ - 2 ==> 4 3\n\ - | | |\n\ - 2(C) 2(C) 3(D)\n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(g); - nodeLabel[v] = "*"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 1 - v = boost::add_vertex(g); - nodeLabel[v] = "B"; - nodeRightLabel[v] = "E"; - nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; - // node 2 - v = boost::add_vertex(g); - nodeLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 3 - v = boost::add_vertex(g); - nodeLabel[v] = "D"; - nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; - - // 0(A) -1- 1(B) 0(E) -1- 1(B) - // | | | - // 2 ==> 4 3 - // | | | - // 2(C) 2(C) 3(D) - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; - edgeLabel[e] = "-1-"; - edgeLevel[e] = ggl::Rule::RULE_CONTEXT; - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-2-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-4-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - // edge 1 - 3 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-3-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - - } - - return g; - } - -#endif /*DATARULE_1_ICC_*/ +#ifndef DATARULE_1_ICC_ +#define DATARULE_1_ICC_ + +#include + + + ggl::Rule::CoreGraph + getRule_1 (std::string & ruleString) { + + // fill rule graph + ggl::Rule::CoreGraph g; + { + ggl::Rule::CoreGraph::vertex_descriptor v; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type + nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type + nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type + nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); + + ggl::Rule::CoreGraph::edge_descriptor e; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type + edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type + edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); + + ruleString = +"\n=============================================\n\n\ + 0(A) -1- 1(B) 0(E) -1- 1(B)\n\ + | | |\n\ + 2 ==> 4 3\n\ + | | |\n\ + 2(C) 2(C) 3(D)\n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(g); + nodeLabel[v] = "A"; + nodeRightLabel[v] = "E"; + nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; + // node 1 + v = boost::add_vertex(g); + nodeLabel[v] = "B"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 2 + v = boost::add_vertex(g); + nodeLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 3 + v = boost::add_vertex(g); + nodeLabel[v] = "D"; + nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; + + // 0(A) -1- 1(B) 0(E) -1- 1(B) + // | | | + // 2 ==> 4 3 + // | | | + // 2(C) 2(C) 3(D) + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; + edgeLabel[e] = "-1-"; + edgeLevel[e] = ggl::Rule::RULE_CONTEXT; + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-2-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-4-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + // edge 1 - 3 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-3-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + + } + + return g; + } + + ggl::Rule::CoreGraph + getRule_1_WC (std::string & ruleString) { + + // fill rule graph + ggl::Rule::CoreGraph g; + { + ggl::Rule::CoreGraph::vertex_descriptor v; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type + nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type + nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type + nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); + + ggl::Rule::CoreGraph::edge_descriptor e; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type + edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type + edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); + + ruleString = +"\n=============================================\n\n\ + 0(*) -1- 1(B) 0(*) -1- 1(E)\n\ + | | |\n\ + 2 ==> 4 3\n\ + | | |\n\ + 2(C) 2(C) 3(D)\n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(g); + nodeLabel[v] = "*"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 1 + v = boost::add_vertex(g); + nodeLabel[v] = "B"; + nodeRightLabel[v] = "E"; + nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; + // node 2 + v = boost::add_vertex(g); + nodeLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 3 + v = boost::add_vertex(g); + nodeLabel[v] = "D"; + nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; + + // 0(A) -1- 1(B) 0(E) -1- 1(B) + // | | | + // 2 ==> 4 3 + // | | | + // 2(C) 2(C) 3(D) + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; + edgeLabel[e] = "-1-"; + edgeLevel[e] = ggl::Rule::RULE_CONTEXT; + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-2-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-4-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + // edge 1 - 3 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-3-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + + } + + return g; + } + +#endif /*DATARULE_1_ICC_*/ diff --git a/tests/dataRule_2.icc b/tests/dataRule_2.icc index d3dbad9..33b1c5a 100644 --- a/tests/dataRule_2.icc +++ b/tests/dataRule_2.icc @@ -1,98 +1,98 @@ -#ifndef DATARULE_2_ICC_ -#define DATARULE_2_ICC_ - -#include - - - ggl::Rule::CoreGraph - getRule_2 (std::string & ruleString) { - - // fill rule graph - ggl::Rule::CoreGraph g; - { - ggl::Rule::CoreGraph::vertex_descriptor v; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type - nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type - nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type - nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); - - ggl::Rule::CoreGraph::edge_descriptor e; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type - edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type - edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); - - ruleString = -"\n=============================================\n\n\ - 3(D) -1- 1(B) 3(E) -1- 1(B) \n\ - | / | | \n\ - 2 3 ==> 4 3 \n\ - | / | | \n\ - 2(C) -0- 0(A) 2(C) 4(D) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(g); - nodeLabel[v] = "A"; - nodeLevel[v] = ggl::Rule::RULE_LEFT_SIDE; - // node 1 - v = boost::add_vertex(g); - nodeLabel[v] = "B"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 2 - v = boost::add_vertex(g); - nodeLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 3 - v = boost::add_vertex(g); - nodeLabel[v] = "D"; - nodeRightLabel[v] = "E"; - nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; - // node 4 - v = boost::add_vertex(g); - nodeLabel[v] = "D"; - nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; - -// "\n========================================= -// 3(D) -1- 1(B) 3(E) -1- 1(B) -// | / | | -// 2 3 ==> 4 3 -// | / | | -// 2(C) -0- 0(A) 2(C) 4(D) -// \n========================================== - - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-0-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-3-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 1 - 3 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-1-"; - edgeLevel[e] = ggl::Rule::RULE_CONTEXT; - // edge 1 - 4 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(4,g), g).first; - edgeLabel[e] = "-3-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(2,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-2-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(2,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-4-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - - } - - return g; - } - -#endif /*DATARULE_2_ICC_*/ +#ifndef DATARULE_2_ICC_ +#define DATARULE_2_ICC_ + +#include + + + ggl::Rule::CoreGraph + getRule_2 (std::string & ruleString) { + + // fill rule graph + ggl::Rule::CoreGraph g; + { + ggl::Rule::CoreGraph::vertex_descriptor v; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type + nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type + nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type + nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); + + ggl::Rule::CoreGraph::edge_descriptor e; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type + edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type + edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); + + ruleString = +"\n=============================================\n\n\ + 3(D) -1- 1(B) 3(E) -1- 1(B) \n\ + | / | | \n\ + 2 3 ==> 4 3 \n\ + | / | | \n\ + 2(C) -0- 0(A) 2(C) 4(D) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(g); + nodeLabel[v] = "A"; + nodeLevel[v] = ggl::Rule::RULE_LEFT_SIDE; + // node 1 + v = boost::add_vertex(g); + nodeLabel[v] = "B"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 2 + v = boost::add_vertex(g); + nodeLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 3 + v = boost::add_vertex(g); + nodeLabel[v] = "D"; + nodeRightLabel[v] = "E"; + nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; + // node 4 + v = boost::add_vertex(g); + nodeLabel[v] = "D"; + nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; + +// "\n========================================= +// 3(D) -1- 1(B) 3(E) -1- 1(B) +// | / | | +// 2 3 ==> 4 3 +// | / | | +// 2(C) -0- 0(A) 2(C) 4(D) +// \n========================================== + + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-0-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-3-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 1 - 3 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-1-"; + edgeLevel[e] = ggl::Rule::RULE_CONTEXT; + // edge 1 - 4 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(4,g), g).first; + edgeLabel[e] = "-3-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(2,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-2-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(2,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-4-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + + } + + return g; + } + +#endif /*DATARULE_2_ICC_*/ diff --git a/tests/dataRule_3.icc b/tests/dataRule_3.icc index a225c8f..a0b5aa3 100644 --- a/tests/dataRule_3.icc +++ b/tests/dataRule_3.icc @@ -1,67 +1,67 @@ -#ifndef DATARULE_3_ICC_ -#define DATARULE_3_ICC_ - -#include - - - ggl::Rule::CoreGraph - getRule_3 (std::string & ruleString) { - - // fill rule graph - ggl::Rule::CoreGraph g; - { - ggl::Rule::CoreGraph::vertex_descriptor v; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type - nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type - nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type - nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); - - ggl::Rule::CoreGraph::edge_descriptor e; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type - edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type - edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); - - ruleString = -"\n=============================================\n\n\ - 2(D) -1- 1(B) 2(C) 1(B) \n\ - | \n\ - ==> 3 \n\ - | \n\ - 0(A) 0(A) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(g); - nodeLabel[v] = "A"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 1 - v = boost::add_vertex(g); - nodeLabel[v] = "B"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 2 - v = boost::add_vertex(g); - nodeLabel[v] = "D"; - nodeRightLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; - - - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "-1-"; - edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; - edgeLabel[e] = "-3-"; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - - } - - return g; - } - -#endif /*DATARULE_3_ICC_*/ +#ifndef DATARULE_3_ICC_ +#define DATARULE_3_ICC_ + +#include + + + ggl::Rule::CoreGraph + getRule_3 (std::string & ruleString) { + + // fill rule graph + ggl::Rule::CoreGraph g; + { + ggl::Rule::CoreGraph::vertex_descriptor v; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type + nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type + nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type + nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); + + ggl::Rule::CoreGraph::edge_descriptor e; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type + edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type + edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); + + ruleString = +"\n=============================================\n\n\ + 2(D) -1- 1(B) 2(C) 1(B) \n\ + | \n\ + ==> 3 \n\ + | \n\ + 0(A) 0(A) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(g); + nodeLabel[v] = "A"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 1 + v = boost::add_vertex(g); + nodeLabel[v] = "B"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 2 + v = boost::add_vertex(g); + nodeLabel[v] = "D"; + nodeRightLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_LABEL_CHANGE; + + + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "-1-"; + edgeLevel[e] = ggl::Rule::RULE_LEFT_SIDE; + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,g), boost::vertex(1,g), g).first; + edgeLabel[e] = "-3-"; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + + } + + return g; + } + +#endif /*DATARULE_3_ICC_*/ diff --git a/tests/dataRule_4.icc b/tests/dataRule_4.icc index f77c9d3..2448425 100644 --- a/tests/dataRule_4.icc +++ b/tests/dataRule_4.icc @@ -1,70 +1,70 @@ -#ifndef DATARULE_4_ICC_ -#define DATARULE_4_ICC_ - -#include - - - ggl::Rule::CoreGraph - getRule_4 (std::string & ruleString) { - - // fill rule graph - ggl::Rule::CoreGraph g; - { - ggl::Rule::CoreGraph::vertex_descriptor v; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type - nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type - nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type - nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); - - ggl::Rule::CoreGraph::edge_descriptor e; - // get level property class - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type - edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); - boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type - edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); - - ruleString = -"\n=============================================\n\n\ - 3(H) - 0(C) - 1(C) ==> 3(H) - 0(C) - 1(C) = 2(O) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(g); - nodeLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 1 - v = boost::add_vertex(g); - nodeLabel[v] = "C"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - // node 2 - v = boost::add_vertex(g); - nodeLabel[v] = "O"; - nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; - // node 3 - v = boost::add_vertex(g); - nodeLabel[v] = "H"; - nodeLevel[v] = ggl::Rule::RULE_CONTEXT; - - - // edge 0 - 3 - e = boost::add_edge( boost::vertex(0,g), boost::vertex(3,g), g).first; - edgeLabel[e] = "-"; - edgeLevel[e] = ggl::Rule::RULE_CONTEXT; - // edge 0 - 1 - e = boost::add_edge( boost::vertex(0,g), boost::vertex(1,g), g).first; - edgeLabel[e] = "-"; - edgeLevel[e] = ggl::Rule::RULE_CONTEXT; - // edge 1 - 2 - e = boost::add_edge( boost::vertex(1,g), boost::vertex(2,g), g).first; - edgeLabel[e] = "="; - edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; - - } - - return g; - } - -#endif /*DATARULE_4_ICC_*/ +#ifndef DATARULE_4_ICC_ +#define DATARULE_4_ICC_ + +#include + + + ggl::Rule::CoreGraph + getRule_4 (std::string & ruleString) { + + // fill rule graph + ggl::Rule::CoreGraph g; + { + ggl::Rule::CoreGraph::vertex_descriptor v; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeContextProperty>::type + nodeLevel = boost::get( ggl::Rule::NodeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeLabelProperty >::type + nodeLabel = boost::get( ggl::Rule::NodeLabelProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::NodeRightLabelProperty >::type + nodeRightLabel = boost::get( ggl::Rule::NodeRightLabelProperty(), g ); + + ggl::Rule::CoreGraph::edge_descriptor e; + // get level property class + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeContextProperty>::type + edgeLevel = boost::get( ggl::Rule::EdgeContextProperty(), g ); + boost::property_map< ggl::Rule::CoreGraph, ggl::Rule::EdgeLabelProperty >::type + edgeLabel = boost::get( ggl::Rule::EdgeLabelProperty(), g ); + + ruleString = +"\n=============================================\n\n\ + 3(H) - 0(C) - 1(C) ==> 3(H) - 0(C) - 1(C) = 2(O) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(g); + nodeLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 1 + v = boost::add_vertex(g); + nodeLabel[v] = "C"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + // node 2 + v = boost::add_vertex(g); + nodeLabel[v] = "O"; + nodeLevel[v] = ggl::Rule::RULE_RIGHT_SIDE; + // node 3 + v = boost::add_vertex(g); + nodeLabel[v] = "H"; + nodeLevel[v] = ggl::Rule::RULE_CONTEXT; + + + // edge 0 - 3 + e = boost::add_edge( boost::vertex(0,g), boost::vertex(3,g), g).first; + edgeLabel[e] = "-"; + edgeLevel[e] = ggl::Rule::RULE_CONTEXT; + // edge 0 - 1 + e = boost::add_edge( boost::vertex(0,g), boost::vertex(1,g), g).first; + edgeLabel[e] = "-"; + edgeLevel[e] = ggl::Rule::RULE_CONTEXT; + // edge 1 - 2 + e = boost::add_edge( boost::vertex(1,g), boost::vertex(2,g), g).first; + edgeLabel[e] = "="; + edgeLevel[e] = ggl::Rule::RULE_RIGHT_SIDE; + + } + + return g; + } + +#endif /*DATARULE_4_ICC_*/ diff --git a/tests/dataSGMgraphs_1.icc b/tests/dataSGMgraphs_1.icc index d08f3a0..f2ef216 100644 --- a/tests/dataSGMgraphs_1.icc +++ b/tests/dataSGMgraphs_1.icc @@ -1,233 +1,233 @@ -#ifndef DATASGMGRAPHS_1_ICC_ -#define DATASGMGRAPHS_1_ICC_ - -#ifndef DATASGMGRAPHS_GRAPH_CLASS -#define DATASGMGRAPHS_GRAPH_CLASS - -#include -#include - - //! The properties available for the nodes of a graph - typedef boost::property< boost::vertex_index_t, size_t - , boost::property< boost::vertex_name_t, std::string - > > - MyGraph_NodeProperties; - - //! The properties available for the edges of a graph - typedef boost::property< boost::edge_name_t, std::string - > - MyGraph_EdgeProperties; - - //! The definition of undirected graphs - typedef boost::adjacency_list< - boost::vecS, // store edges - boost::vecS, // store vertices - boost::undirectedS, // is an undirected graph - MyGraph_NodeProperties, // (atom symbols etc) - MyGraph_EdgeProperties // (edge symbols etc) - > - MyGraph; - - -#endif // DATASGMGRAPHS_GRAPH_CLASS - - MyGraph - getPattern_1 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n\ - 0(C) 1(C) \n\ - | / \n\ - 1 1 \n\ - | / \n\ - 3(N) -1- 2(C) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 3 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - MyGraph - getPattern_1_WC (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n\ - 0(C) 1(*) \n\ - | / \n\ - 1 1 \n\ - | / \n\ - 3(N) -1- 2(C) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "*"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 3 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - MyGraph - getTarget_1 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n\ - 5(C) -1- 4(C) -2- 3(C) \n\ - | | \n\ - 1 1 \n\ - | | \n\ - 0(N) -1- 1(C) -1- 2(N) \n\ - | | \n\ - 1 1 \n\ - | | \n\ - 6(C) 8(O) -2- 7(C) -1- 9(C) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 4 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 5 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 6 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 7 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 8 - v = boost::add_vertex(t); - nodeLabel[v] = "O"; - // node 9 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 5 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(5,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 6 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(6,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-1-"; - // edge 2 - 7 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(7,t), t).first; - edgeLabel[e] = "-1-"; - // edge 3 - 4 - e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 4 - 5 - e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; - edgeLabel[e] = "-1-"; - // edge 7 - 8 - e = boost::add_edge(boost::vertex(7,t), boost::vertex(8,t), t).first; - edgeLabel[e] = "-2-"; - // edge 7 - 9 - e = boost::add_edge(boost::vertex(7,t), boost::vertex(9,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - -#endif /*DATASGMGRAPHS_1_ICC_*/ +#ifndef DATASGMGRAPHS_1_ICC_ +#define DATASGMGRAPHS_1_ICC_ + +#ifndef DATASGMGRAPHS_GRAPH_CLASS +#define DATASGMGRAPHS_GRAPH_CLASS + +#include +#include + + //! The properties available for the nodes of a graph + typedef boost::property< boost::vertex_index_t, size_t + , boost::property< boost::vertex_name_t, std::string + > > + MyGraph_NodeProperties; + + //! The properties available for the edges of a graph + typedef boost::property< boost::edge_name_t, std::string + > + MyGraph_EdgeProperties; + + //! The definition of undirected graphs + typedef boost::adjacency_list< + boost::vecS, // store edges + boost::vecS, // store vertices + boost::undirectedS, // is an undirected graph + MyGraph_NodeProperties, // (atom symbols etc) + MyGraph_EdgeProperties // (edge symbols etc) + > + MyGraph; + + +#endif // DATASGMGRAPHS_GRAPH_CLASS + + MyGraph + getPattern_1 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n\ + 0(C) 1(C) \n\ + | / \n\ + 1 1 \n\ + | / \n\ + 3(N) -1- 2(C) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 3 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + MyGraph + getPattern_1_WC (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n\ + 0(C) 1(*) \n\ + | / \n\ + 1 1 \n\ + | / \n\ + 3(N) -1- 2(C) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "*"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 3 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + MyGraph + getTarget_1 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n\ + 5(C) -1- 4(C) -2- 3(C) \n\ + | | \n\ + 1 1 \n\ + | | \n\ + 0(N) -1- 1(C) -1- 2(N) \n\ + | | \n\ + 1 1 \n\ + | | \n\ + 6(C) 8(O) -2- 7(C) -1- 9(C) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 4 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 5 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 6 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 7 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 8 + v = boost::add_vertex(t); + nodeLabel[v] = "O"; + // node 9 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 5 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(5,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 6 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(6,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-1-"; + // edge 2 - 7 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(7,t), t).first; + edgeLabel[e] = "-1-"; + // edge 3 - 4 + e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 4 - 5 + e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; + edgeLabel[e] = "-1-"; + // edge 7 - 8 + e = boost::add_edge(boost::vertex(7,t), boost::vertex(8,t), t).first; + edgeLabel[e] = "-2-"; + // edge 7 - 9 + e = boost::add_edge(boost::vertex(7,t), boost::vertex(9,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + +#endif /*DATASGMGRAPHS_1_ICC_*/ diff --git a/tests/dataSGMgraphs_2.icc b/tests/dataSGMgraphs_2.icc index c2202d7..e4bfe83 100644 --- a/tests/dataSGMgraphs_2.icc +++ b/tests/dataSGMgraphs_2.icc @@ -1,176 +1,176 @@ -#ifndef DATASGMGRAPHS_2_ICC_ -#define DATASGMGRAPHS_2_ICC_ - -#ifndef DATASGMGRAPHS_GRAPH_CLASS -#define DATASGMGRAPHS_GRAPH_CLASS - -#include -#include - - //! The properties available for the nodes of a graph - typedef boost::property< boost::vertex_index_t, size_t - , boost::property< boost::vertex_name_t, std::string - > > - MyGraph_NodeProperties; - - //! The properties available for the edges of a graph - typedef boost::property< boost::edge_name_t, std::string - > - MyGraph_EdgeProperties; - - //! The definition of undirected graphs - typedef boost::adjacency_list< - boost::vecS, // store edges - boost::vecS, // store vertices - boost::undirectedS, // is an undirected graph - MyGraph_NodeProperties, // (atom symbols etc) - MyGraph_EdgeProperties // (edge symbols etc) - > - MyGraph; - - -#endif // DATASGMGRAPHS_GRAPH_CLASS - - MyGraph - getPattern_2 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n" -" 0(C)\n" -" | | \n" -" 1 1 \n" -" | | \n" -" 1(C)\n" -"\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - MyGraph - getPattern_2_WC (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n" -" 0(C)\n" -" | | \n" -" 1 * \n" -" | | \n" -" 1(*)\n" -"\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "*"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "*"; - - return t; - } - - MyGraph - getTarget_2 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = - "\n=============================================\n\n" - " 0(C)\n" - " | | \n" - " 1 1 \n" - " | | \n" - " 2(C)\n" - " | | \n" - " 1 2 \n" - " | | \n" - " 1(N)\n" - "\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 2 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-2-"; - - return t; - } - - - -#endif /*DATASGMGRAPHS_2_ICC_*/ +#ifndef DATASGMGRAPHS_2_ICC_ +#define DATASGMGRAPHS_2_ICC_ + +#ifndef DATASGMGRAPHS_GRAPH_CLASS +#define DATASGMGRAPHS_GRAPH_CLASS + +#include +#include + + //! The properties available for the nodes of a graph + typedef boost::property< boost::vertex_index_t, size_t + , boost::property< boost::vertex_name_t, std::string + > > + MyGraph_NodeProperties; + + //! The properties available for the edges of a graph + typedef boost::property< boost::edge_name_t, std::string + > + MyGraph_EdgeProperties; + + //! The definition of undirected graphs + typedef boost::adjacency_list< + boost::vecS, // store edges + boost::vecS, // store vertices + boost::undirectedS, // is an undirected graph + MyGraph_NodeProperties, // (atom symbols etc) + MyGraph_EdgeProperties // (edge symbols etc) + > + MyGraph; + + +#endif // DATASGMGRAPHS_GRAPH_CLASS + + MyGraph + getPattern_2 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n" +" 0(C)\n" +" | | \n" +" 1 1 \n" +" | | \n" +" 1(C)\n" +"\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + MyGraph + getPattern_2_WC (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n" +" 0(C)\n" +" | | \n" +" 1 * \n" +" | | \n" +" 1(*)\n" +"\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "*"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "*"; + + return t; + } + + MyGraph + getTarget_2 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = + "\n=============================================\n\n" + " 0(C)\n" + " | | \n" + " 1 1 \n" + " | | \n" + " 2(C)\n" + " | | \n" + " 1 2 \n" + " | | \n" + " 1(N)\n" + "\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 2 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-2-"; + + return t; + } + + + +#endif /*DATASGMGRAPHS_2_ICC_*/ diff --git a/tests/dataSGMgraphs_3.icc b/tests/dataSGMgraphs_3.icc index 6019c12..eaeb208 100644 --- a/tests/dataSGMgraphs_3.icc +++ b/tests/dataSGMgraphs_3.icc @@ -1,164 +1,164 @@ -#ifndef DATASGMGRAPHS_3_ICC_ -#define DATASGMGRAPHS_3_ICC_ - -#ifndef DATASGMGRAPHS_GRAPH_CLASS -#define DATASGMGRAPHS_GRAPH_CLASS - -#include -#include - - //! The properties available for the nodes of a graph - typedef boost::property< boost::vertex_index_t, size_t - , boost::property< boost::vertex_name_t, std::string - > > - MyGraph_NodeProperties; - - //! The properties available for the edges of a graph - typedef boost::property< boost::edge_name_t, std::string - > - MyGraph_EdgeProperties; - - //! The definition of undirected graphs - typedef boost::adjacency_list< - boost::vecS, // store edges - boost::vecS, // store vertices - boost::undirectedS, // is an undirected graph - MyGraph_NodeProperties, // (atom symbols etc) - MyGraph_EdgeProperties // (edge symbols etc) - > - MyGraph; - - -#endif // DATASGMGRAPHS_GRAPH_CLASS - - MyGraph - getPattern_3 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n" -" 0(C)- \n" -" | |\n" -" 1 - \n" -"\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 0 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - MyGraph - getPattern_3_WC (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = -"\n=============================================\n\n" -" 0(*)- \n" -" | |\n" -" * - \n" -"\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "*"; - - // edge 0 - 0 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; - edgeLabel[e] = "*"; - - return t; - } - - MyGraph - getTarget_3 (std::string& graphString) { - - // the target graph to fill - MyGraph t; - - MyGraph::vertex_descriptor v; - - boost::property_map< MyGraph, boost::vertex_name_t >::type - nodeLabel = boost::get( boost::vertex_name_t(), t ); - - MyGraph::edge_descriptor e; - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), t ); - - graphString = - "\n=============================================\n\n" - " 0(C)-1\n" - " | \\/\n" - " 1 \n" - " | \n" - " 1(N)-1\n" - " | \\/\n" - " 2 \n" - " | \n" - " 2(N)-2\n" - " \\/\n" - "\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "N"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-2-"; - // loop 0 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; - edgeLabel[e] = "-1-"; - // loop 1 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // loop 2 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-2-"; - - return t; - } - - - -#endif /*DATASGMGRAPHS_3_ICC_*/ +#ifndef DATASGMGRAPHS_3_ICC_ +#define DATASGMGRAPHS_3_ICC_ + +#ifndef DATASGMGRAPHS_GRAPH_CLASS +#define DATASGMGRAPHS_GRAPH_CLASS + +#include +#include + + //! The properties available for the nodes of a graph + typedef boost::property< boost::vertex_index_t, size_t + , boost::property< boost::vertex_name_t, std::string + > > + MyGraph_NodeProperties; + + //! The properties available for the edges of a graph + typedef boost::property< boost::edge_name_t, std::string + > + MyGraph_EdgeProperties; + + //! The definition of undirected graphs + typedef boost::adjacency_list< + boost::vecS, // store edges + boost::vecS, // store vertices + boost::undirectedS, // is an undirected graph + MyGraph_NodeProperties, // (atom symbols etc) + MyGraph_EdgeProperties // (edge symbols etc) + > + MyGraph; + + +#endif // DATASGMGRAPHS_GRAPH_CLASS + + MyGraph + getPattern_3 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n" +" 0(C)- \n" +" | |\n" +" 1 - \n" +"\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 0 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + MyGraph + getPattern_3_WC (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = +"\n=============================================\n\n" +" 0(*)- \n" +" | |\n" +" * - \n" +"\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "*"; + + // edge 0 - 0 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; + edgeLabel[e] = "*"; + + return t; + } + + MyGraph + getTarget_3 (std::string& graphString) { + + // the target graph to fill + MyGraph t; + + MyGraph::vertex_descriptor v; + + boost::property_map< MyGraph, boost::vertex_name_t >::type + nodeLabel = boost::get( boost::vertex_name_t(), t ); + + MyGraph::edge_descriptor e; + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), t ); + + graphString = + "\n=============================================\n\n" + " 0(C)-1\n" + " | \\/\n" + " 1 \n" + " | \n" + " 1(N)-1\n" + " | \\/\n" + " 2 \n" + " | \n" + " 2(N)-2\n" + " \\/\n" + "\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "N"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-2-"; + // loop 0 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(0,t), t).first; + edgeLabel[e] = "-1-"; + // loop 1 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // loop 2 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-2-"; + + return t; + } + + + +#endif /*DATASGMGRAPHS_3_ICC_*/ diff --git a/tests/dataTargetGraph_1.icc b/tests/dataTargetGraph_1.icc index 2d0805a..f9517bd 100644 --- a/tests/dataTargetGraph_1.icc +++ b/tests/dataTargetGraph_1.icc @@ -1,69 +1,69 @@ -#ifndef DATATARGETGRAPH_1_ICC_ -#define DATATARGETGRAPH_1_ICC_ - -#include - - ggl::Graph - getTarget_1 (std::string& graphString) { - - // the target graph to fill - ggl::Graph t; - - ggl::Graph::vertex_descriptor v; - boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type - nodeLabel = boost::get( ggl::PropNodeLabel(), t ); - - ggl::Graph::edge_descriptor e; - boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type - edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); - - graphString = -"\n=============================================\n\n\ - 0(A) -1- 1(B) -1- 2(A)\n\ - | | / \n\ - 2 2 2 \n\ - | | / \n\ - 3(C) -1- 4(C) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "A"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "A"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 4 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-2-"; - // edge 1 - 4 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 2 - 4 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 3 - 4 - e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - -#endif /*DATATARGETGRAPH_1_ICC_*/ +#ifndef DATATARGETGRAPH_1_ICC_ +#define DATATARGETGRAPH_1_ICC_ + +#include + + ggl::Graph + getTarget_1 (std::string& graphString) { + + // the target graph to fill + ggl::Graph t; + + ggl::Graph::vertex_descriptor v; + boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type + nodeLabel = boost::get( ggl::PropNodeLabel(), t ); + + ggl::Graph::edge_descriptor e; + boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type + edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); + + graphString = +"\n=============================================\n\n\ + 0(A) -1- 1(B) -1- 2(A)\n\ + | | / \n\ + 2 2 2 \n\ + | | / \n\ + 3(C) -1- 4(C) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "A"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "A"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 4 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-2-"; + // edge 1 - 4 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 2 - 4 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 3 - 4 + e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + +#endif /*DATATARGETGRAPH_1_ICC_*/ diff --git a/tests/dataTargetGraph_2.icc b/tests/dataTargetGraph_2.icc index a091801..40b0835 100644 --- a/tests/dataTargetGraph_2.icc +++ b/tests/dataTargetGraph_2.icc @@ -1,86 +1,86 @@ -#ifndef DATATARGETGRAPH_2_ICC_ -#define DATATARGETGRAPH_2_ICC_ - -#include - - ggl::Graph - getTarget_2 (std::string& graphString) { - - // the target graph to fill - ggl::Graph t; - - ggl::Graph::vertex_descriptor v; - boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type - nodeLabel = boost::get( ggl::PropNodeLabel(), t ); - - ggl::Graph::edge_descriptor e; - boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type - edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); - - graphString = -"\n=============================================\n\n\ - 0(B) -1- 1(D) -1- 2(B) \n\ - | \\ | / \n\ - 2 3 2 3 \n\ - | \\ | / \n\ - 3(C) -1- 4(C) -0- 5(A) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "D"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 4 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 5 - v = boost::add_vertex(t); - nodeLabel[v] = "A"; - -// "\n===================== -// 0(B) -1- 1(D) -1- 2(B) -// | \ | / -// 2 3 2 3 -// | \ | / -// 3(C) -1- 4(C) -0- 5(A) -// \n====================== - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-2-"; - // edge 0 - 4 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-3-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 4 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 2 - 4 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-3-"; - // edge 3 - 4 - e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-1-"; - // edge 4 - 5 - e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; - edgeLabel[e] = "-0-"; - - return t; - } - - - -#endif /*DATATARGETGRAPH_2_ICC_*/ +#ifndef DATATARGETGRAPH_2_ICC_ +#define DATATARGETGRAPH_2_ICC_ + +#include + + ggl::Graph + getTarget_2 (std::string& graphString) { + + // the target graph to fill + ggl::Graph t; + + ggl::Graph::vertex_descriptor v; + boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type + nodeLabel = boost::get( ggl::PropNodeLabel(), t ); + + ggl::Graph::edge_descriptor e; + boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type + edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); + + graphString = +"\n=============================================\n\n\ + 0(B) -1- 1(D) -1- 2(B) \n\ + | \\ | / \n\ + 2 3 2 3 \n\ + | \\ | / \n\ + 3(C) -1- 4(C) -0- 5(A) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "D"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 4 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 5 + v = boost::add_vertex(t); + nodeLabel[v] = "A"; + +// "\n===================== +// 0(B) -1- 1(D) -1- 2(B) +// | \ | / +// 2 3 2 3 +// | \ | / +// 3(C) -1- 4(C) -0- 5(A) +// \n====================== + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-2-"; + // edge 0 - 4 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-3-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 4 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 2 - 4 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-3-"; + // edge 3 - 4 + e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-1-"; + // edge 4 - 5 + e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; + edgeLabel[e] = "-0-"; + + return t; + } + + + +#endif /*DATATARGETGRAPH_2_ICC_*/ diff --git a/tests/dataTargetGraph_3.icc b/tests/dataTargetGraph_3.icc index fc9f39c..1ef1775 100644 --- a/tests/dataTargetGraph_3.icc +++ b/tests/dataTargetGraph_3.icc @@ -1,89 +1,89 @@ -#ifndef DATATARGETGRAPH_3_ICC_ -#define DATATARGETGRAPH_3_ICC_ - -#include - - ggl::Graph - getTarget_3 (std::string& graphString) { - - // the target graph to fill - ggl::Graph t; - - ggl::Graph::vertex_descriptor v; - boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type - nodeLabel = boost::get( ggl::PropNodeLabel(), t ); - - ggl::Graph::edge_descriptor e; - boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type - edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); - - graphString = -"\n=============================================\n\n\ - 0(B) -1- 1(D) -1- 2(B) \n\ - | \\ | / | \n\ - 2 3 2 3 1 \n\ - | \\ | / | \n\ - 3(C) -1- 4(C) -0- 5(A) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "D"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 4 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 5 - v = boost::add_vertex(t); - nodeLabel[v] = "A"; - -// "\n===================== -// 0(B) -1- 1(D) -1- 2(B) -// | \ | /| -// 2 3 2 3 1 -// | \ | / | -// 3(C) -1- 4(C) -0- 5(A) -// \n====================== - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-2-"; - // edge 0 - 4 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-3-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 4 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 2 - 4 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-3-"; - // edge 2 - 5 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(5,t), t).first; - edgeLabel[e] = "-1-"; - // edge 3 - 4 - e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-1-"; - // edge 4 - 5 - e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; - edgeLabel[e] = "-0-"; - - return t; - } - - - -#endif /*DATATARGETGRAPH_3_ICC_*/ +#ifndef DATATARGETGRAPH_3_ICC_ +#define DATATARGETGRAPH_3_ICC_ + +#include + + ggl::Graph + getTarget_3 (std::string& graphString) { + + // the target graph to fill + ggl::Graph t; + + ggl::Graph::vertex_descriptor v; + boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type + nodeLabel = boost::get( ggl::PropNodeLabel(), t ); + + ggl::Graph::edge_descriptor e; + boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type + edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); + + graphString = +"\n=============================================\n\n\ + 0(B) -1- 1(D) -1- 2(B) \n\ + | \\ | / | \n\ + 2 3 2 3 1 \n\ + | \\ | / | \n\ + 3(C) -1- 4(C) -0- 5(A) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "D"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 4 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 5 + v = boost::add_vertex(t); + nodeLabel[v] = "A"; + +// "\n===================== +// 0(B) -1- 1(D) -1- 2(B) +// | \ | /| +// 2 3 2 3 1 +// | \ | / | +// 3(C) -1- 4(C) -0- 5(A) +// \n====================== + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-2-"; + // edge 0 - 4 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-3-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 4 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 2 - 4 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-3-"; + // edge 2 - 5 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(5,t), t).first; + edgeLabel[e] = "-1-"; + // edge 3 - 4 + e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-1-"; + // edge 4 - 5 + e = boost::add_edge(boost::vertex(4,t), boost::vertex(5,t), t).first; + edgeLabel[e] = "-0-"; + + return t; + } + + + +#endif /*DATATARGETGRAPH_3_ICC_*/ diff --git a/tests/dataTargetGraph_4.icc b/tests/dataTargetGraph_4.icc index 8b2e9a0..3ba7e50 100644 --- a/tests/dataTargetGraph_4.icc +++ b/tests/dataTargetGraph_4.icc @@ -1,69 +1,69 @@ -#ifndef DATATARGETGRAPH_4_ICC_ -#define DATATARGETGRAPH_4_ICC_ - -#include - - ggl::Graph - getTarget_4 (std::string& graphString) { - - // the target graph to fill - ggl::Graph t; - - ggl::Graph::vertex_descriptor v; - boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type - nodeLabel = boost::get( ggl::PropNodeLabel(), t ); - - ggl::Graph::edge_descriptor e; - boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type - edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); - - graphString = -"\n=============================================\n\n\ - 0(A) -1- 1(B) -1- 2(A|A)\n\ - | | / \n\ - 2 2 2 \n\ - | | / \n\ - 3(C) -1- 4(C) \n\ -\n=============================================\n"; - - // node 0 - v = boost::add_vertex(t); - nodeLabel[v] = "A"; - // node 1 - v = boost::add_vertex(t); - nodeLabel[v] = "B"; - // node 2 - v = boost::add_vertex(t); - nodeLabel[v] = "A|A"; - // node 3 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - // node 4 - v = boost::add_vertex(t); - nodeLabel[v] = "C"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; - edgeLabel[e] = "-1-"; - // edge 1 - 2 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; - edgeLabel[e] = "-1-"; - // edge 0 - 3 - e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; - edgeLabel[e] = "-2-"; - // edge 1 - 4 - e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 2 - 4 - e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-2-"; - // edge 3 - 4 - e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; - edgeLabel[e] = "-1-"; - - return t; - } - - - -#endif /*DATATARGETGRAPH_4_ICC_*/ +#ifndef DATATARGETGRAPH_4_ICC_ +#define DATATARGETGRAPH_4_ICC_ + +#include + + ggl::Graph + getTarget_4 (std::string& graphString) { + + // the target graph to fill + ggl::Graph t; + + ggl::Graph::vertex_descriptor v; + boost::property_map< ggl::Graph, ggl::PropNodeLabel >::type + nodeLabel = boost::get( ggl::PropNodeLabel(), t ); + + ggl::Graph::edge_descriptor e; + boost::property_map< ggl::Graph, ggl::PropEdgeLabel >::type + edgeLabel = boost::get( ggl::PropEdgeLabel(), t ); + + graphString = +"\n=============================================\n\n\ + 0(A) -1- 1(B) -1- 2(A|A)\n\ + | | / \n\ + 2 2 2 \n\ + | | / \n\ + 3(C) -1- 4(C) \n\ +\n=============================================\n"; + + // node 0 + v = boost::add_vertex(t); + nodeLabel[v] = "A"; + // node 1 + v = boost::add_vertex(t); + nodeLabel[v] = "B"; + // node 2 + v = boost::add_vertex(t); + nodeLabel[v] = "A|A"; + // node 3 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + // node 4 + v = boost::add_vertex(t); + nodeLabel[v] = "C"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(1,t), t).first; + edgeLabel[e] = "-1-"; + // edge 1 - 2 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(2,t), t).first; + edgeLabel[e] = "-1-"; + // edge 0 - 3 + e = boost::add_edge(boost::vertex(0,t), boost::vertex(3,t), t).first; + edgeLabel[e] = "-2-"; + // edge 1 - 4 + e = boost::add_edge(boost::vertex(1,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 2 - 4 + e = boost::add_edge(boost::vertex(2,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-2-"; + // edge 3 - 4 + e = boost::add_edge(boost::vertex(3,t), boost::vertex(4,t), t).first; + edgeLabel[e] = "-1-"; + + return t; + } + + + +#endif /*DATATARGETGRAPH_4_ICC_*/ diff --git a/tests/dielsalder/da1.gml b/tests/dielsalder/da1.gml index d7266eb..f1162c2 100644 --- a/tests/dielsalder/da1.gml +++ b/tests/dielsalder/da1.gml @@ -1,9 +1,9 @@ -graph [ - node [ id 0 label "C" ] - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "C" ] - edge [ source 0 target 1 label "=" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "=" ] -] +graph [ + node [ id 0 label "C" ] + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "C" ] + edge [ source 0 target 1 label "=" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "=" ] +] diff --git a/tests/dielsalder/da2.gml b/tests/dielsalder/da2.gml index d91d38a..a4e6b4e 100644 --- a/tests/dielsalder/da2.gml +++ b/tests/dielsalder/da2.gml @@ -1,5 +1,5 @@ -graph [ - node [ id 0 label "C" ] - node [ id 1 label "C" ] - edge [ source 0 target 1 label "=" ] -] +graph [ + node [ id 0 label "C" ] + node [ id 1 label "C" ] + edge [ source 0 target 1 label "=" ] +] diff --git a/tests/dielsalder/da2.smi b/tests/dielsalder/da2.smi index e5d2ca4..bcbd01e 100644 --- a/tests/dielsalder/da2.smi +++ b/tests/dielsalder/da2.smi @@ -1 +1 @@ -C=C +C=C diff --git a/tests/dielsalder/da_rule.gml b/tests/dielsalder/da_rule.gml index 1992aee..275178d 100644 --- a/tests/dielsalder/da_rule.gml +++ b/tests/dielsalder/da_rule.gml @@ -1,28 +1,28 @@ -rule [ - ruleID "Diels-Alder reaction" - context [ - node [ id 0 label "C" ] - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "C" ] - node [ id 4 label "C" ] - node [ id 5 label "C" ] - ] - left [ - edge [ source 1 target 2 label "=" ] - edge [ source 4 target 5 label "-" ] - edge [ source 3 target 4 label "=" ] - edge [ source 0 target 5 label "=" ] - constrainNoEdge [ source 0 target 2 ] - constrainNoEdge [ source 3 target 1 ] - ] - right [ - edge [ source 0 target 1 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 4 target 5 label "=" ] - edge [ source 5 target 0 label "-" ] - ] -] - +rule [ + ruleID "Diels-Alder reaction" + context [ + node [ id 0 label "C" ] + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "C" ] + node [ id 4 label "C" ] + node [ id 5 label "C" ] + ] + left [ + edge [ source 1 target 2 label "=" ] + edge [ source 4 target 5 label "-" ] + edge [ source 3 target 4 label "=" ] + edge [ source 0 target 5 label "=" ] + constrainNoEdge [ source 0 target 2 ] + constrainNoEdge [ source 3 target 1 ] + ] + right [ + edge [ source 0 target 1 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 4 target 5 label "=" ] + edge [ source 5 target 0 label "-" ] + ] +] + diff --git a/tests/game-of-life/gof.glider b/tests/game-of-life/gof.glider index 9ce3b5b..506afbf 100644 --- a/tests/game-of-life/gof.glider +++ b/tests/game-of-life/gof.glider @@ -1,6 +1,6 @@ -0 1 0 0 0 0 0 0 -0 0 1 0 0 0 0 0 -1 1 1 0 0 0 0 0 -0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 +1 1 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 diff --git a/tests/game-of-life/gof.gun b/tests/game-of-life/gof.gun index f14f26d..9223ec3 100644 --- a/tests/game-of-life/gof.gun +++ b/tests/game-of-life/gof.gun @@ -1,31 +1,31 @@ -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/game-of-life/gof.rules b/tests/game-of-life/gof.rules index 5eea840..b5e96a6 100644 --- a/tests/game-of-life/gof.rules +++ b/tests/game-of-life/gof.rules @@ -1,60 +1,60 @@ - -# birth rule -rule [ - ruleID "birth : me = 0 and 3 neighbors = 1" - left [ - node [ id 0 label "0" ] - ] - right [ - node [ id 0 label "1" ] - ] - constrainAdj [ - id 0 - op = - count 3 - nodeLabels [ - label "1" - ] - ] -] - -# high population death rule -rule [ - ruleID "death-1 : me = 1 and >3 neighbors = 1" - left [ - node [ id 0 label "1" ] - ] - right [ - node [ id 0 label "0" ] - ] - constrainAdj [ - id 0 - op > - count 3 - nodeLabels [ - label "1" - ] - ] -] - -# low population death rule -rule [ - ruleID "death-2 : me = 1 and <2 neighbors = 1" - left [ - node [ id 0 label "1" ] - ] - right [ - node [ id 0 label "0" ] - ] - constrainAdj [ - id 0 - op < - count 2 - nodeLabels [ - label "1" - ] - ] -] - - - + +# birth rule +rule [ + ruleID "birth : me = 0 and 3 neighbors = 1" + left [ + node [ id 0 label "0" ] + ] + right [ + node [ id 0 label "1" ] + ] + constrainAdj [ + id 0 + op = + count 3 + nodeLabels [ + label "1" + ] + ] +] + +# high population death rule +rule [ + ruleID "death-1 : me = 1 and >3 neighbors = 1" + left [ + node [ id 0 label "1" ] + ] + right [ + node [ id 0 label "0" ] + ] + constrainAdj [ + id 0 + op > + count 3 + nodeLabels [ + label "1" + ] + ] +] + +# low population death rule +rule [ + ruleID "death-2 : me = 1 and <2 neighbors = 1" + left [ + node [ id 0 label "1" ] + ] + right [ + node [ id 0 label "0" ] + ] + constrainAdj [ + id 0 + op < + count 2 + nodeLabels [ + label "1" + ] + ] +] + + + diff --git a/tests/hanser/cube.input b/tests/hanser/cube.input index 2e525e7..14f85ac 100644 --- a/tests/hanser/cube.input +++ b/tests/hanser/cube.input @@ -1,22 +1,22 @@ -graph [ - node [ id 1 label "1" ] - node [ id 2 label "2" ] - node [ id 3 label "3" ] - node [ id 4 label "4" ] - node [ id 5 label "5" ] - node [ id 6 label "6" ] - node [ id 7 label "7" ] - node [ id 8 label "8" ] - edge [ source 1 target 2 label "-" ] - edge [ source 1 target 3 label "-" ] - edge [ source 1 target 5 label "-" ] - edge [ source 2 target 4 label "-" ] - edge [ source 2 target 6 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 3 target 7 label "-" ] - edge [ source 4 target 8 label "-" ] - edge [ source 5 target 6 label "-" ] - edge [ source 5 target 7 label "-" ] - edge [ source 6 target 8 label "-" ] - edge [ source 7 target 8 label "-" ] -] +graph [ + node [ id 1 label "1" ] + node [ id 2 label "2" ] + node [ id 3 label "3" ] + node [ id 4 label "4" ] + node [ id 5 label "5" ] + node [ id 6 label "6" ] + node [ id 7 label "7" ] + node [ id 8 label "8" ] + edge [ source 1 target 2 label "-" ] + edge [ source 1 target 3 label "-" ] + edge [ source 1 target 5 label "-" ] + edge [ source 2 target 4 label "-" ] + edge [ source 2 target 6 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 3 target 7 label "-" ] + edge [ source 4 target 8 label "-" ] + edge [ source 5 target 6 label "-" ] + edge [ source 5 target 7 label "-" ] + edge [ source 6 target 8 label "-" ] + edge [ source 7 target 8 label "-" ] +] diff --git a/tests/hanser/four-fused-rings.input b/tests/hanser/four-fused-rings.input index eb4be48..a6a7246 100644 --- a/tests/hanser/four-fused-rings.input +++ b/tests/hanser/four-fused-rings.input @@ -1,39 +1,39 @@ -graph [ - node [ id 0 label "a" ] - node [ id 1 label "b" ] - node [ id 2 label "c" ] - node [ id 3 label "d" ] - node [ id 4 label "e" ] - node [ id 5 label "f" ] - node [ id 6 label "g" ] - node [ id 7 label "h" ] - node [ id 8 label "i" ] - node [ id 9 label "j" ] - node [ id 10 label "k" ] - node [ id 11 label "l" ] - node [ id 12 label "m" ] - node [ id 13 label "n" ] - node [ id 14 label "o" ] - node [ id 15 label "p" ] - node [ id 16 label "q" ] - edge [ source 0 target 1 label "-" ] - edge [ source 0 target 5 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "-" ] - edge [ source 2 target 6 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 3 target 9 label "-" ] - edge [ source 4 target 5 label "-" ] - edge [ source 6 target 7 label "-" ] - edge [ source 6 target 10 label "-" ] - edge [ source 7 target 8 label "-" ] - edge [ source 7 target 13 label "-" ] - edge [ source 8 target 9 label "-" ] - edge [ source 10 target 11 label "-" ] - edge [ source 11 target 12 label "-" ] - edge [ source 12 target 13 label "-" ] - edge [ source 12 target 14 label "-" ] - edge [ source 13 target 16 label "-" ] - edge [ source 14 target 15 label "-" ] - edge [ source 15 target 16 label "-" ] -] +graph [ + node [ id 0 label "a" ] + node [ id 1 label "b" ] + node [ id 2 label "c" ] + node [ id 3 label "d" ] + node [ id 4 label "e" ] + node [ id 5 label "f" ] + node [ id 6 label "g" ] + node [ id 7 label "h" ] + node [ id 8 label "i" ] + node [ id 9 label "j" ] + node [ id 10 label "k" ] + node [ id 11 label "l" ] + node [ id 12 label "m" ] + node [ id 13 label "n" ] + node [ id 14 label "o" ] + node [ id 15 label "p" ] + node [ id 16 label "q" ] + edge [ source 0 target 1 label "-" ] + edge [ source 0 target 5 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "-" ] + edge [ source 2 target 6 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 3 target 9 label "-" ] + edge [ source 4 target 5 label "-" ] + edge [ source 6 target 7 label "-" ] + edge [ source 6 target 10 label "-" ] + edge [ source 7 target 8 label "-" ] + edge [ source 7 target 13 label "-" ] + edge [ source 8 target 9 label "-" ] + edge [ source 10 target 11 label "-" ] + edge [ source 11 target 12 label "-" ] + edge [ source 12 target 13 label "-" ] + edge [ source 12 target 14 label "-" ] + edge [ source 13 target 16 label "-" ] + edge [ source 14 target 15 label "-" ] + edge [ source 15 target 16 label "-" ] +] diff --git a/tests/hanser/hanser.rules b/tests/hanser/hanser.rules index b6a8d88..f4ed38b 100644 --- a/tests/hanser/hanser.rules +++ b/tests/hanser/hanser.rules @@ -1,859 +1,859 @@ -rule [ - ruleID "remove single node" - wildcard "*" - left [ - node [ id 0 label "V" ] - ] - constrainAdj [ - id 0 - op = - count 0 - edgeLabels [ - label "*" - ] - ] - ] - - - - -rule [ - ruleID "remove dangling end" - wildcard "*" - left [ - node [ id 1 label "*" ] - ] - constrainAdj [ - id 1 - op = - count 1 - ] - ] - - - -rule [ - ruleID "compress crossing 5 to paths without loops" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - node [ id 5 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - edge [ source 0 target 5 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 5 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - node [ id 11 label "E" ] - node [ id 12 label "E" ] - node [ id 13 label "E" ] - node [ id 14 label "E" ] - node [ id 15 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 3 id 7 ] - copyAndPaste [ source 0 target 1 id 8 ] - copyAndPaste [ source 0 target 4 id 8 ] - copyAndPaste [ source 0 target 1 id 9 ] - copyAndPaste [ source 0 target 5 id 9 ] - copyAndPaste [ source 0 target 2 id 10 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 2 id 11 ] - copyAndPaste [ source 0 target 4 id 11 ] - copyAndPaste [ source 0 target 2 id 12 ] - copyAndPaste [ source 0 target 5 id 12 ] - copyAndPaste [ source 0 target 3 id 13 ] - copyAndPaste [ source 0 target 4 id 13 ] - copyAndPaste [ source 0 target 3 id 14 ] - copyAndPaste [ source 0 target 5 id 14 ] - copyAndPaste [ source 0 target 4 id 15 ] - copyAndPaste [ source 0 target 5 id 15 ] - ] - -rule [ - ruleID "compress crossing 5 to paths with loops" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - node [ id 5 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 0 label "*" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - edge [ source 0 target 5 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 6 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - node [ id 11 label "E" ] - node [ id 12 label "E" ] - node [ id 13 label "E" ] - node [ id 14 label "E" ] - node [ id 15 label "E" ] - ] - copyAndPaste [ source 0 target 0 id 6 ] - copyAndPaste [ source 0 target 0 id 7 ] - copyAndPaste [ source 0 target 0 id 8 ] - copyAndPaste [ source 0 target 0 id 9 ] - copyAndPaste [ source 0 target 0 id 10 ] - copyAndPaste [ source 0 target 0 id 11 ] - copyAndPaste [ source 0 target 0 id 12 ] - copyAndPaste [ source 0 target 0 id 13 ] - copyAndPaste [ source 0 target 0 id 14 ] - copyAndPaste [ source 0 target 0 id 15 ] - - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 3 id 7 ] - copyAndPaste [ source 0 target 0 id 8 ] - copyAndPaste [ source 0 target 1 id 8 ] - copyAndPaste [ source 0 target 4 id 8 ] - copyAndPaste [ source 0 target 1 id 9 ] - copyAndPaste [ source 0 target 5 id 9 ] - copyAndPaste [ source 0 target 2 id 10 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 2 id 11 ] - copyAndPaste [ source 0 target 4 id 11 ] - copyAndPaste [ source 0 target 2 id 12 ] - copyAndPaste [ source 0 target 5 id 12 ] - copyAndPaste [ source 0 target 3 id 13 ] - copyAndPaste [ source 0 target 4 id 13 ] - copyAndPaste [ source 0 target 3 id 14 ] - copyAndPaste [ source 0 target 5 id 14 ] - copyAndPaste [ source 0 target 4 id 15 ] - copyAndPaste [ source 0 target 5 id 15 ] - ] - - -rule [ - ruleID "compress crossing 4 to paths without loop" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 4 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 5 label "E" ] - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 2 id 5 ] - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 4 id 7 ] - copyAndPaste [ source 0 target 2 id 8 ] - copyAndPaste [ source 0 target 3 id 8 ] - copyAndPaste [ source 0 target 2 id 9 ] - copyAndPaste [ source 0 target 4 id 9 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 4 id 10 ] - ] - -rule [ - ruleID "compress crossing 4 to paths with loop" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 0 label "*" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 5 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 5 label "E" ] - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - ] - copyAndPaste [ source 0 target 0 id 5 ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 2 id 5 ] - copyAndPaste [ source 0 target 0 id 6 ] - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - copyAndPaste [ source 0 target 0 id 7 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 4 id 7 ] - copyAndPaste [ source 0 target 0 id 8 ] - copyAndPaste [ source 0 target 2 id 8 ] - copyAndPaste [ source 0 target 3 id 8 ] - copyAndPaste [ source 0 target 0 id 9 ] - copyAndPaste [ source 0 target 2 id 9 ] - copyAndPaste [ source 0 target 4 id 9 ] - copyAndPaste [ source 0 target 0 id 10 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 4 id 10 ] - ] - -rule [ - ruleID "compress crossing 3 to paths without loops" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 3 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 4 label "E" ] - node [ id 5 label "E" ] - node [ id 6 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 4 ] - copyAndPaste [ source 0 target 2 id 4 ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 3 id 5 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - ] - -rule [ - ruleID "compress crossing 3 to paths with loops" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - ] - left [ - node [ id 0 label "E" ] - edge [ source 0 target 0 label "*" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 4 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 4 label "E" ] - node [ id 5 label "E" ] - node [ id 6 label "E" ] - ] - copyAndPaste [ source 0 target 0 id 4 ] - copyAndPaste [ source 0 target 1 id 4 ] - copyAndPaste [ source 0 target 2 id 4 ] - copyAndPaste [ source 0 target 0 id 5 ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 3 id 5 ] - copyAndPaste [ source 0 target 0 id 6 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - ] - - -rule [ - ruleID "compress path without loop without neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - node [ id 2 label "*" ] - edge [ source 1 target 2 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - ] - constrainNoEdge [ source 1 target 1 ] - constrainNoEdge [ source 3 target 3 ] - constrainAdj [ - id 3 - op = - count 2 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 2 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - -rule [ - ruleID "compress path without loop with neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - node [ id 2 label "*" ] - edge [ source 1 target 2 label "*" ] - edge [ source 1 target 1 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - ] - constrainNoEdge [ source 3 target 3 ] - constrainAdj [ - id 3 - op = - count 2 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 3 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - -rule [ - ruleID "compress path with loop with neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - node [ id 2 label "*" ] - edge [ source 1 target 2 label "*" ] - edge [ source 1 target 1 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - edge [ source 3 target 3 label "*" ] - ] - constrainAdj [ - id 3 - op = - count 3 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 3 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - -rule [ - ruleID "compress ring path without loop without neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - edge [ source 0 target 1 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - ] - constrainNoEdge [ source 3 target 3 ] - constrainNoEdge [ source 1 target 1 ] - constrainAdj [ - id 3 - op = - count 2 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 2 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - -rule [ - ruleID "compress ring path without loop with neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 1 target 1 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - ] - constrainNoEdge [ source 3 target 3 ] - constrainAdj [ - id 3 - op = - count 2 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 3 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - -rule [ - ruleID "compress ring path with loop with neighbored loop" - wildcard "*" - context [ - node [ id 0 label "*" ] - node [ id 1 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 1 target 1 label "*" ] - ] - left [ - node [ id 3 label "E" ] - edge [ source 0 target 3 label "*" ] - edge [ source 1 target 3 label "*" ] - edge [ source 3 target 3 label "*" ] - ] - constrainAdj [ - id 3 - op = - count 3 - nodeLabels [ label "*" ] - ] - constrainAdj [ - id 1 - op = - count 3 - nodeLabels [ label "*" ] - ] - copyAndPaste [ source 3 id 1 ] - ] - - - -rule [ - ruleID "close and decouple ring without loop" - wildcard "*" - context [ - node [ id 0 label "V" ] - ] - left [ - node [ id 1 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 1 label "*" ] - ] - constrainNoEdge [ source 1 target 1 ] - constrainAdj [ - id 1 - op = - count 1 - nodeLabels [ label "*" ] - ] - right [ - node [ id 1 label "ring" ] - ] - copyAndPaste [ source 0 target 1 id 1 ] - ] - -rule [ - ruleID "close and decouple ring with loops" - wildcard "*" - context [ - node [ id 0 label "V" ] - ] - left [ - node [ id 1 label "E" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 1 label "*" ] - edge [ source 1 target 1 label "*" ] - ] - constrainAdj [ - id 1 - op = - count 2 - nodeLabels [ label "*" ] - ] - right [ - node [ id 2 label "ring" ] - ] - copyAndPaste [ source 1 id 2 ] - copyAndPaste [ source 0 target 1 id 2 ] - ] - - -rule [ - ruleID "transform crossing 3 to paths" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - ] - left [ - node [ id 0 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 3 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 4 label "E" ] - node [ id 5 label "E" ] - node [ id 6 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 4 ] - copyAndPaste [ source 0 target 2 id 4 ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 3 id 5 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - ] - - -rule [ - ruleID "transform crossing 4 to paths" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - ] - left [ - node [ id 0 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 4 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 5 label "E" ] - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 5 ] - copyAndPaste [ source 0 target 2 id 5 ] - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 3 id 6 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 4 id 7 ] - copyAndPaste [ source 0 target 2 id 8 ] - copyAndPaste [ source 0 target 3 id 8 ] - copyAndPaste [ source 0 target 2 id 9 ] - copyAndPaste [ source 0 target 4 id 9 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 4 id 10 ] - ] - - -rule [ - ruleID "transform crossing 5 to paths" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - node [ id 5 label "*" ] - ] - left [ - node [ id 0 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - edge [ source 0 target 5 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 5 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 6 label "E" ] - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - node [ id 11 label "E" ] - node [ id 12 label "E" ] - node [ id 13 label "E" ] - node [ id 14 label "E" ] - node [ id 15 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 6 ] - copyAndPaste [ source 0 target 2 id 6 ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 3 id 7 ] - copyAndPaste [ source 0 target 1 id 8 ] - copyAndPaste [ source 0 target 4 id 8 ] - copyAndPaste [ source 0 target 1 id 9 ] - copyAndPaste [ source 0 target 5 id 9 ] - copyAndPaste [ source 0 target 2 id 10 ] - copyAndPaste [ source 0 target 3 id 10 ] - copyAndPaste [ source 0 target 2 id 11 ] - copyAndPaste [ source 0 target 4 id 11 ] - copyAndPaste [ source 0 target 2 id 12 ] - copyAndPaste [ source 0 target 5 id 12 ] - copyAndPaste [ source 0 target 3 id 13 ] - copyAndPaste [ source 0 target 4 id 13 ] - copyAndPaste [ source 0 target 3 id 14 ] - copyAndPaste [ source 0 target 5 id 14 ] - copyAndPaste [ source 0 target 4 id 15 ] - copyAndPaste [ source 0 target 5 id 15 ] - ] - - -rule [ - ruleID "transform crossing 6 to paths" - wildcard "*" - context [ - node [ id 1 label "*" ] - node [ id 2 label "*" ] - node [ id 3 label "*" ] - node [ id 4 label "*" ] - node [ id 5 label "*" ] - node [ id 6 label "*" ] - ] - left [ - node [ id 0 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 0 target 2 label "*" ] - edge [ source 0 target 3 label "*" ] - edge [ source 0 target 4 label "*" ] - edge [ source 0 target 5 label "*" ] - edge [ source 0 target 6 label "*" ] - ] - constrainAdj [ - id 0 - op = - count 6 - nodeLabels [ - label "*" - ] - ] - right [ - node [ id 7 label "E" ] - node [ id 8 label "E" ] - node [ id 9 label "E" ] - node [ id 10 label "E" ] - node [ id 11 label "E" ] - node [ id 12 label "E" ] - node [ id 13 label "E" ] - node [ id 14 label "E" ] - node [ id 15 label "E" ] - node [ id 16 label "E" ] - node [ id 17 label "E" ] - node [ id 18 label "E" ] - node [ id 19 label "E" ] - node [ id 20 label "E" ] - node [ id 21 label "E" ] - node [ id 22 label "E" ] - ] - copyAndPaste [ source 0 target 1 id 7 ] - copyAndPaste [ source 0 target 2 id 7 ] - copyAndPaste [ source 0 target 1 id 8 ] - copyAndPaste [ source 0 target 3 id 8 ] - copyAndPaste [ source 0 target 1 id 9 ] - copyAndPaste [ source 0 target 4 id 9 ] - copyAndPaste [ source 0 target 1 id 10 ] - copyAndPaste [ source 0 target 5 id 10 ] - copyAndPaste [ source 0 target 1 id 11 ] - copyAndPaste [ source 0 target 6 id 11 ] - - copyAndPaste [ source 0 target 2 id 12 ] - copyAndPaste [ source 0 target 3 id 12 ] - copyAndPaste [ source 0 target 2 id 13 ] - copyAndPaste [ source 0 target 4 id 14 ] - copyAndPaste [ source 0 target 2 id 15 ] - copyAndPaste [ source 0 target 5 id 15 ] - copyAndPaste [ source 0 target 2 id 16 ] - copyAndPaste [ source 0 target 6 id 16 ] - - copyAndPaste [ source 0 target 3 id 17 ] - copyAndPaste [ source 0 target 4 id 17 ] - copyAndPaste [ source 0 target 3 id 18 ] - copyAndPaste [ source 0 target 5 id 18 ] - copyAndPaste [ source 0 target 3 id 19 ] - copyAndPaste [ source 0 target 6 id 19 ] - - copyAndPaste [ source 0 target 4 id 20 ] - copyAndPaste [ source 0 target 5 id 20 ] - copyAndPaste [ source 0 target 4 id 21 ] - copyAndPaste [ source 0 target 6 id 21 ] - - copyAndPaste [ source 0 target 5 id 22 ] - copyAndPaste [ source 0 target 6 id 22 ] - - ] - - - -rule [ - ruleID "transform vertex to edge" - wildcard "*" - context [ - node [ id 0 label "V" ] - node [ id 2 label "V" ] - ] - left [ - node [ id 1 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 1 target 2 label "*" ] - ] - right [ - node [ id 3 label "E" ] - ] - constrainAdj [ - id 1 - op = - count 2 - edgeLabels [ - label "*" - ] - ] - copyAndPaste [ source 1 id 3 ] - ] - -rule [ - ruleID "transform vertex to path" - wildcard "*" - left [ - node [ id 1 label "V" ] - edge [ source 0 target 1 label "*" ] - edge [ source 1 target 2 label "*" ] - ] - context [ - node [ id 0 label "*" ] - node [ id 2 label "E" ] - ] - constrainAdj [ - id 1 - op = - count 2 - edgeLabels [ - label "*" - ] - ] - copyAndPaste [ source 1 id 2 ] - ] +rule [ + ruleID "remove single node" + wildcard "*" + left [ + node [ id 0 label "V" ] + ] + constrainAdj [ + id 0 + op = + count 0 + edgeLabels [ + label "*" + ] + ] + ] + + + + +rule [ + ruleID "remove dangling end" + wildcard "*" + left [ + node [ id 1 label "*" ] + ] + constrainAdj [ + id 1 + op = + count 1 + ] + ] + + + +rule [ + ruleID "compress crossing 5 to paths without loops" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + node [ id 5 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + edge [ source 0 target 5 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 5 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + node [ id 11 label "E" ] + node [ id 12 label "E" ] + node [ id 13 label "E" ] + node [ id 14 label "E" ] + node [ id 15 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 3 id 7 ] + copyAndPaste [ source 0 target 1 id 8 ] + copyAndPaste [ source 0 target 4 id 8 ] + copyAndPaste [ source 0 target 1 id 9 ] + copyAndPaste [ source 0 target 5 id 9 ] + copyAndPaste [ source 0 target 2 id 10 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 2 id 11 ] + copyAndPaste [ source 0 target 4 id 11 ] + copyAndPaste [ source 0 target 2 id 12 ] + copyAndPaste [ source 0 target 5 id 12 ] + copyAndPaste [ source 0 target 3 id 13 ] + copyAndPaste [ source 0 target 4 id 13 ] + copyAndPaste [ source 0 target 3 id 14 ] + copyAndPaste [ source 0 target 5 id 14 ] + copyAndPaste [ source 0 target 4 id 15 ] + copyAndPaste [ source 0 target 5 id 15 ] + ] + +rule [ + ruleID "compress crossing 5 to paths with loops" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + node [ id 5 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 0 label "*" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + edge [ source 0 target 5 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 6 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + node [ id 11 label "E" ] + node [ id 12 label "E" ] + node [ id 13 label "E" ] + node [ id 14 label "E" ] + node [ id 15 label "E" ] + ] + copyAndPaste [ source 0 target 0 id 6 ] + copyAndPaste [ source 0 target 0 id 7 ] + copyAndPaste [ source 0 target 0 id 8 ] + copyAndPaste [ source 0 target 0 id 9 ] + copyAndPaste [ source 0 target 0 id 10 ] + copyAndPaste [ source 0 target 0 id 11 ] + copyAndPaste [ source 0 target 0 id 12 ] + copyAndPaste [ source 0 target 0 id 13 ] + copyAndPaste [ source 0 target 0 id 14 ] + copyAndPaste [ source 0 target 0 id 15 ] + + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 3 id 7 ] + copyAndPaste [ source 0 target 0 id 8 ] + copyAndPaste [ source 0 target 1 id 8 ] + copyAndPaste [ source 0 target 4 id 8 ] + copyAndPaste [ source 0 target 1 id 9 ] + copyAndPaste [ source 0 target 5 id 9 ] + copyAndPaste [ source 0 target 2 id 10 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 2 id 11 ] + copyAndPaste [ source 0 target 4 id 11 ] + copyAndPaste [ source 0 target 2 id 12 ] + copyAndPaste [ source 0 target 5 id 12 ] + copyAndPaste [ source 0 target 3 id 13 ] + copyAndPaste [ source 0 target 4 id 13 ] + copyAndPaste [ source 0 target 3 id 14 ] + copyAndPaste [ source 0 target 5 id 14 ] + copyAndPaste [ source 0 target 4 id 15 ] + copyAndPaste [ source 0 target 5 id 15 ] + ] + + +rule [ + ruleID "compress crossing 4 to paths without loop" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 4 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 5 label "E" ] + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 2 id 5 ] + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 4 id 7 ] + copyAndPaste [ source 0 target 2 id 8 ] + copyAndPaste [ source 0 target 3 id 8 ] + copyAndPaste [ source 0 target 2 id 9 ] + copyAndPaste [ source 0 target 4 id 9 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 4 id 10 ] + ] + +rule [ + ruleID "compress crossing 4 to paths with loop" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 0 label "*" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 5 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 5 label "E" ] + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + ] + copyAndPaste [ source 0 target 0 id 5 ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 2 id 5 ] + copyAndPaste [ source 0 target 0 id 6 ] + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + copyAndPaste [ source 0 target 0 id 7 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 4 id 7 ] + copyAndPaste [ source 0 target 0 id 8 ] + copyAndPaste [ source 0 target 2 id 8 ] + copyAndPaste [ source 0 target 3 id 8 ] + copyAndPaste [ source 0 target 0 id 9 ] + copyAndPaste [ source 0 target 2 id 9 ] + copyAndPaste [ source 0 target 4 id 9 ] + copyAndPaste [ source 0 target 0 id 10 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 4 id 10 ] + ] + +rule [ + ruleID "compress crossing 3 to paths without loops" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 3 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 4 label "E" ] + node [ id 5 label "E" ] + node [ id 6 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 4 ] + copyAndPaste [ source 0 target 2 id 4 ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 3 id 5 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + ] + +rule [ + ruleID "compress crossing 3 to paths with loops" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + ] + left [ + node [ id 0 label "E" ] + edge [ source 0 target 0 label "*" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 4 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 4 label "E" ] + node [ id 5 label "E" ] + node [ id 6 label "E" ] + ] + copyAndPaste [ source 0 target 0 id 4 ] + copyAndPaste [ source 0 target 1 id 4 ] + copyAndPaste [ source 0 target 2 id 4 ] + copyAndPaste [ source 0 target 0 id 5 ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 3 id 5 ] + copyAndPaste [ source 0 target 0 id 6 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + ] + + +rule [ + ruleID "compress path without loop without neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + node [ id 2 label "*" ] + edge [ source 1 target 2 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + ] + constrainNoEdge [ source 1 target 1 ] + constrainNoEdge [ source 3 target 3 ] + constrainAdj [ + id 3 + op = + count 2 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 2 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + +rule [ + ruleID "compress path without loop with neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + node [ id 2 label "*" ] + edge [ source 1 target 2 label "*" ] + edge [ source 1 target 1 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + ] + constrainNoEdge [ source 3 target 3 ] + constrainAdj [ + id 3 + op = + count 2 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 3 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + +rule [ + ruleID "compress path with loop with neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + node [ id 2 label "*" ] + edge [ source 1 target 2 label "*" ] + edge [ source 1 target 1 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + edge [ source 3 target 3 label "*" ] + ] + constrainAdj [ + id 3 + op = + count 3 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 3 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + +rule [ + ruleID "compress ring path without loop without neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + edge [ source 0 target 1 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + ] + constrainNoEdge [ source 3 target 3 ] + constrainNoEdge [ source 1 target 1 ] + constrainAdj [ + id 3 + op = + count 2 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 2 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + +rule [ + ruleID "compress ring path without loop with neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 1 target 1 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + ] + constrainNoEdge [ source 3 target 3 ] + constrainAdj [ + id 3 + op = + count 2 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 3 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + +rule [ + ruleID "compress ring path with loop with neighbored loop" + wildcard "*" + context [ + node [ id 0 label "*" ] + node [ id 1 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 1 target 1 label "*" ] + ] + left [ + node [ id 3 label "E" ] + edge [ source 0 target 3 label "*" ] + edge [ source 1 target 3 label "*" ] + edge [ source 3 target 3 label "*" ] + ] + constrainAdj [ + id 3 + op = + count 3 + nodeLabels [ label "*" ] + ] + constrainAdj [ + id 1 + op = + count 3 + nodeLabels [ label "*" ] + ] + copyAndPaste [ source 3 id 1 ] + ] + + + +rule [ + ruleID "close and decouple ring without loop" + wildcard "*" + context [ + node [ id 0 label "V" ] + ] + left [ + node [ id 1 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 1 label "*" ] + ] + constrainNoEdge [ source 1 target 1 ] + constrainAdj [ + id 1 + op = + count 1 + nodeLabels [ label "*" ] + ] + right [ + node [ id 1 label "ring" ] + ] + copyAndPaste [ source 0 target 1 id 1 ] + ] + +rule [ + ruleID "close and decouple ring with loops" + wildcard "*" + context [ + node [ id 0 label "V" ] + ] + left [ + node [ id 1 label "E" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 1 label "*" ] + edge [ source 1 target 1 label "*" ] + ] + constrainAdj [ + id 1 + op = + count 2 + nodeLabels [ label "*" ] + ] + right [ + node [ id 2 label "ring" ] + ] + copyAndPaste [ source 1 id 2 ] + copyAndPaste [ source 0 target 1 id 2 ] + ] + + +rule [ + ruleID "transform crossing 3 to paths" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + ] + left [ + node [ id 0 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 3 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 4 label "E" ] + node [ id 5 label "E" ] + node [ id 6 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 4 ] + copyAndPaste [ source 0 target 2 id 4 ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 3 id 5 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + ] + + +rule [ + ruleID "transform crossing 4 to paths" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + ] + left [ + node [ id 0 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 4 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 5 label "E" ] + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 5 ] + copyAndPaste [ source 0 target 2 id 5 ] + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 3 id 6 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 4 id 7 ] + copyAndPaste [ source 0 target 2 id 8 ] + copyAndPaste [ source 0 target 3 id 8 ] + copyAndPaste [ source 0 target 2 id 9 ] + copyAndPaste [ source 0 target 4 id 9 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 4 id 10 ] + ] + + +rule [ + ruleID "transform crossing 5 to paths" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + node [ id 5 label "*" ] + ] + left [ + node [ id 0 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + edge [ source 0 target 5 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 5 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 6 label "E" ] + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + node [ id 11 label "E" ] + node [ id 12 label "E" ] + node [ id 13 label "E" ] + node [ id 14 label "E" ] + node [ id 15 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 6 ] + copyAndPaste [ source 0 target 2 id 6 ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 3 id 7 ] + copyAndPaste [ source 0 target 1 id 8 ] + copyAndPaste [ source 0 target 4 id 8 ] + copyAndPaste [ source 0 target 1 id 9 ] + copyAndPaste [ source 0 target 5 id 9 ] + copyAndPaste [ source 0 target 2 id 10 ] + copyAndPaste [ source 0 target 3 id 10 ] + copyAndPaste [ source 0 target 2 id 11 ] + copyAndPaste [ source 0 target 4 id 11 ] + copyAndPaste [ source 0 target 2 id 12 ] + copyAndPaste [ source 0 target 5 id 12 ] + copyAndPaste [ source 0 target 3 id 13 ] + copyAndPaste [ source 0 target 4 id 13 ] + copyAndPaste [ source 0 target 3 id 14 ] + copyAndPaste [ source 0 target 5 id 14 ] + copyAndPaste [ source 0 target 4 id 15 ] + copyAndPaste [ source 0 target 5 id 15 ] + ] + + +rule [ + ruleID "transform crossing 6 to paths" + wildcard "*" + context [ + node [ id 1 label "*" ] + node [ id 2 label "*" ] + node [ id 3 label "*" ] + node [ id 4 label "*" ] + node [ id 5 label "*" ] + node [ id 6 label "*" ] + ] + left [ + node [ id 0 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 0 target 2 label "*" ] + edge [ source 0 target 3 label "*" ] + edge [ source 0 target 4 label "*" ] + edge [ source 0 target 5 label "*" ] + edge [ source 0 target 6 label "*" ] + ] + constrainAdj [ + id 0 + op = + count 6 + nodeLabels [ + label "*" + ] + ] + right [ + node [ id 7 label "E" ] + node [ id 8 label "E" ] + node [ id 9 label "E" ] + node [ id 10 label "E" ] + node [ id 11 label "E" ] + node [ id 12 label "E" ] + node [ id 13 label "E" ] + node [ id 14 label "E" ] + node [ id 15 label "E" ] + node [ id 16 label "E" ] + node [ id 17 label "E" ] + node [ id 18 label "E" ] + node [ id 19 label "E" ] + node [ id 20 label "E" ] + node [ id 21 label "E" ] + node [ id 22 label "E" ] + ] + copyAndPaste [ source 0 target 1 id 7 ] + copyAndPaste [ source 0 target 2 id 7 ] + copyAndPaste [ source 0 target 1 id 8 ] + copyAndPaste [ source 0 target 3 id 8 ] + copyAndPaste [ source 0 target 1 id 9 ] + copyAndPaste [ source 0 target 4 id 9 ] + copyAndPaste [ source 0 target 1 id 10 ] + copyAndPaste [ source 0 target 5 id 10 ] + copyAndPaste [ source 0 target 1 id 11 ] + copyAndPaste [ source 0 target 6 id 11 ] + + copyAndPaste [ source 0 target 2 id 12 ] + copyAndPaste [ source 0 target 3 id 12 ] + copyAndPaste [ source 0 target 2 id 13 ] + copyAndPaste [ source 0 target 4 id 14 ] + copyAndPaste [ source 0 target 2 id 15 ] + copyAndPaste [ source 0 target 5 id 15 ] + copyAndPaste [ source 0 target 2 id 16 ] + copyAndPaste [ source 0 target 6 id 16 ] + + copyAndPaste [ source 0 target 3 id 17 ] + copyAndPaste [ source 0 target 4 id 17 ] + copyAndPaste [ source 0 target 3 id 18 ] + copyAndPaste [ source 0 target 5 id 18 ] + copyAndPaste [ source 0 target 3 id 19 ] + copyAndPaste [ source 0 target 6 id 19 ] + + copyAndPaste [ source 0 target 4 id 20 ] + copyAndPaste [ source 0 target 5 id 20 ] + copyAndPaste [ source 0 target 4 id 21 ] + copyAndPaste [ source 0 target 6 id 21 ] + + copyAndPaste [ source 0 target 5 id 22 ] + copyAndPaste [ source 0 target 6 id 22 ] + + ] + + + +rule [ + ruleID "transform vertex to edge" + wildcard "*" + context [ + node [ id 0 label "V" ] + node [ id 2 label "V" ] + ] + left [ + node [ id 1 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 1 target 2 label "*" ] + ] + right [ + node [ id 3 label "E" ] + ] + constrainAdj [ + id 1 + op = + count 2 + edgeLabels [ + label "*" + ] + ] + copyAndPaste [ source 1 id 3 ] + ] + +rule [ + ruleID "transform vertex to path" + wildcard "*" + left [ + node [ id 1 label "V" ] + edge [ source 0 target 1 label "*" ] + edge [ source 1 target 2 label "*" ] + ] + context [ + node [ id 0 label "*" ] + node [ id 2 label "E" ] + ] + constrainAdj [ + id 1 + op = + count 2 + edgeLabels [ + label "*" + ] + ] + copyAndPaste [ source 1 id 2 ] + ] diff --git a/tests/hanser/single-loop.input b/tests/hanser/single-loop.input index d1d297b..3a3e47f 100644 --- a/tests/hanser/single-loop.input +++ b/tests/hanser/single-loop.input @@ -1,8 +1,8 @@ -graph [ - node [ id 0 label "A" ] - node [ id 1 label "B" ] - node [ id 2 label "C" ] - edge [ source 0 target 1 label "-" ] - edge [ source 0 target 2 label "-" ] - edge [ source 1 target 2 label "-" ] -] +graph [ + node [ id 0 label "A" ] + node [ id 1 label "B" ] + node [ id 2 label "C" ] + edge [ source 0 target 1 label "-" ] + edge [ source 0 target 2 label "-" ] + edge [ source 1 target 2 label "-" ] +] diff --git a/tests/hanser/single-ring.input b/tests/hanser/single-ring.input index 92077f6..f14376b 100644 --- a/tests/hanser/single-ring.input +++ b/tests/hanser/single-ring.input @@ -1,18 +1,18 @@ -graph [ - node [ id 0 label "a" ] - node [ id 1 label "b" ] - node [ id 2 label "c" ] - node [ id 3 label "d" ] - node [ id 4 label "e" ] - node [ id 5 label "f" ] - node [ id 6 label "g" ] - node [ id 7 label "h" ] - edge [ source 0 target 1 label "-" ] - edge [ source 0 target 2 label "-" ] - edge [ source 0 target 7 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 1 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 3 target 5 label "-" ] - edge [ source 3 target 6 label "-" ] -] +graph [ + node [ id 0 label "a" ] + node [ id 1 label "b" ] + node [ id 2 label "c" ] + node [ id 3 label "d" ] + node [ id 4 label "e" ] + node [ id 5 label "f" ] + node [ id 6 label "g" ] + node [ id 7 label "h" ] + edge [ source 0 target 1 label "-" ] + edge [ source 0 target 2 label "-" ] + edge [ source 0 target 7 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 1 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 3 target 5 label "-" ] + edge [ source 3 target 6 label "-" ] +] diff --git a/tests/hanser/three-fused-rings.input b/tests/hanser/three-fused-rings.input index 2d8dc10..8493389 100644 --- a/tests/hanser/three-fused-rings.input +++ b/tests/hanser/three-fused-rings.input @@ -1,32 +1,32 @@ -graph [ - node [ id 0 label "a" ] - node [ id 1 label "b" ] - node [ id 2 label "c" ] - node [ id 3 label "d" ] - node [ id 4 label "e" ] - node [ id 5 label "f" ] - node [ id 6 label "g" ] - node [ id 7 label "h" ] - node [ id 8 label "i" ] - node [ id 9 label "j" ] - node [ id 10 label "k" ] - node [ id 11 label "l" ] - node [ id 12 label "m" ] - node [ id 13 label "n" ] - edge [ source 0 target 1 label "-" ] - edge [ source 0 target 5 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "-" ] - edge [ source 2 target 6 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 3 target 9 label "-" ] - edge [ source 4 target 5 label "-" ] - edge [ source 6 target 7 label "-" ] - edge [ source 6 target 10 label "-" ] - edge [ source 7 target 8 label "-" ] - edge [ source 7 target 13 label "-" ] - edge [ source 8 target 9 label "-" ] - edge [ source 10 target 11 label "-" ] - edge [ source 11 target 12 label "-" ] - edge [ source 12 target 13 label "-" ] -] +graph [ + node [ id 0 label "a" ] + node [ id 1 label "b" ] + node [ id 2 label "c" ] + node [ id 3 label "d" ] + node [ id 4 label "e" ] + node [ id 5 label "f" ] + node [ id 6 label "g" ] + node [ id 7 label "h" ] + node [ id 8 label "i" ] + node [ id 9 label "j" ] + node [ id 10 label "k" ] + node [ id 11 label "l" ] + node [ id 12 label "m" ] + node [ id 13 label "n" ] + edge [ source 0 target 1 label "-" ] + edge [ source 0 target 5 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "-" ] + edge [ source 2 target 6 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 3 target 9 label "-" ] + edge [ source 4 target 5 label "-" ] + edge [ source 6 target 7 label "-" ] + edge [ source 6 target 10 label "-" ] + edge [ source 7 target 8 label "-" ] + edge [ source 7 target 13 label "-" ] + edge [ source 8 target 9 label "-" ] + edge [ source 10 target 11 label "-" ] + edge [ source 11 target 12 label "-" ] + edge [ source 12 target 13 label "-" ] +] diff --git a/tests/hanser/two-fused-rings.input b/tests/hanser/two-fused-rings.input index 38f07df..3525e31 100644 --- a/tests/hanser/two-fused-rings.input +++ b/tests/hanser/two-fused-rings.input @@ -1,13 +1,13 @@ -graph [ - node [ id 0 label "A" ] - node [ id 1 label "B" ] - node [ id 2 label "C" ] - node [ id 3 label "D" ] - node [ id 4 label "E" ] - edge [ source 0 target 1 label "-" ] - edge [ source 0 target 2 label "-" ] - edge [ source 0 target 3 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 1 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] -] +graph [ + node [ id 0 label "A" ] + node [ id 1 label "B" ] + node [ id 2 label "C" ] + node [ id 3 label "D" ] + node [ id 4 label "E" ] + edge [ source 0 target 1 label "-" ] + edge [ source 0 target 2 label "-" ] + edge [ source 0 target 3 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 1 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] +] diff --git a/tests/sudoku/easy.input b/tests/sudoku/easy.input index 9a52330..b9a761e 100644 --- a/tests/sudoku/easy.input +++ b/tests/sudoku/easy.input @@ -1,9 +1,9 @@ - 7 3 6 0 0 0 5 4 0 - 0 0 0 5 6 1 7 0 0 - 0 0 0 4 0 3 6 2 0 - 0 7 0 0 3 0 8 1 2 - 3 6 0 0 8 0 0 9 0 - 4 1 0 0 2 7 0 0 0 - 1 0 3 0 0 0 9 6 5 - 9 0 7 2 0 6 0 0 8 - 0 0 5 3 1 9 0 0 0 + 7 3 6 0 0 0 5 4 0 + 0 0 0 5 6 1 7 0 0 + 0 0 0 4 0 3 6 2 0 + 0 7 0 0 3 0 8 1 2 + 3 6 0 0 8 0 0 9 0 + 4 1 0 0 2 7 0 0 0 + 1 0 3 0 0 0 9 6 5 + 9 0 7 2 0 6 0 0 8 + 0 0 5 3 1 9 0 0 0 diff --git a/tests/sudoku/hard.input b/tests/sudoku/hard.input index 1220241..166a1a8 100644 --- a/tests/sudoku/hard.input +++ b/tests/sudoku/hard.input @@ -1,9 +1,9 @@ - 8 0 0 9 0 0 2 0 5 - 5 0 0 3 0 0 0 0 0 - 7 0 0 4 0 0 9 0 0 - 0 1 6 0 0 0 0 0 0 - 0 8 0 0 7 1 0 0 0 - 0 5 0 0 0 3 4 6 0 - 0 0 2 0 0 0 0 9 7 - 0 0 0 0 3 9 0 1 0 - 0 9 8 0 6 0 0 4 0 + 8 0 0 9 0 0 2 0 5 + 5 0 0 3 0 0 0 0 0 + 7 0 0 4 0 0 9 0 0 + 0 1 6 0 0 0 0 0 0 + 0 8 0 0 7 1 0 0 0 + 0 5 0 0 0 3 4 6 0 + 0 0 2 0 0 0 0 9 7 + 0 0 0 0 3 9 0 1 0 + 0 9 8 0 6 0 0 4 0 diff --git a/tests/sudoku/medium.input b/tests/sudoku/medium.input index be572f4..aaf3c00 100644 --- a/tests/sudoku/medium.input +++ b/tests/sudoku/medium.input @@ -1,9 +1,9 @@ - 8 0 0 6 0 0 0 1 7 - 7 6 0 9 0 0 0 4 5 - 4 0 3 2 0 0 0 0 0 - 0 0 1 0 7 5 6 0 0 - 0 0 8 0 9 4 7 0 0 - 5 0 0 0 0 0 8 3 0 - 0 8 7 0 0 1 0 0 0 - 0 5 0 0 0 0 0 0 2 - 3 0 0 5 8 0 1 7 6 + 8 0 0 6 0 0 0 1 7 + 7 6 0 9 0 0 0 4 5 + 4 0 3 2 0 0 0 0 0 + 0 0 1 0 7 5 6 0 0 + 0 0 8 0 9 4 7 0 0 + 5 0 0 0 0 0 8 3 0 + 0 8 7 0 0 1 0 0 0 + 0 5 0 0 0 0 0 0 2 + 3 0 0 5 8 0 1 7 6 diff --git a/tests/sudoku/very-easy.input b/tests/sudoku/very-easy.input index 8b44f41..f457722 100644 --- a/tests/sudoku/very-easy.input +++ b/tests/sudoku/very-easy.input @@ -1,9 +1,9 @@ - 7 3 6 8 0 2 5 4 1 - 2 0 4 5 6 1 7 8 0 - 8 5 0 4 0 3 6 2 0 - 5 7 0 6 3 4 8 1 2 - 3 6 2 1 8 0 4 9 7 - 4 1 8 0 2 7 0 0 6 - 1 2 3 7 4 0 9 6 5 - 9 0 7 2 0 6 1 0 8 - 6 0 5 3 1 9 2 7 0 + 7 3 6 8 0 2 5 4 1 + 2 0 4 5 6 1 7 8 0 + 8 5 0 4 0 3 6 2 0 + 5 7 0 6 3 4 8 1 2 + 3 6 2 1 8 0 4 9 7 + 4 1 8 0 2 7 0 0 6 + 1 2 3 7 4 0 9 6 5 + 9 0 7 2 0 6 1 0 8 + 6 0 5 3 1 9 2 7 0 diff --git a/tests/testbin_aromModelNSPDK.sh b/tests/testbin_aromModelNSPDK.sh index c083028..772e5d3 100644 --- a/tests/testbin_aromModelNSPDK.sh +++ b/tests/testbin_aromModelNSPDK.sh @@ -1,73 +1,73 @@ -#!/bin/sh - -CALL_SUFFIX=" 2>&1"; - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/aromModelNSPDK" -echo "=============================================="; -echo - -BINARY=../src/bin/aromModelNSPDK - -echo " --> checking help" -$BINARY -help 2>&1 - -echo -echo - -# apply OpenBabel model -PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " -RUNPARAM="-mode=apply -model=O" -POSTCALL=" " -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -## aromatic molecule node weights -#PRECALL=" echo 'c1c2c(nc[nH]2)ncn1' | " -#RUNPARAM=" -model=M -mode=apply -outNodeWeight" -#POSTCALL=" | sed 's/]/]\n/g' " -#FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -#echo -#echo " --> precall = $PRECALL" -#echo " --> parameter = $RUNPARAM" -#echo " --> postcall = $POSTCALL" -#echo " --> full call = $FULLCALL" -#echo -#bash -c "$FULLCALL" -# -## non-aromatic molecule node weights -#PRECALL=" echo 'C1CCCC#CCC1' | " -#RUNPARAM=" -model=M -mode=apply -outNodeWeight" -#POSTCALL=" | sed 's/]/]\n/g' " -#FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -#echo -#echo " --> precall = $PRECALL" -#echo " --> parameter = $RUNPARAM" -#echo " --> postcall = $POSTCALL" -#echo " --> full call = $FULLCALL" -#echo -#bash -c "$FULLCALL" - -# problematic molecule node weights -PRECALL=" echo 'c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N' | " -RUNPARAM=" -model=M -mode=apply -outNodeWeight" -POSTCALL=" | sed 's/]/]\n/g' " -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - - -echo +#!/bin/sh + +CALL_SUFFIX=" 2>&1"; + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/aromModelNSPDK" +echo "=============================================="; +echo + +BINARY=../src/bin/aromModelNSPDK + +echo " --> checking help" +$BINARY -help 2>&1 + +echo +echo + +# apply OpenBabel model +PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " +RUNPARAM="-mode=apply -model=O" +POSTCALL=" " +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +## aromatic molecule node weights +#PRECALL=" echo 'c1c2c(nc[nH]2)ncn1' | " +#RUNPARAM=" -model=M -mode=apply -outNodeWeight" +#POSTCALL=" | sed 's/]/]\n/g' " +#FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +#echo +#echo " --> precall = $PRECALL" +#echo " --> parameter = $RUNPARAM" +#echo " --> postcall = $POSTCALL" +#echo " --> full call = $FULLCALL" +#echo +#bash -c "$FULLCALL" +# +## non-aromatic molecule node weights +#PRECALL=" echo 'C1CCCC#CCC1' | " +#RUNPARAM=" -model=M -mode=apply -outNodeWeight" +#POSTCALL=" | sed 's/]/]\n/g' " +#FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +#echo +#echo " --> precall = $PRECALL" +#echo " --> parameter = $RUNPARAM" +#echo " --> postcall = $POSTCALL" +#echo " --> full call = $FULLCALL" +#echo +#bash -c "$FULLCALL" + +# problematic molecule node weights +PRECALL=" echo 'c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N' | " +RUNPARAM=" -model=M -mode=apply -outNodeWeight" +POSTCALL=" | sed 's/]/]\n/g' " +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_catalan.sh b/tests/testbin_catalan.sh index b491430..771e089 100644 --- a/tests/testbin_catalan.sh +++ b/tests/testbin_catalan.sh @@ -1,30 +1,30 @@ -#!/bin/sh - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/catalan" -echo "=============================================="; -echo - -CALL=../src/bin/catalan - -echo " --> checking help" -$CALL -help 2>&1 - -echo -echo - - -RUNPARAM=" -catalan=catalan/2-step.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - -RUNPARAM=" -catalan=catalan/3-step.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - - -echo +#!/bin/sh + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/catalan" +echo "=============================================="; +echo + +CALL=../src/bin/catalan + +echo " --> checking help" +$CALL -help 2>&1 + +echo +echo + + +RUNPARAM=" -catalan=catalan/2-step.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + +RUNPARAM=" -catalan=catalan/3-step.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_gameOfLife.sh b/tests/testbin_gameOfLife.sh index f949c75..2689cb7 100644 --- a/tests/testbin_gameOfLife.sh +++ b/tests/testbin_gameOfLife.sh @@ -1,25 +1,25 @@ -#!/bin/sh - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/gameOfLife" -echo "=============================================="; -echo - -CALL=../src/bin/gameOfLife - -echo " --> checking help" -$CALL -help 2>&1 - -echo -echo - - -RUNPARAM=" -rules=game-of-life/gof.rules -grid=game-of-life/gof.glider -iter=10" -echo " --> running glider grid" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - - -echo +#!/bin/sh + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/gameOfLife" +echo "=============================================="; +echo + +CALL=../src/bin/gameOfLife + +echo " --> checking help" +$CALL -help 2>&1 + +echo +echo + + +RUNPARAM=" -rules=game-of-life/gof.rules -grid=game-of-life/gof.glider -iter=10" +echo " --> running glider grid" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_hanser.sh b/tests/testbin_hanser.sh index e3942af..a251f55 100644 --- a/tests/testbin_hanser.sh +++ b/tests/testbin_hanser.sh @@ -1,35 +1,35 @@ -#!/bin/sh - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/hanser" -echo "=============================================="; -echo - -CALL=../src/bin/hanser - -echo " --> checking help" -$CALL -help 2>&1 - -echo -echo - - -RUNPARAM=" -graph=hanser/single-loop.input -v" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - -RUNPARAM=" -graph=hanser/two-fused-rings.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - -RUNPARAM=" -graph=hanser/three-fused-rings.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - - -echo +#!/bin/sh + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/hanser" +echo "=============================================="; +echo + +CALL=../src/bin/hanser + +echo " --> checking help" +$CALL -help 2>&1 + +echo +echo + + +RUNPARAM=" -graph=hanser/single-loop.input -v" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + +RUNPARAM=" -graph=hanser/two-fused-rings.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + +RUNPARAM=" -graph=hanser/three-fused-rings.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_molTool.sh b/tests/testbin_molTool.sh index 110cc49..5c3eaf6 100644 --- a/tests/testbin_molTool.sh +++ b/tests/testbin_molTool.sh @@ -1,96 +1,96 @@ -#!/bin/sh - -CALL_SUFFIX=" 2>&1"; - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/molTool" -echo "=============================================="; -echo - -BINARY=../src/bin/molTool - -echo " --> checking help" -$BINARY -help 2>&1 - -echo -echo - - -PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " -RUNPARAM="-aromaticity=O" -POSTCALL=" | env LC_ALL=C sort -d -s" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " -RUNPARAM="-aromaticity=M" -POSTCALL=" | env LC_ALL=C sort -d -s" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -PRECALL="head -n 2 toyChem/purine.smi | tail -n 1 | " -RUNPARAM="-outMode=G" -POSTCALL="" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -PRECALL="head -n 3 toyChem/purine.smi | tail -n 1 | " -RUNPARAM="-outMode=G" -POSTCALL="" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -PRECALL="head -n 10 toyChem/purine.smi | grep -E "^#" -v | $BINARY -outMode=G | " -RUNPARAM="-inMode=G -outMode=S" -POSTCALL=" | env LC_ALL=C sort -d -s" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - -PRECALL="" -RUNPARAM="-in=toyChem/NADH.smi -groups=toyChem/groups.gml -noGroupInsertion" -POSTCALL=" | env LC_ALL=C sort -d -s" -FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" -echo -echo " --> precall = $PRECALL" -echo " --> parameter = $RUNPARAM" -echo " --> postcall = $POSTCALL" -echo " --> full call = $FULLCALL" -echo -bash -c "$FULLCALL" - - - - -echo +#!/bin/sh + +CALL_SUFFIX=" 2>&1"; + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/molTool" +echo "=============================================="; +echo + +BINARY=../src/bin/molTool + +echo " --> checking help" +$BINARY -help 2>&1 + +echo +echo + + +PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " +RUNPARAM="-aromaticity=O" +POSTCALL=" | env LC_ALL=C sort -d -s" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +PRECALL="cat toyChem/purine.smi | grep -E "^#" -v | " +RUNPARAM="-aromaticity=M" +POSTCALL=" | env LC_ALL=C sort -d -s" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +PRECALL="head -n 2 toyChem/purine.smi | tail -n 1 | " +RUNPARAM="-outMode=G" +POSTCALL="" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +PRECALL="head -n 3 toyChem/purine.smi | tail -n 1 | " +RUNPARAM="-outMode=G" +POSTCALL="" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +PRECALL="head -n 10 toyChem/purine.smi | grep -E "^#" -v | $BINARY -outMode=G | " +RUNPARAM="-inMode=G -outMode=S" +POSTCALL=" | env LC_ALL=C sort -d -s" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + +PRECALL="" +RUNPARAM="-in=toyChem/NADH.smi -groups=toyChem/groups.gml -noGroupInsertion" +POSTCALL=" | env LC_ALL=C sort -d -s" +FULLCALL="$PRECALL $BINARY $RUNPARAM $POSTCALL 2>&1" +echo +echo " --> precall = $PRECALL" +echo " --> parameter = $RUNPARAM" +echo " --> postcall = $POSTCALL" +echo " --> full call = $FULLCALL" +echo +bash -c "$FULLCALL" + + + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_sudoku.sh b/tests/testbin_sudoku.sh index 2ea9b28..f056a8e 100644 --- a/tests/testbin_sudoku.sh +++ b/tests/testbin_sudoku.sh @@ -1,35 +1,35 @@ -#!/bin/sh - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/sudoku" -echo "=============================================="; -echo - -CALL=../src/bin/sudoku - -echo " --> checking help" -$CALL -help 2>&1 - -echo -echo - - -RUNPARAM=" -sudoku=sudoku/very-easy.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - -RUNPARAM=" -sudoku=sudoku/easy.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - -RUNPARAM=" -sudoku=sudoku/medium.input" -echo " --> running solver" -echo " --> parameter = $RUNPARAM" -$CALL $RUNPARAM 2>&1 - - -echo +#!/bin/sh + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/sudoku" +echo "=============================================="; +echo + +CALL=../src/bin/sudoku + +echo " --> checking help" +$CALL -help 2>&1 + +echo +echo + + +RUNPARAM=" -sudoku=sudoku/very-easy.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + +RUNPARAM=" -sudoku=sudoku/easy.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + +RUNPARAM=" -sudoku=sudoku/medium.input" +echo " --> running solver" +echo " --> parameter = $RUNPARAM" +$CALL $RUNPARAM 2>&1 + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testbin_toyChem.sh b/tests/testbin_toyChem.sh index 03a1ccc..a17f667 100644 --- a/tests/testbin_toyChem.sh +++ b/tests/testbin_toyChem.sh @@ -1,46 +1,46 @@ -#!/bin/sh - -echo "============== BEGIN TEST =================="; -echo "=============================================="; -echo " bin/toyChem" -echo "=============================================="; -echo - -TOYCHEM=../src/bin/toyChem - -echo " --> checking help" -$TOYCHEM -help 2>&1 - -echo -echo - - -RUNPARAM=" -smiles=dielsalder/da1.smi:dielsalder/da2.smi -rules=dielsalder/da_rule.gml -iter=2 -outMode=R -v" -echo " --> running Diels-Alder reaction" -echo " --> parameter = $RUNPARAM" -$TOYCHEM $RUNPARAM 2>&1 - -RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=R -rate=A -v" -echo " --> running Diels-Alder reaction" -echo " --> parameter = $RUNPARAM" -$TOYCHEM $RUNPARAM 2>&1 - -RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=N -rate=A -v" -echo " --> running Diels-Alder reaction" -echo " --> parameter = $RUNPARAM" -$TOYCHEM $RUNPARAM 2>&1 - -RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=S -v" -echo " --> running Diels-Alder reaction" -echo " --> parameter = $RUNPARAM" -$TOYCHEM $RUNPARAM 2>&1 - - -RUNPARAM=" -smiles=toyChem/NADH.smi:toyChem/lactat.smi -groups=toyChem/groups.gml -rules=toyChem/lactat-dehydrogenase.gml -iter=1" -echo " --> running Lactat-dehydrogenase reaction" -echo " --> parameter = $RUNPARAM" -$TOYCHEM $RUNPARAM 2>&1 - - -echo +#!/bin/sh + +echo "============== BEGIN TEST =================="; +echo "=============================================="; +echo " bin/toyChem" +echo "=============================================="; +echo + +TOYCHEM=../src/bin/toyChem + +echo " --> checking help" +$TOYCHEM -help 2>&1 + +echo +echo + + +RUNPARAM=" -smiles=dielsalder/da1.smi:dielsalder/da2.smi -rules=dielsalder/da_rule.gml -iter=2 -outMode=R -v" +echo " --> running Diels-Alder reaction" +echo " --> parameter = $RUNPARAM" +$TOYCHEM $RUNPARAM 2>&1 + +RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=R -rate=A -v" +echo " --> running Diels-Alder reaction" +echo " --> parameter = $RUNPARAM" +$TOYCHEM $RUNPARAM 2>&1 + +RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=N -rate=A -v" +echo " --> running Diels-Alder reaction" +echo " --> parameter = $RUNPARAM" +$TOYCHEM $RUNPARAM 2>&1 + +RUNPARAM=" -mols=dielsalder/da1.gml:dielsalder/da2.gml -rules=dielsalder/da_rule.gml -iter=2 -outMode=S -v" +echo " --> running Diels-Alder reaction" +echo " --> parameter = $RUNPARAM" +$TOYCHEM $RUNPARAM 2>&1 + + +RUNPARAM=" -smiles=toyChem/NADH.smi:toyChem/lactat.smi -groups=toyChem/groups.gml -rules=toyChem/lactat-dehydrogenase.gml -iter=1" +echo " --> running Lactat-dehydrogenase reaction" +echo " --> parameter = $RUNPARAM" +$TOYCHEM $RUNPARAM 2>&1 + + +echo echo "=============== END TEST ==================="; \ No newline at end of file diff --git a/tests/testggl_CE_Horton.cc b/tests/testggl_CE_Horton.cc index c075f61..26606ad 100644 --- a/tests/testggl_CE_Horton.cc +++ b/tests/testggl_CE_Horton.cc @@ -1,189 +1,189 @@ - -#include -#include - -#include "ggl/Graph.hh" - -#include "dataTargetGraph_1.icc" - -#include - -#include -#include - -template -struct cycle_reporter - : public boost::base_visitor > -{ - typedef boost::on_gray_target event_filter; -// typedef boost::on_black_target event_filter; -// typedef boost::on_examine_edge event_filter; - - cycle_reporter(const std::vector& pred_) - : pred(pred_) - { } - - template - void operator()(Edge e, Graph& g) { - std::cout <<" found cycle closing : ("<& pred; -}; - -template -struct edge_reporter - : public boost::base_visitor > -{ -// typedef boost::on_black_target event_filter; -// typedef boost::on_examine_edge event_filter; - typedef boost::on_tree_edge event_filter; - - edge_reporter(const std::vector& pred_) - : pred(pred_) - { } - - template - void operator()(Edge e, Graph& g) { - std::cout <<" next edge : ("<& pred; -}; - -template -struct shortest_path_reporter - : public boost::base_visitor > -{ - typedef boost::on_tree_edge event_filter; - - shortest_path_reporter( - const std::vector& pred_ - , const typename GRAPH::vertex_descriptor & target_ - , std::vector& path_) - : pred(pred_), target(target_), path(path_) - { - } - - template - void operator()(Edge e, Graph& g) { - if (boost::target(e,g) == target) { - typename GRAPH::vertex_descriptor v = boost::source(e,g); - while( pred[v] != v ){ - // add to path - path.push_back(v); - v = pred[v]; - } - } - } -protected: - const std::vector& pred; - const typename GRAPH::vertex_descriptor & target; - std::vector& path; -}; - - - - -//inline cycle_reporter -//report_cycle() { -// return cycle_reporter(); -//} - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::CE_Horton \n" - <<" detection of all cycles in graphs \n" - <<"==============================================\n" - <create ggl::Graph = getTarget_1()" < path_v_i; - path_v_i.push_back(*vi); - { - // the predecessor mapping - std::vector p(boost::num_vertices(t)); - // The source vertex maps to itself - p[*vi] = *vi; - // find path from *vi --> i - boost::breadth_first_search - (t, *vi, - boost::visitor(boost::make_bfs_visitor( - std::make_pair( - boost::record_predecessors(&p[0],boost::on_tree_edge()) - , shortest_path_reporter(p,i,path_v_i)))) ); - } - path_v_i.push_back(i); - std::vector path_v_j; - { - // the predecessor mapping - std::vector p(boost::num_vertices(t)); - // The source vertex maps to itself - p[*vi] = *vi; - // find path from *vi --> j - boost::breadth_first_search - (t, *vi, - boost::visitor(boost::make_bfs_visitor( - std::make_pair( - boost::record_predecessors(&p[0],boost::on_tree_edge()) - , shortest_path_reporter(p,j,path_v_j)))) ); - } - path_v_j.push_back(j); - - bool isUnique = true; - for (size_t ix=0; isUnique && ix(std::cout, " ")); - std::cout < +#include + +#include "ggl/Graph.hh" + +#include "dataTargetGraph_1.icc" + +#include + +#include +#include + +template +struct cycle_reporter + : public boost::base_visitor > +{ + typedef boost::on_gray_target event_filter; +// typedef boost::on_black_target event_filter; +// typedef boost::on_examine_edge event_filter; + + cycle_reporter(const std::vector& pred_) + : pred(pred_) + { } + + template + void operator()(Edge e, Graph& g) { + std::cout <<" found cycle closing : ("<& pred; +}; + +template +struct edge_reporter + : public boost::base_visitor > +{ +// typedef boost::on_black_target event_filter; +// typedef boost::on_examine_edge event_filter; + typedef boost::on_tree_edge event_filter; + + edge_reporter(const std::vector& pred_) + : pred(pred_) + { } + + template + void operator()(Edge e, Graph& g) { + std::cout <<" next edge : ("<& pred; +}; + +template +struct shortest_path_reporter + : public boost::base_visitor > +{ + typedef boost::on_tree_edge event_filter; + + shortest_path_reporter( + const std::vector& pred_ + , const typename GRAPH::vertex_descriptor & target_ + , std::vector& path_) + : pred(pred_), target(target_), path(path_) + { + } + + template + void operator()(Edge e, Graph& g) { + if (boost::target(e,g) == target) { + typename GRAPH::vertex_descriptor v = boost::source(e,g); + while( pred[v] != v ){ + // add to path + path.push_back(v); + v = pred[v]; + } + } + } +protected: + const std::vector& pred; + const typename GRAPH::vertex_descriptor & target; + std::vector& path; +}; + + + + +//inline cycle_reporter +//report_cycle() { +// return cycle_reporter(); +//} + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::CE_Horton \n" + <<" detection of all cycles in graphs \n" + <<"==============================================\n" + <create ggl::Graph = getTarget_1()" < path_v_i; + path_v_i.push_back(*vi); + { + // the predecessor mapping + std::vector p(boost::num_vertices(t)); + // The source vertex maps to itself + p[*vi] = *vi; + // find path from *vi --> i + boost::breadth_first_search + (t, *vi, + boost::visitor(boost::make_bfs_visitor( + std::make_pair( + boost::record_predecessors(&p[0],boost::on_tree_edge()) + , shortest_path_reporter(p,i,path_v_i)))) ); + } + path_v_i.push_back(i); + std::vector path_v_j; + { + // the predecessor mapping + std::vector p(boost::num_vertices(t)); + // The source vertex maps to itself + p[*vi] = *vi; + // find path from *vi --> j + boost::breadth_first_search + (t, *vi, + boost::visitor(boost::make_bfs_visitor( + std::make_pair( + boost::record_predecessors(&p[0],boost::on_tree_edge()) + , shortest_path_reporter(p,j,path_v_j)))) ); + } + path_v_j.push_back(j); + + bool isUnique = true; + for (size_t ix=0; isUnique && ix(std::cout, " ")); + std::cout < - -#include "ggl/Rule.hh" -#include "ggl/GS_STL.hh" -#include "ggl/MR_ApplyRule.hh" - - -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" -#include "sgm/Graph_boostV_p.hh" - -#include "dataRule_1.icc" -#include "dataRule_2.icc" -#include "dataRule_3.icc" -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" -#include "utilPrintRule.icc" - -void performTest( const ggl::Rule& r - , const int targetNumber - , const bool addEachComponent ) { - - //////////////////////////////////////////////////////////////////////////// - - std::cout <<"\n============ CREATE TARGET GRAPH ==============\n" <0) - std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; - - sgm::Graph_Interface* tg = NULL; - - switch (targetNumber) { - case 0: { - tVec.push_back( new ggl::Graph(getTarget_1(graphString))); - std::string tmp = ""; - tVec.push_back( new ggl::Graph(getTarget_2(tmp))); - graphString += tmp; - tg = new sgm::Graph_boostV_p(tVec); - break; } - case 1: { - t = getTarget_1(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 2: { - t = getTarget_2(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 3: { - t = getTarget_3(graphString); - tg = new sgm::Graph_boost(t); - break; } - default: - assert(false /* wrong target number given */); - } - - std::cout <<"\n" < storage; - ggl::GS_STL_pushAll gs(storage); - ggl::MR_ApplyRule mr_rule(gs, addEachComponent); - - sgm.findMatches( ls, *tg, mr_rule, UINT_MAX ); - - for (size_t i=0; i gr(storage[i]); - print(gr); - std::cout <create Rule = getRule_1()" <create Rule = getRule_2()" <create Rule = getRule_3()" < + +#include "ggl/Rule.hh" +#include "ggl/GS_STL.hh" +#include "ggl/MR_ApplyRule.hh" + + +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" +#include "sgm/Graph_boostV_p.hh" + +#include "dataRule_1.icc" +#include "dataRule_2.icc" +#include "dataRule_3.icc" +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" +#include "utilPrintRule.icc" + +void performTest( const ggl::Rule& r + , const int targetNumber + , const bool addEachComponent ) { + + //////////////////////////////////////////////////////////////////////////// + + std::cout <<"\n============ CREATE TARGET GRAPH ==============\n" <0) + std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; + + sgm::Graph_Interface* tg = NULL; + + switch (targetNumber) { + case 0: { + tVec.push_back( new ggl::Graph(getTarget_1(graphString))); + std::string tmp = ""; + tVec.push_back( new ggl::Graph(getTarget_2(tmp))); + graphString += tmp; + tg = new sgm::Graph_boostV_p(tVec); + break; } + case 1: { + t = getTarget_1(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 2: { + t = getTarget_2(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 3: { + t = getTarget_3(graphString); + tg = new sgm::Graph_boost(t); + break; } + default: + assert(false /* wrong target number given */); + } + + std::cout <<"\n" < storage; + ggl::GS_STL_pushAll gs(storage); + ggl::MR_ApplyRule mr_rule(gs, addEachComponent); + + sgm.findMatches( ls, *tg, mr_rule, UINT_MAX ); + + for (size_t i=0; i gr(storage[i]); + print(gr); + std::cout <create Rule = getRule_1()" <create Rule = getRule_2()" <create Rule = getRule_3()" < - -#include "ggl/Rule.hh" -#include "ggl/GS_STL.hh" -#include "ggl/MR_ApplyRule.hh" - - -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" -#include "sgm/Graph_boostV_p.hh" - -#include "dataRule_1.icc" -#include "dataRule_2.icc" -#include "dataRule_3.icc" -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" -#include "utilPrintRule.icc" - -void performTest( const ggl::Rule& r, const int targetNumber, const bool addEachComponent ) { - - //////////////////////////////////////////////////////////////////////////// - - std::cout <<"\n============ CREATE TARGET GRAPH ==============\n" <0) - std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; - - sgm::Graph_Interface* tg = NULL; - - switch (targetNumber) { - case 0: { - tVec.push_back( new ggl::Graph(getTarget_1(graphString))); - std::string tmp = ""; - tVec.push_back( new ggl::Graph(getTarget_2(tmp))); - graphString += tmp; - tg = new sgm::Graph_boostV_p(tVec); - break; } - case 1: { - t = getTarget_1(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 2: { - t = getTarget_2(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 3: { - t = getTarget_3(graphString); - tg = new sgm::Graph_boost(t); - break; } - default: - assert(false /* wrong target number given */); - } - - std::cout <<"\n" < storage; - ggl::GS_STL_pushAllP gs(storage); - ggl::MR_ApplyRule mr_rule(gs, addEachComponent); - - sgm.findMatches( ls, *tg, mr_rule, UINT_MAX ); - - for (size_t i=0; i gr(*storage[i]); - print(gr); - std::cout <create Rule = getRule_1()" <create Rule = getRule_2()" <create Rule = getRule_3()" < + +#include "ggl/Rule.hh" +#include "ggl/GS_STL.hh" +#include "ggl/MR_ApplyRule.hh" + + +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" +#include "sgm/Graph_boostV_p.hh" + +#include "dataRule_1.icc" +#include "dataRule_2.icc" +#include "dataRule_3.icc" +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" +#include "utilPrintRule.icc" + +void performTest( const ggl::Rule& r, const int targetNumber, const bool addEachComponent ) { + + //////////////////////////////////////////////////////////////////////////// + + std::cout <<"\n============ CREATE TARGET GRAPH ==============\n" <0) + std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; + + sgm::Graph_Interface* tg = NULL; + + switch (targetNumber) { + case 0: { + tVec.push_back( new ggl::Graph(getTarget_1(graphString))); + std::string tmp = ""; + tVec.push_back( new ggl::Graph(getTarget_2(tmp))); + graphString += tmp; + tg = new sgm::Graph_boostV_p(tVec); + break; } + case 1: { + t = getTarget_1(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 2: { + t = getTarget_2(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 3: { + t = getTarget_3(graphString); + tg = new sgm::Graph_boost(t); + break; } + default: + assert(false /* wrong target number given */); + } + + std::cout <<"\n" < storage; + ggl::GS_STL_pushAllP gs(storage); + ggl::MR_ApplyRule mr_rule(gs, addEachComponent); + + sgm.findMatches( ls, *tg, mr_rule, UINT_MAX ); + + for (size_t i=0; i gr(*storage[i]); + print(gr); + std::cout <create Rule = getRule_1()" <create Rule = getRule_2()" <create Rule = getRule_3()" < - -#include "ggl/Rule.hh" -#include "ggl/GS_STL.hh" - - -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" - -#include "sgm/GM_vf2.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" -#include "utilPrintRule.icc" - - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::GS_STL_pushUnique \n" - <<"==============================================\n" - <create std::vector storage" < storage; - std::cout <<"-->create sgm::GM_vf2 matcher" <create ggl::GS_STL_pushUnique gs(storage,matcher)" <create ggl::Graph = getTarget_1()" <gs.add(t1)" <gs.add(t2)" <gs.add(t1)" <gs.add(t3)" <gs.add(t2)" <gs.add(t2)" <resulting storage :\n" < gr(storage[i]); - print(gr); - std::cout < + +#include "ggl/Rule.hh" +#include "ggl/GS_STL.hh" + + +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" + +#include "sgm/GM_vf2.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" +#include "utilPrintRule.icc" + + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::GS_STL_pushUnique \n" + <<"==============================================\n" + <create std::vector storage" < storage; + std::cout <<"-->create sgm::GM_vf2 matcher" <create ggl::GS_STL_pushUnique gs(storage,matcher)" <create ggl::Graph = getTarget_1()" <gs.add(t1)" <gs.add(t2)" <gs.add(t1)" <gs.add(t3)" <gs.add(t2)" <gs.add(t2)" <resulting storage :\n" < gr(storage[i]); + print(gr); + std::cout < - -#include "ggl/Rule.hh" -#include "ggl/GS_STL.hh" - - -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" - -#include "sgm/GM_vf2.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" -#include "utilPrintRule.icc" - - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::GS_STL_pushUniqueP \n" - <<"==============================================\n" - <create std::vector storage" < storage; - std::cout <<"-->create sgm::GM_vf2 matcher" <create ggl::GS_STL_pushUniqueP gs(storage,matcher)" <create ggl::Graph = getTarget_1()" <gs.add(t1)" <gs.add(t2)" <gs.add(t1)" <gs.add(t3)" <gs.add(t2)" <gs.add(t2)" <resulting storage :\n" < gr(*storage[i]); - print(gr); - std::cout < + +#include "ggl/Rule.hh" +#include "ggl/GS_STL.hh" + + +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" + +#include "sgm/GM_vf2.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" +#include "utilPrintRule.icc" + + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::GS_STL_pushUniqueP \n" + <<"==============================================\n" + <create std::vector storage" < storage; + std::cout <<"-->create sgm::GM_vf2 matcher" <create ggl::GS_STL_pushUniqueP gs(storage,matcher)" <create ggl::Graph = getTarget_1()" <gs.add(t1)" <gs.add(t2)" <gs.add(t1)" <gs.add(t3)" <gs.add(t2)" <gs.add(t2)" <resulting storage :\n" < gr(*storage[i]); + print(gr); + std::cout < - -#include "ggl/GS_stream.hh" - -#include "dataTargetGraph_1.icc" - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::GS_stream \n" - <<"==============================================\n" - <create ggl::Graph = getTarget_1()" <print graph via GS_stream.add()" < + +#include "ggl/GS_stream.hh" + +#include "dataTargetGraph_1.icc" + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::GS_stream \n" + <<"==============================================\n" + <create ggl::Graph = getTarget_1()" <print graph via GS_stream.add()" < -#include - -#include "ggl/Graph.hh" -#include "ggl/Graph_GML_writer.hh" -#include "ggl/Graph_GML_grammar.hh" - -#include "sgm/Graph_boost.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_4.icc" - -#include "utilPrintGraph_Interface.icc" - -int main() { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::Graph_GML_grammar \n" - <<"==============================================\n" - <Graph_GML_writer::write(ss,graph,true) : \n" <Graph_GML_grammar::parseGraph(ss.str())" < ret = ggl::Graph_GML_grammar::parseGraph(ss.str()); - - if (ret.second < 0 ) - { - sgm::Graph_boost gi(ret.first); - std::cout <<"\n result graph : " <Graph_GML_writer::write(ss,graph,true) : \n" <Graph_GML_grammar::parseGraph(ss.str())" < ret = ggl::Graph_GML_grammar::parseGraph(ss.str()); - - if (ret.second < 0 ) - { - sgm::Graph_boost gi(ret.first); - std::cout <<"\n result graph : " < +#include + +#include "ggl/Graph.hh" +#include "ggl/Graph_GML_writer.hh" +#include "ggl/Graph_GML_grammar.hh" + +#include "sgm/Graph_boost.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_4.icc" + +#include "utilPrintGraph_Interface.icc" + +int main() { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::Graph_GML_grammar \n" + <<"==============================================\n" + <Graph_GML_writer::write(ss,graph,true) : \n" <Graph_GML_grammar::parseGraph(ss.str())" < ret = ggl::Graph_GML_grammar::parseGraph(ss.str()); + + if (ret.second < 0 ) + { + sgm::Graph_boost gi(ret.first); + std::cout <<"\n result graph : " <Graph_GML_writer::write(ss,graph,true) : \n" <Graph_GML_grammar::parseGraph(ss.str())" < ret = ggl::Graph_GML_grammar::parseGraph(ss.str()); + + if (ret.second < 0 ) + { + sgm::Graph_boost gi(ret.first); + std::cout <<"\n result graph : " < - -#include "ggl/Graph.hh" -#include "ggl/Graph_GML_writer.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" - -int main() { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::Graph_GML_writer \n" - <<"==============================================\n" - <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" <operator<<(graph) : \n" <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" < + +#include "ggl/Graph.hh" +#include "ggl/Graph_GML_writer.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" + +int main() { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::Graph_GML_writer \n" + <<"==============================================\n" + <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" <operator<<(graph) : \n" <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" <Graph_GML_writer::write(graph,true) : \n" <Graph_GML_writer::write(graph,false) : \n" < - -#include "ggl/Graph.hh" -#include "ggl/Graph_GXL_writer.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" - -int main() { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::Graph_GXL_writer \n" - <<"==============================================\n" - <Graph_GXL_writer::write(graph) : \n" <Graph_GXL_writer::write(graph) : \n" <Graph_GXL_writer::write(graph) : \n" < + +#include "ggl/Graph.hh" +#include "ggl/Graph_GXL_writer.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" + +int main() { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::Graph_GXL_writer \n" + <<"==============================================\n" + <Graph_GXL_writer::write(graph) : \n" <Graph_GXL_writer::write(graph) : \n" <Graph_GXL_writer::write(graph) : \n" < - -#include "ggl/Rule.hh" -#include "ggl/RuleGraph.hh" -#include "ggl/GS_stream.hh" -#include "ggl/MR_ApplyRule.hh" - -#include "sgm/Pattern.hh" -#include "sgm/MC_Node.hh" -#include "sgm/MC_Edge.hh" -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" -#include "sgm/Graph_boostV_p.hh" - -#include "dataRule_1.icc" -#include "dataRule_2.icc" -#include "dataRule_3.icc" -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" -#include "utilPrintRule.icc" - -void performTest( const ggl::Rule& r - , const int targetNumber -// , const size_t minMatchedTargets - , const bool addEachComponent ) { - - //////////////////////////////////////////////////////////////////////////// - -// std::cout <<"\n============= RULE GRAPH GRAPH ================\n" <left side :\n" <right side :\n" <0) - std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; - - sgm::Graph_Interface* tg = NULL; - - switch (targetNumber) { - case 0: { - tVec.push_back( new ggl::Graph(getTarget_1(graphString))); - std::string tmp = ""; - tVec.push_back( new ggl::Graph(getTarget_2(tmp))); - graphString += tmp; - tg = new sgm::Graph_boostV_p(tVec); - break; } - case 1: { - t = getTarget_1(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 2: { - t = getTarget_2(graphString); - tg = new sgm::Graph_boost(t); - break; } - case 3: { - t = getTarget_3(graphString); - tg = new sgm::Graph_boost(t); - break; } - default: - assert(false /* wrong target number given */); - } - - std::cout <<"\n" <0) - std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; - - sgm::Graph_Interface* tg = NULL; - - switch (targetNumber) { - case 0: { - tVec.push_back( new ggl::Graph(getTarget_1(graphString))); - std::string tmp = ""; - tVec.push_back( new ggl::Graph(getTarget_2(tmp))); - graphString += tmp; - tg = new sgm::Graph_boostV_p(tVec); - break; } - default: - assert(false /* wrong target number given */); - } - - std::cout <<"\n" <create Rule = getRule_1()\n" <create Rule = getRule_1()" <create RuleConstraints:\n" < rC; - rC.push_back( new sgm::MC_NodeAdjacency( 2, sgm::MC_NodeAdjacency::MC_EQ, 0, "B") ); - std::cout <<" RC( node(2), =, 0, 'B' )" <create Rule = getRule_1()" <create Rule = getRule_2()" <create RuleConstraints:\n" < rC; - std::set allowedLabel; - rC.push_back( new sgm::MC_NodeAdjacency( 1, sgm::MC_NodeAdjacency::MC_L, 3, allowedLabel, allowedLabel) ); - std::cout <<" RC( node(1), <, 3, any, any )" <create Rule = getRule_2()" <create RuleConstraints:\n" < rC; - std::set nodeLabel; - std::set edgeLabel; - edgeLabel.insert("-2-"); - rC.push_back( new sgm::MC_NodeAdjacency( 1, sgm::MC_NodeAdjacency::MC_G, 0, nodeLabel, edgeLabel) ); - std::cout <<" RC( node(2), >, 0, any, '-2-' )" <create Rule = getRule_2()" <create Rule = getRule_3()" < + +#include "ggl/Rule.hh" +#include "ggl/RuleGraph.hh" +#include "ggl/GS_stream.hh" +#include "ggl/MR_ApplyRule.hh" + +#include "sgm/Pattern.hh" +#include "sgm/MC_Node.hh" +#include "sgm/MC_Edge.hh" +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" +#include "sgm/Graph_boostV_p.hh" + +#include "dataRule_1.icc" +#include "dataRule_2.icc" +#include "dataRule_3.icc" +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" +#include "utilPrintRule.icc" + +void performTest( const ggl::Rule& r + , const int targetNumber +// , const size_t minMatchedTargets + , const bool addEachComponent ) { + + //////////////////////////////////////////////////////////////////////////// + +// std::cout <<"\n============= RULE GRAPH GRAPH ================\n" <left side :\n" <right side :\n" <0) + std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; + + sgm::Graph_Interface* tg = NULL; + + switch (targetNumber) { + case 0: { + tVec.push_back( new ggl::Graph(getTarget_1(graphString))); + std::string tmp = ""; + tVec.push_back( new ggl::Graph(getTarget_2(tmp))); + graphString += tmp; + tg = new sgm::Graph_boostV_p(tVec); + break; } + case 1: { + t = getTarget_1(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 2: { + t = getTarget_2(graphString); + tg = new sgm::Graph_boost(t); + break; } + case 3: { + t = getTarget_3(graphString); + tg = new sgm::Graph_boost(t); + break; } + default: + assert(false /* wrong target number given */); + } + + std::cout <<"\n" <0) + std::cout <<"-->create Target = getTarget_"<create Target = getTarget_*()" < tVec; + + sgm::Graph_Interface* tg = NULL; + + switch (targetNumber) { + case 0: { + tVec.push_back( new ggl::Graph(getTarget_1(graphString))); + std::string tmp = ""; + tVec.push_back( new ggl::Graph(getTarget_2(tmp))); + graphString += tmp; + tg = new sgm::Graph_boostV_p(tVec); + break; } + default: + assert(false /* wrong target number given */); + } + + std::cout <<"\n" <create Rule = getRule_1()\n" <create Rule = getRule_1()" <create RuleConstraints:\n" < rC; + rC.push_back( new sgm::MC_NodeAdjacency( 2, sgm::MC_NodeAdjacency::MC_EQ, 0, "B") ); + std::cout <<" RC( node(2), =, 0, 'B' )" <create Rule = getRule_1()" <create Rule = getRule_2()" <create RuleConstraints:\n" < rC; + std::set allowedLabel; + rC.push_back( new sgm::MC_NodeAdjacency( 1, sgm::MC_NodeAdjacency::MC_L, 3, allowedLabel, allowedLabel) ); + std::cout <<" RC( node(1), <, 3, any, any )" <create Rule = getRule_2()" <create RuleConstraints:\n" < rC; + std::set nodeLabel; + std::set edgeLabel; + edgeLabel.insert("-2-"); + rC.push_back( new sgm::MC_NodeAdjacency( 1, sgm::MC_NodeAdjacency::MC_G, 0, nodeLabel, edgeLabel) ); + std::cout <<" RC( node(2), >, 0, any, '-2-' )" <create Rule = getRule_2()" <create Rule = getRule_3()" < - -#include "ggl/Rule.hh" - -#include "dataRule_1.icc" -#include "dataRule_2.icc" -#include "dataRule_3.icc" -#include "dataRule_4.icc" -#include "utilPrintRule.icc" - -void checkConnectedComponents( ggl::Rule& r) -{ - - std::cout <<"\n == CHECK CONSISTENCY ==\n" < isConsistent() = "; - const size_t consistencyCode = r.isConsistent(); - std::cout <<(consistencyCode==ggl::Rule::C_Consistent?"true":"false") < connectedComponents( ls ) = "; std::cout.flush(); - std::cout < component labeling :" < ls.getComponentLabeling() : " < ls.getFirstOfEachComponent() : "; std::cout.flush(); - const ggl::LeftSidePattern::IndexSet& idx = ls.getFirstOfEachComponent(); - for ( ggl::LeftSidePattern::IndexSet::const_iterator it = idx.begin(); - it != idx.end(); it++) { - std::cout <<*it <<" "; std::cout.flush(); - } - std::cout < connectedComponents( rs ) = "; std::cout.flush(); - std::cout < component labeling :" < + +#include "ggl/Rule.hh" + +#include "dataRule_1.icc" +#include "dataRule_2.icc" +#include "dataRule_3.icc" +#include "dataRule_4.icc" +#include "utilPrintRule.icc" + +void checkConnectedComponents( ggl::Rule& r) +{ + + std::cout <<"\n == CHECK CONSISTENCY ==\n" < isConsistent() = "; + const size_t consistencyCode = r.isConsistent(); + std::cout <<(consistencyCode==ggl::Rule::C_Consistent?"true":"false") < connectedComponents( ls ) = "; std::cout.flush(); + std::cout < component labeling :" < ls.getComponentLabeling() : " < ls.getFirstOfEachComponent() : "; std::cout.flush(); + const ggl::LeftSidePattern::IndexSet& idx = ls.getFirstOfEachComponent(); + for ( ggl::LeftSidePattern::IndexSet::const_iterator it = idx.begin(); + it != idx.end(); it++) { + std::cout <<*it <<" "; std::cout.flush(); + } + std::cout < connectedComponents( rs ) = "; std::cout.flush(); + std::cout < component labeling :" < 4 3 \n\ - | / | | \n\ - 2(C) -0- 0(A) 2(C) 4(D) \n\ -"); - -const std::string Rule1gml = std::string( -"rule [\n\ - ruleID \"Rule1gml\"\ - context [ \n\ - node [ id 1 label \"B\" ] \n\ - node [ id 2 label \"C\" ] \n\ - edge [ source 1 target 3 label \"-1-\" ] \n\ - ] \n\ - left [ \n\ - node [ id 0 label \"A\" ] \n\ - node [ id 3 label \"D\" ] \n\ - edge [ source 0 target 2 label \"-0-\" ] \n\ - edge [ source 1 target 2 label \"-3-\" ] \n\ - edge [ source 2 target 3 label \"-2-\" ] \n\ - ] \n\ - right [ \n\ - node [ id 3 label \"E\" ]\n\ - node [ id 4 label \"D\" ]\n\ - edge [ source 2 target 3 label \"-4-\" ] \n\ - edge [ source 1 target 4 label \"-3-\" ] \n\ - ] \n\ -]\ -"); - - -const std::string Rule2 = std::string("\ - 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ - \n\ - || ==> | | \n\ - \n\ - 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ -"); - -const std::string Rule2gml = std::string("\ -rule [\n\ - ruleID \"Rule2gml\"\ - context [\n\ - node [ id 0 label \"C\" ]\n\ - node [ id 1 label \"C\" ]\n\ - node [ id 2 label \"C\" ]\n\ - node [ id 3 label \"C\" ]\n\ - node [ id 4 label \"C\" ]\n\ - node [ id 5 label \"*\" ]\n\ - ]\n\ - left [\n\ - edge [ source 1 target 2 label \"*\" ]\n\ - edge [ source 3 target 4 label \"=\" ]\n\ - edge [ source 4 target 5 label \"-\" ]\n\ - edge [ source 5 target 0 label \"=\" ]\n\ - ]\n\ - right [\n\ - edge [ source 0 target 1 label \"-\" ]\n\ - edge [ source 1 target 2 label \"-\" ]\n\ - edge [ source 2 target 3 label \"-\" ]\n\ - edge [ source 3 target 4 label \"-\" ]\n\ - edge [ source 4 target 5 label \"=\" ]\n\ - edge [ source 5 target 0 label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 0\n\ - op =\n\ - count 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 3\n\ - op <\n\ - count 2\n\ - edgeLabels [ label \"=\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 2\n\ - op >\n\ - count 0\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op =\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op !\n\ - nodeLabels [ label \"Z\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op =\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op !\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainNoEdge [\n\ - source 0\n\ - target 2\n\ - ]\n\ -]\ -"); - - -const std::string Rule3 = std::string("\ - 1(A) --- 2(B) --> 2(B)+edges(A)\n\ -"); - -const std::string Rule3gml = std::string( -"rule [\n\ - ruleID \"Rule3gml\"\ - context [ \n\ - node [ id 2 label \"B\" ] \n\ - ] \n\ - left [ \n\ - node [ id 1 label \"A\" ] \n\ - edge [ source 1 target 2 label \"---\" ] \n\ - ] \n" -" wildcard \"A\"\n" -" copyAndPaste [ source 1 id 2 ]\n" -" copyAndPaste [ source 1 id 2 target 2 ]\n" -" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" -" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" -"]" -); - - -const std::string Rule4 = std::string("\ - 3(A) 1(B) ==> 3(C) -1- 1(D) \n\ -"); - -const std::string Rule4gml = std::string( -"rule [\n\ - ruleID \"Rule4gml\"\ - left [ \n\ - node [ id 3 label \"A\" ] \n\ - node [ id 1 label \"B\" ] \n\ - ] \n\ - context [ \n\ - ] \n\ - right [ \n\ - node [ id 3 label \"C\" ]\n\ - node [ id 1 label \"D\" ]\n\ - edge [ source 1 target 3 label \"-1-\" ] \n\ - ] \n\ -]\ -"); - - -void printConstraints( const ggl::Rule rule ); -void printCopyAndPaste( const ggl::Rule rule ); -void printWildcard( const ggl::Rule rule ); - -int main( int argc, char** argv ) { - - std::vector rules; - std::vector rulesGML; - - rules.push_back(Rule1); - rulesGML.push_back(Rule1gml); - rules.push_back(Rule2); - rulesGML.push_back(Rule2gml); - rules.push_back(Rule3); - rulesGML.push_back(Rule3gml); - rules.push_back(Rule4); - rulesGML.push_back(Rule4gml); - - - for (size_t i=0; i ret = ggl::Rule_GML_grammar::parseRule( rulesGML[i] ); - - if (ret.second != -1) { - std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); - if (cur != NULL) { - std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { - case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; - case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; - case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; - case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; - case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; - default : std::cout <<"unknown operator type"; - } - std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { - std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; - if (cnp->target != (size_t)INT_MAX) - std::cout <target; - std::cout <<") edgeLabels ("; - for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) - std::cout <<" '"<<*l<<"'"; - std::cout <<")"< 4 3 \n\ + | / | | \n\ + 2(C) -0- 0(A) 2(C) 4(D) \n\ +"); + +const std::string Rule1gml = std::string( +"rule [\n\ + ruleID \"Rule1gml\"\ + context [ \n\ + node [ id 1 label \"B\" ] \n\ + node [ id 2 label \"C\" ] \n\ + edge [ source 1 target 3 label \"-1-\" ] \n\ + ] \n\ + left [ \n\ + node [ id 0 label \"A\" ] \n\ + node [ id 3 label \"D\" ] \n\ + edge [ source 0 target 2 label \"-0-\" ] \n\ + edge [ source 1 target 2 label \"-3-\" ] \n\ + edge [ source 2 target 3 label \"-2-\" ] \n\ + ] \n\ + right [ \n\ + node [ id 3 label \"E\" ]\n\ + node [ id 4 label \"D\" ]\n\ + edge [ source 2 target 3 label \"-4-\" ] \n\ + edge [ source 1 target 4 label \"-3-\" ] \n\ + ] \n\ +]\ +"); + + +const std::string Rule2 = std::string("\ + 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ + \n\ + || ==> | | \n\ + \n\ + 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ +"); + +const std::string Rule2gml = std::string("\ +rule [\n\ + ruleID \"Rule2gml\"\ + context [\n\ + node [ id 0 label \"C\" ]\n\ + node [ id 1 label \"C\" ]\n\ + node [ id 2 label \"C\" ]\n\ + node [ id 3 label \"C\" ]\n\ + node [ id 4 label \"C\" ]\n\ + node [ id 5 label \"*\" ]\n\ + ]\n\ + left [\n\ + edge [ source 1 target 2 label \"*\" ]\n\ + edge [ source 3 target 4 label \"=\" ]\n\ + edge [ source 4 target 5 label \"-\" ]\n\ + edge [ source 5 target 0 label \"=\" ]\n\ + ]\n\ + right [\n\ + edge [ source 0 target 1 label \"-\" ]\n\ + edge [ source 1 target 2 label \"-\" ]\n\ + edge [ source 2 target 3 label \"-\" ]\n\ + edge [ source 3 target 4 label \"-\" ]\n\ + edge [ source 4 target 5 label \"=\" ]\n\ + edge [ source 5 target 0 label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 0\n\ + op =\n\ + count 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 3\n\ + op <\n\ + count 2\n\ + edgeLabels [ label \"=\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 2\n\ + op >\n\ + count 0\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op =\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op !\n\ + nodeLabels [ label \"Z\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op =\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op !\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainNoEdge [\n\ + source 0\n\ + target 2\n\ + ]\n\ +]\ +"); + + +const std::string Rule3 = std::string("\ + 1(A) --- 2(B) --> 2(B)+edges(A)\n\ +"); + +const std::string Rule3gml = std::string( +"rule [\n\ + ruleID \"Rule3gml\"\ + context [ \n\ + node [ id 2 label \"B\" ] \n\ + ] \n\ + left [ \n\ + node [ id 1 label \"A\" ] \n\ + edge [ source 1 target 2 label \"---\" ] \n\ + ] \n" +" wildcard \"A\"\n" +" copyAndPaste [ source 1 id 2 ]\n" +" copyAndPaste [ source 1 id 2 target 2 ]\n" +" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" +" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" +"]" +); + + +const std::string Rule4 = std::string("\ + 3(A) 1(B) ==> 3(C) -1- 1(D) \n\ +"); + +const std::string Rule4gml = std::string( +"rule [\n\ + ruleID \"Rule4gml\"\ + left [ \n\ + node [ id 3 label \"A\" ] \n\ + node [ id 1 label \"B\" ] \n\ + ] \n\ + context [ \n\ + ] \n\ + right [ \n\ + node [ id 3 label \"C\" ]\n\ + node [ id 1 label \"D\" ]\n\ + edge [ source 1 target 3 label \"-1-\" ] \n\ + ] \n\ +]\ +"); + + +void printConstraints( const ggl::Rule rule ); +void printCopyAndPaste( const ggl::Rule rule ); +void printWildcard( const ggl::Rule rule ); + +int main( int argc, char** argv ) { + + std::vector rules; + std::vector rulesGML; + + rules.push_back(Rule1); + rulesGML.push_back(Rule1gml); + rules.push_back(Rule2); + rulesGML.push_back(Rule2gml); + rules.push_back(Rule3); + rulesGML.push_back(Rule3gml); + rules.push_back(Rule4); + rulesGML.push_back(Rule4gml); + + + for (size_t i=0; i ret = ggl::Rule_GML_grammar::parseRule( rulesGML[i] ); + + if (ret.second != -1) { + std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); + if (cur != NULL) { + std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { + case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; + case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; + case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; + case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; + case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; + default : std::cout <<"unknown operator type"; + } + std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { + std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; + if (cnp->target != (size_t)INT_MAX) + std::cout <target; + std::cout <<") edgeLabels ("; + for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) + std::cout <<" '"<<*l<<"'"; + std::cout <<")"< 4 3 \n\ - | / | | \n\ - 2(C) -0- 0(A) 2(C) 4(D) \n\ -"); - -const std::string Rule1gml = std::string( -"rule [\n\ - ruleID \"Rule1gml\"\ - context [ \n\ - node [ id 1 label \"B\" ] \n\ - node [ id 2 label \"C\" ] \n\ - edge [ source 1 target 3 label \"-1-\" ] \n\ - ] \n\ - left [ \n\ - node [ id 0 label \"A\" ] \n\ - node [ id 3 label \"D\" ] \n\ - edge [ source 0 target 2 label \"-0-\" ] \n\ - edge [ source 1 target 2 label \"-3-\" ] \n\ - edge [ source 2 target 3 label \"-2-\" ] \n\ - ] \n\ - right [ \n\ - node [ id 3 label \"E\" ]\n\ - node [ id 4 label \"D\" ]\n\ - edge [ source 2 target 3 label \"-4-\" ] \n\ - edge [ source 1 target 4 label \"-3-\" ] \n\ - ] \n\ -]\ -"); - - -const std::string Rule2 = std::string("\ - 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ - \n\ - || ==> | | \n\ - \n\ - 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ -"); - -const std::string Rule2gml = std::string("\ -rule [\n\ - ruleID \"Rule2gml\"\ - context [\n\ - node [ id 0 label \"C\" ]\n\ - node [ id 1 label \"C\" ]\n\ - node [ id 2 label \"C\" ]\n\ - node [ id 3 label \"C\" ]\n\ - node [ id 4 label \"C\" ]\n\ - node [ id 5 label \"*\" ]\n\ - ]\n\ - left [\n\ - edge [ source 1 target 2 label \"*\" ]\n\ - edge [ source 3 target 4 label \"=\" ]\n\ - edge [ source 4 target 5 label \"-\" ]\n\ - edge [ source 5 target 0 label \"=\" ]\n\ - ]\n\ - right [\n\ - edge [ source 0 target 1 label \"-\" ]\n\ - edge [ source 1 target 2 label \"-\" ]\n\ - edge [ source 2 target 3 label \"-\" ]\n\ - edge [ source 3 target 4 label \"-\" ]\n\ - edge [ source 4 target 5 label \"=\" ]\n\ - edge [ source 5 target 0 label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 0\n\ - op =\n\ - count 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 3\n\ - op <\n\ - count 2\n\ - edgeLabels [ label \"=\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 2\n\ - op >\n\ - count 0\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op =\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op !\n\ - nodeLabels [ label \"Z\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op =\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op !\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainNoEdge [\n\ - source 0\n\ - target 2\n\ - ]\n\ -]\ -"); - - -const std::string Rule3 = std::string("\ - 1(A) --- 2(B) --> 2(B)+edges(A)\n\ -"); - -const std::string Rule3gml = std::string( -"rule [\n\ - ruleID \"Rule3gml\"\ - context [ \n\ - node [ id 2 label \"B\" ] \n\ - ] \n\ - left [ \n\ - node [ id 1 label \"A\" ] \n\ - edge [ source 1 target 2 label \"---\" ] \n\ - ] \n" -" wildcard \"A\"\n" -" copyAndPaste [ source 1 id 2 ]\n" -" copyAndPaste [ source 1 id 2 target 2 ]\n" -" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" -" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" -"]" -); - -void printConstraints( const ggl::Rule rule ); -void printCopyAndPaste( const ggl::Rule rule ); -void printWildcard( const ggl::Rule rule ); - -int main( int argc, char** argv ) { - - std::vector rules; - std::vector rulesGML; - - rules.push_back(Rule1); - rulesGML.push_back(Rule1gml); - rules.push_back(Rule2); - rulesGML.push_back(Rule2gml); - rules.push_back(Rule3); - rulesGML.push_back(Rule3gml); - - - for (size_t i=0; i ret = ggl::Rule_GML_grammar::parseRule( rulesGML[i] ); - - if (ret.second != -1) { - std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); - if (cur != NULL) { - std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { - case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; - case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; - case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; - case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; - case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; - default : std::cout <<"unknown operator type"; - } - std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { - std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; - if (cnp->target != (size_t)INT_MAX) - std::cout <target; - std::cout <<") edgeLabels ("; - for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) - std::cout <<" '"<<*l<<"'"; - std::cout <<")"< 4 3 \n\ + | / | | \n\ + 2(C) -0- 0(A) 2(C) 4(D) \n\ +"); + +const std::string Rule1gml = std::string( +"rule [\n\ + ruleID \"Rule1gml\"\ + context [ \n\ + node [ id 1 label \"B\" ] \n\ + node [ id 2 label \"C\" ] \n\ + edge [ source 1 target 3 label \"-1-\" ] \n\ + ] \n\ + left [ \n\ + node [ id 0 label \"A\" ] \n\ + node [ id 3 label \"D\" ] \n\ + edge [ source 0 target 2 label \"-0-\" ] \n\ + edge [ source 1 target 2 label \"-3-\" ] \n\ + edge [ source 2 target 3 label \"-2-\" ] \n\ + ] \n\ + right [ \n\ + node [ id 3 label \"E\" ]\n\ + node [ id 4 label \"D\" ]\n\ + edge [ source 2 target 3 label \"-4-\" ] \n\ + edge [ source 1 target 4 label \"-3-\" ] \n\ + ] \n\ +]\ +"); + + +const std::string Rule2 = std::string("\ + 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ + \n\ + || ==> | | \n\ + \n\ + 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ +"); + +const std::string Rule2gml = std::string("\ +rule [\n\ + ruleID \"Rule2gml\"\ + context [\n\ + node [ id 0 label \"C\" ]\n\ + node [ id 1 label \"C\" ]\n\ + node [ id 2 label \"C\" ]\n\ + node [ id 3 label \"C\" ]\n\ + node [ id 4 label \"C\" ]\n\ + node [ id 5 label \"*\" ]\n\ + ]\n\ + left [\n\ + edge [ source 1 target 2 label \"*\" ]\n\ + edge [ source 3 target 4 label \"=\" ]\n\ + edge [ source 4 target 5 label \"-\" ]\n\ + edge [ source 5 target 0 label \"=\" ]\n\ + ]\n\ + right [\n\ + edge [ source 0 target 1 label \"-\" ]\n\ + edge [ source 1 target 2 label \"-\" ]\n\ + edge [ source 2 target 3 label \"-\" ]\n\ + edge [ source 3 target 4 label \"-\" ]\n\ + edge [ source 4 target 5 label \"=\" ]\n\ + edge [ source 5 target 0 label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 0\n\ + op =\n\ + count 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 3\n\ + op <\n\ + count 2\n\ + edgeLabels [ label \"=\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 2\n\ + op >\n\ + count 0\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op =\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op !\n\ + nodeLabels [ label \"Z\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op =\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op !\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainNoEdge [\n\ + source 0\n\ + target 2\n\ + ]\n\ +]\ +"); + + +const std::string Rule3 = std::string("\ + 1(A) --- 2(B) --> 2(B)+edges(A)\n\ +"); + +const std::string Rule3gml = std::string( +"rule [\n\ + ruleID \"Rule3gml\"\ + context [ \n\ + node [ id 2 label \"B\" ] \n\ + ] \n\ + left [ \n\ + node [ id 1 label \"A\" ] \n\ + edge [ source 1 target 2 label \"---\" ] \n\ + ] \n" +" wildcard \"A\"\n" +" copyAndPaste [ source 1 id 2 ]\n" +" copyAndPaste [ source 1 id 2 target 2 ]\n" +" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" +" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" +"]" +); + +void printConstraints( const ggl::Rule rule ); +void printCopyAndPaste( const ggl::Rule rule ); +void printWildcard( const ggl::Rule rule ); + +int main( int argc, char** argv ) { + + std::vector rules; + std::vector rulesGML; + + rules.push_back(Rule1); + rulesGML.push_back(Rule1gml); + rules.push_back(Rule2); + rulesGML.push_back(Rule2gml); + rules.push_back(Rule3); + rulesGML.push_back(Rule3gml); + + + for (size_t i=0; i ret = ggl::Rule_GML_grammar::parseRule( rulesGML[i] ); + + if (ret.second != -1) { + std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); + if (cur != NULL) { + std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { + case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; + case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; + case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; + case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; + case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; + default : std::cout <<"unknown operator type"; + } + std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { + std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; + if (cnp->target != (size_t)INT_MAX) + std::cout <target; + std::cout <<") edgeLabels ("; + for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) + std::cout <<" '"<<*l<<"'"; + std::cout <<")"< 4 3 \n\ - | / | | \n\ - 2(C) -0- 0(A) 2(C) 4(D) \n\ -"); - -const std::string Rule1gml = std::string( -"rule [\n\ - ruleID \"Rule1gml\"\ - context [ \n\ - node [ id 1 label \"B\" ] \n\ - node [ id 2 label \"C\" ] \n\ - edge [ source 1 target 3 label \"-1-\" ] \n\ - ] \n\ - left [ \n\ - node [ id 0 label \"A\" ] \n\ - node [ id 3 label \"D\" ] \n\ - edge [ source 0 target 2 label \"-0-\" ] \n\ - edge [ source 1 target 2 label \"-3-\" ] \n\ - edge [ source 2 target 3 label \"-2-\" ] \n\ - ] \n\ - right [ \n\ - node [ id 3 label \"E\" ]\n\ - node [ id 4 label \"D\" ]\n\ - edge [ source 2 target 3 label \"-4-\" ] \n\ - edge [ source 1 target 4 label \"-3-\" ] \n\ - ] \n\ -]\ -"); - - - -const std::string CompactRule1gml = std::string( -"graph [\n\ - node [ id 0 label \"A|\" ] \n\ - node [ id 1 label \"B\" ] \n\ - node [ id 2 label \"C\" ] \n\ - node [ id 3 label \"D|E\" ]\n\ - node [ id 4 label \"|D\" ]\n\ - edge [ source 0 target 2 label \"-0-|\" ] \n\ - edge [ source 1 target 3 label \"-1-\" ] \n\ - edge [ source 1 target 2 label \"-3-|\" ] \n\ - edge [ source 2 target 3 label \"-2-|-4-\" ] \n\ - edge [ source 1 target 4 label \"|-3-\" ] \n\ -]\ -"); - - -const std::string Rule2 = std::string("\ - 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ - \n\ - || ==> | | \n\ - \n\ - 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ -"); - -const std::string Rule2gml = std::string("\ -rule [\n\ - ruleID \"Rule2gml\"\ - context [\n\ - node [ id 0 label \"C\" ]\n\ - node [ id 1 label \"C\" ]\n\ - node [ id 2 label \"C\" ]\n\ - node [ id 3 label \"C\" ]\n\ - node [ id 4 label \"C\" ]\n\ - node [ id 5 label \"*\" ]\n\ - ]\n\ - left [\n\ - edge [ source 1 target 2 label \"*\" ]\n\ - edge [ source 3 target 4 label \"=\" ]\n\ - edge [ source 4 target 5 label \"-\" ]\n\ - edge [ source 5 target 0 label \"=\" ]\n\ - ]\n\ - right [\n\ - edge [ source 0 target 1 label \"-\" ]\n\ - edge [ source 1 target 2 label \"-\" ]\n\ - edge [ source 2 target 3 label \"-\" ]\n\ - edge [ source 3 target 4 label \"-\" ]\n\ - edge [ source 4 target 5 label \"=\" ]\n\ - edge [ source 5 target 0 label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 0\n\ - op =\n\ - count 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 3\n\ - op <\n\ - count 2\n\ - edgeLabels [ label \"=\" ]\n\ - ]\n\ - constrainAdj [\n\ - id 2\n\ - op >\n\ - count 0\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op =\n\ - nodeLabels [ label \"H\" label \"X\" ]\n\ - ]\n\ - constrainNode [\n\ - id 5\n\ - op !\n\ - nodeLabels [ label \"Z\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op =\n\ - edgeLabels [ label \"=\" label \"#\" ]\n\ - ]\n\ - constrainEdge [\n\ - source 1\n\ - target 2\n\ - op !\n\ - edgeLabels [ label \"-\" ]\n\ - ]\n\ - constrainNoEdge [\n\ - source 0\n\ - target 2\n\ - ]\n\ -]\ -"); - - -const std::string Rule3 = std::string("\ - 1(A) --- 2(B) --> 2(B)+edges(A)\n\ -"); - -const std::string Rule3gml = std::string( -"rule [\n\ - ruleID \"Rule3gml\"\ - context [ \n\ - node [ id 2 label \"B\" ] \n\ - ] \n\ - left [ \n\ - node [ id 1 label \"A\" ] \n\ - edge [ source 1 target 2 label \"---\" ] \n\ - ] \n" -" wildcard \"A\"\n" -" copyAndPaste [ source 1 id 2 ]\n" -" copyAndPaste [ source 1 id 2 target 2 ]\n" -" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" -" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" -"]" -); - -void printConstraints( const ggl::Rule rule ); -void printCopyAndPaste( const ggl::Rule rule ); -void printWildcard( const ggl::Rule rule ); - -int main( int argc, char** argv ) { - - std::vector rules; - std::vector rulesGML; - - rules.push_back(Rule1); - rulesGML.push_back(Rule1gml); - rules.push_back(Rule2); - rulesGML.push_back(Rule2gml); - rules.push_back(Rule3); - rulesGML.push_back(Rule3gml); - - - for (size_t i=0; i ret = ggl::Rule_GMLparser::parseRule( rulesGML[i] ); - - - if (ret.second != -1) { - std::cout <<" Parsing error at position " < ret = ggl::Rule_GMLparser::parseCompactRule( rulesGML[i] ); - - if (ret.second != -1) { - std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); - if (cur != NULL) { - std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); - if (cur != NULL) { - std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { - case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; - case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; - case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; - case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; - case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; - default : std::cout <<"unknown operator type"; - } - std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { - std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; - if (cnp->target != (size_t)INT_MAX) - std::cout <target; - std::cout <<") edgeLabels ("; - for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) - std::cout <<" '"<<*l<<"'"; - std::cout <<")"< 4 3 \n\ + | / | | \n\ + 2(C) -0- 0(A) 2(C) 4(D) \n\ +"); + +const std::string Rule1gml = std::string( +"rule [\n\ + ruleID \"Rule1gml\"\ + context [ \n\ + node [ id 1 label \"B\" ] \n\ + node [ id 2 label \"C\" ] \n\ + edge [ source 1 target 3 label \"-1-\" ] \n\ + ] \n\ + left [ \n\ + node [ id 0 label \"A\" ] \n\ + node [ id 3 label \"D\" ] \n\ + edge [ source 0 target 2 label \"-0-\" ] \n\ + edge [ source 1 target 2 label \"-3-\" ] \n\ + edge [ source 2 target 3 label \"-2-\" ] \n\ + ] \n\ + right [ \n\ + node [ id 3 label \"E\" ]\n\ + node [ id 4 label \"D\" ]\n\ + edge [ source 2 target 3 label \"-4-\" ] \n\ + edge [ source 1 target 4 label \"-3-\" ] \n\ + ] \n\ +]\ +"); + + + +const std::string CompactRule1gml = std::string( +"graph [\n\ + node [ id 0 label \"A|\" ] \n\ + node [ id 1 label \"B\" ] \n\ + node [ id 2 label \"C\" ] \n\ + node [ id 3 label \"D|E\" ]\n\ + node [ id 4 label \"|D\" ]\n\ + edge [ source 0 target 2 label \"-0-|\" ] \n\ + edge [ source 1 target 3 label \"-1-\" ] \n\ + edge [ source 1 target 2 label \"-3-|\" ] \n\ + edge [ source 2 target 3 label \"-2-|-4-\" ] \n\ + edge [ source 1 target 4 label \"|-3-\" ] \n\ +]\ +"); + + +const std::string Rule2 = std::string("\ + 0(C) 1(C) * 2(C) 0(C) - 1(C) - 2(C) \n\ + \n\ + || ==> | | \n\ + \n\ + 5(*) - 4(C) = 3(C) 5(*) = 4(C) - 3(C) \n\ +"); + +const std::string Rule2gml = std::string("\ +rule [\n\ + ruleID \"Rule2gml\"\ + context [\n\ + node [ id 0 label \"C\" ]\n\ + node [ id 1 label \"C\" ]\n\ + node [ id 2 label \"C\" ]\n\ + node [ id 3 label \"C\" ]\n\ + node [ id 4 label \"C\" ]\n\ + node [ id 5 label \"*\" ]\n\ + ]\n\ + left [\n\ + edge [ source 1 target 2 label \"*\" ]\n\ + edge [ source 3 target 4 label \"=\" ]\n\ + edge [ source 4 target 5 label \"-\" ]\n\ + edge [ source 5 target 0 label \"=\" ]\n\ + ]\n\ + right [\n\ + edge [ source 0 target 1 label \"-\" ]\n\ + edge [ source 1 target 2 label \"-\" ]\n\ + edge [ source 2 target 3 label \"-\" ]\n\ + edge [ source 3 target 4 label \"-\" ]\n\ + edge [ source 4 target 5 label \"=\" ]\n\ + edge [ source 5 target 0 label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 0\n\ + op =\n\ + count 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 3\n\ + op <\n\ + count 2\n\ + edgeLabels [ label \"=\" ]\n\ + ]\n\ + constrainAdj [\n\ + id 2\n\ + op >\n\ + count 0\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op =\n\ + nodeLabels [ label \"H\" label \"X\" ]\n\ + ]\n\ + constrainNode [\n\ + id 5\n\ + op !\n\ + nodeLabels [ label \"Z\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op =\n\ + edgeLabels [ label \"=\" label \"#\" ]\n\ + ]\n\ + constrainEdge [\n\ + source 1\n\ + target 2\n\ + op !\n\ + edgeLabels [ label \"-\" ]\n\ + ]\n\ + constrainNoEdge [\n\ + source 0\n\ + target 2\n\ + ]\n\ +]\ +"); + + +const std::string Rule3 = std::string("\ + 1(A) --- 2(B) --> 2(B)+edges(A)\n\ +"); + +const std::string Rule3gml = std::string( +"rule [\n\ + ruleID \"Rule3gml\"\ + context [ \n\ + node [ id 2 label \"B\" ] \n\ + ] \n\ + left [ \n\ + node [ id 1 label \"A\" ] \n\ + edge [ source 1 target 2 label \"---\" ] \n\ + ] \n" +" wildcard \"A\"\n" +" copyAndPaste [ source 1 id 2 ]\n" +" copyAndPaste [ source 1 id 2 target 2 ]\n" +" copyAndPaste [ source 1 id 2 edgeLabels [ label \"+++\" ] ]\n" +" copyAndPaste [ source 1 id 2 target 2 edgeLabels [ label \"+++\" ] ]\n" +"]" +); + +void printConstraints( const ggl::Rule rule ); +void printCopyAndPaste( const ggl::Rule rule ); +void printWildcard( const ggl::Rule rule ); + +int main( int argc, char** argv ) { + + std::vector rules; + std::vector rulesGML; + + rules.push_back(Rule1); + rulesGML.push_back(Rule1gml); + rules.push_back(Rule2); + rulesGML.push_back(Rule2gml); + rules.push_back(Rule3); + rulesGML.push_back(Rule3gml); + + + for (size_t i=0; i ret = ggl::Rule_GMLparser::parseRule( rulesGML[i] ); + + + if (ret.second != -1) { + std::cout <<" Parsing error at position " < ret = ggl::Rule_GMLparser::parseCompactRule( rulesGML[i] ); + + if (ret.second != -1) { + std::cout <<" Parsing error at position " <constrainedNodeID <compareType==sgm::MC_NodeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_EdgeLabel "<constrainedFromID <constrainedToID <compareType==sgm::MC_EdgeLabel::ALLOWED?"=":"!") <(*c); + if (cur != NULL) { + std::cout <<" + MC_NoEdge "<constrainedFromID <constrainedToID <(*c); + if (cur != NULL) { + std::cout <<" + MC_NodeAdjacency "<constrainedNodeID <op) { + case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; + case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; + case sgm::MC_NodeAdjacency::MC_GQ : std::cout <<">="; break; + case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; + case sgm::MC_NodeAdjacency::MC_LQ : std::cout <<"<="; break; + default : std::cout <<"unknown operator type"; + } + std::cout <count <second.begin(); cnp!=n->second.end(); cnp++) { + std::cout <<" copy-and-paste : source("<source <<") pasteID("<pasteID<<") target("; + if (cnp->target != (size_t)INT_MAX) + std::cout <target; + std::cout <<") edgeLabels ("; + for (ggl::Rule::RuleCnP::LabelSet::const_iterator l=cnp->edgeLabels.begin(); l!=cnp->edgeLabels.end(); ++l) + std::cout <<" '"<<*l<<"'"; + std::cout <<")"< -#include -#include -#include -#include - -#include "sgm/Graph_boost.hh" - -#include "ggl/Graph.hh" - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/AP_NSPDK.hh" -#include "ggl/chem/SMILESparser.hh" -#include "ggl/chem/SMILESwriter.hh" - -#include "dataTargetGraph_1.icc" - -#include "utilPrintGraph_Interface.icc" - - - -using namespace std; -using namespace ggl; -using namespace ggl::chem; - -void testFeatures( AP_NSPDK & ap, const std::string molSMILES ) { - - cout <<" given : '" < parse = SMILESparser::parseSMILES( molSMILES ); - cout <<" parse : "<getFeatures( mol )" < > features = ap.getFeatures( mol ); - - // create a dummy graph - sgm::Graph_boost< ggl::chem::Molecule \ - , ggl::PropNodeLabel \ - , ggl::PropEdgeLabel \ - , ggl::PropNodeIndex \ - > molGraph(mol); - - for (size_t i=0; igetEdgeLabel() - // ad next node label - << molGraph.getNodeLabel( *cur ); - } - std::cout <<"' = " < parse = SMILESparser::parseSMILES( molSMILES ); - cout <<" parse : "< molGraph(parse.first); -// cout <<" corrected graph :\n" << molGraph < molNonArom; - - // TODO more molecules - molNonArom.push_back("O=C1C=CC(=O)C=C1"); - molNonArom.push_back("C1=CC=C1"); - molNonArom.push_back("NC(=O)CCCCC1CCSS1"); - molNonArom.push_back("O=C1CCCCC1"); - molNonArom.push_back("CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CCO"); - molNonArom.push_back("CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CC=O"); - molNonArom.push_back("[O-]C(=O)CCC1NC=NC1=O"); - molNonArom.push_back("CN1CC(=O)NC1=N"); - molNonArom.push_back("OC1CCCCC1"); -//molNonArom.push_back("O=C1NC(=O)C2NC(=O)C(=O)NC=2N1"); // wrong in OpenBabel -//molNonArom.push_back("C1=CC=CC=CC=C1"); // wrong in OpenBabel - molNonArom.push_back("C1CCCC#CCC1"); - - std::vector< std::string > molArom; - - // TODO more molecules - molArom.push_back("c1c2c(nc[nH]2)ncn1"); -//molArom.push_back("c1cc2C=Cc3cccc(c1)c23"); // wrong : OpenBabel + Marvin:general - molArom.push_back("Oc1ccccc1"); - molArom.push_back("Nc1ncnc2[nH]cnc12"); - molArom.push_back("NC(=O)c1cccnc1"); - molArom.push_back("[O-]C(=O)C(=O)Cc1ccccc1"); - molArom.push_back("[O-]C(=O)C(=O)Cc1c[nH]c2ccccc12"); - molArom.push_back("[O-]C(=O)C(=O)Cc1cnc2ccccc12"); - molArom.push_back("COc1cc(cc(OC)c1O)C=CC([O-])=O"); - molArom.push_back("COc1cc(C=CCO)ccc1O"); - molArom.push_back("[H]C(=C([H])c1c[nH]cn1)C([O-])=O"); - molArom.push_back("CC(=O)n1ccnc1"); - molArom.push_back("COc1cc(C=CC=O)ccc1O"); - molArom.push_back("Cc1ncsc1CCO"); - molArom.push_back("Oc1ccc(cc1)C=CC(=O)c1ccc(O)cc1O"); - molArom.push_back("c1ccncc1"); - molArom.push_back("c1ccccc1-c2ccccc2"); - molArom.push_back("c1ccccc1c2ccccc2"); - - - molArom.push_back("c1[nH]c2c(n1)c(=O)[nH]c(n2)N"); // guanine - molArom.push_back("c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N"); // guanosine - molArom.push_back("c1nc2c(n1[CH]3C[CH]([CH](O3)CO)O)[nH]c(nc2=O)N"); // deoxyguanosine - molArom.push_back("n1c(c2c(nc1)ncn2)N"); // adenine - molArom.push_back("Nc1ncnc2n(cnc12)[CH]1O[CH](CO)[CH](O)[CH]1O"); // adenosine - molArom.push_back("n2c1c(ncnc1n(c2)[CH]3O[CH]([CH](O)C3)CO)N"); // deoxyadenosine - - - // tricky cases including sulphur (sulphur ring is predicted non-aromatic) - molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)(=O)OP(O)([O-])=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)(O)=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CC(O)=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(O)=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CCO)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(C[CH]=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)([O-])=O)c2C)c(N)n1"); - molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)([O-])=O)c2C)c(N)n1"); - - molArom.push_back("Oc1ccc(cc1)c2cn3c(nc(Cc4ccccc4)c3=O)c(Cc5ccccc5)[nH]2"); - molArom.push_back("CC[CH](C)c1nc2c(CCCNC(N)=N)[nH]c(cn2c1=O)c3c[nH]c4ccccc43"); - molArom.push_back("OS(=O)(=O)Oc1ccc(Cc2nc3c(Cc4ccccc4)[nH]c(cn3c2=O)c5ccc(OS(O)(=O)=O)cc5)cc1"); - molArom.push_back("Oc1ccc(Cc2nc3c(Cc4ccccc4)[nH]c(cn3c2=O)c5ccc(O)cc5)cc1"); - - // weird cases with biiiig aromatic ring containing several smaller ones - // --> currently not working since covering large aromatic ring is not predicted and ignored, thus backup handling does not work -// molArom.push_back("Cc1c(CCC(O)=O)c2cc3[nH]c(cc4nc(cc5[nH]c(cc1n2)c(C)c5C=C)c(C)c4C=C)c(C)c3CCC(O)=O"); -// molArom.push_back("Cc1c(CCC(O)=O)c2cc3nc(cc4[nH]c(cc5nc(cc1[nH]2)c(C)c5CCC(O)=O)c(CCC(O)=O)c4C)c(CCC(O)=O)c3C"); -// molArom.push_back("Cc1c(CCC(O)=O)c2cc3[nH]c(cc4nc(cc5[nH]c(cc1n2)c(CCC(O)=O)c5C)c(CCC(O)=O)c4C)c(CCC(O)=O)c3C"); - - - const std::set < std::string > & models = AP_NSPDK_Model::getAvailableModels(); - - for ( std::set < std::string >::const_iterator modelID = models.begin(); modelID != models.end(); ++modelID) { - - std::cout <<"\n################################################\n\n"; - std::cout <<"load model '"<<*modelID<<"'\n"; std::cout.flush(); - AP_NSPDK apSVM(*modelID); - - testFeatures( apSVM, "c1cc2C=Cc3cccc(c1)c23" ); - - std::cout <<"\n**********************************\n\n"; - std::cout <<"\n testing non-aromatic molecules :\n"<::const_iterator mol; - for ( mol=molNonArom.begin(); mol != molNonArom.end(); mol++ ) { - try { - testMol( apSVM, *mol ); - } catch (std::exception & ex) { - std::cout <<" --> aromaticity perception failed : " - < aromaticity perception failed : " - < +#include +#include +#include +#include + +#include "sgm/Graph_boost.hh" + +#include "ggl/Graph.hh" + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/AP_NSPDK.hh" +#include "ggl/chem/SMILESparser.hh" +#include "ggl/chem/SMILESwriter.hh" + +#include "dataTargetGraph_1.icc" + +#include "utilPrintGraph_Interface.icc" + + + +using namespace std; +using namespace ggl; +using namespace ggl::chem; + +void testFeatures( AP_NSPDK & ap, const std::string molSMILES ) { + + cout <<" given : '" < parse = SMILESparser::parseSMILES( molSMILES ); + cout <<" parse : "<getFeatures( mol )" < > features = ap.getFeatures( mol ); + + // create a dummy graph + sgm::Graph_boost< ggl::chem::Molecule \ + , ggl::PropNodeLabel \ + , ggl::PropEdgeLabel \ + , ggl::PropNodeIndex \ + > molGraph(mol); + + for (size_t i=0; igetEdgeLabel() + // ad next node label + << molGraph.getNodeLabel( *cur ); + } + std::cout <<"' = " < parse = SMILESparser::parseSMILES( molSMILES ); + cout <<" parse : "< molGraph(parse.first); +// cout <<" corrected graph :\n" << molGraph < molNonArom; + + // TODO more molecules + molNonArom.push_back("O=C1C=CC(=O)C=C1"); + molNonArom.push_back("C1=CC=C1"); + molNonArom.push_back("NC(=O)CCCCC1CCSS1"); + molNonArom.push_back("O=C1CCCCC1"); + molNonArom.push_back("CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CCO"); + molNonArom.push_back("CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CC=O"); + molNonArom.push_back("[O-]C(=O)CCC1NC=NC1=O"); + molNonArom.push_back("CN1CC(=O)NC1=N"); + molNonArom.push_back("OC1CCCCC1"); +//molNonArom.push_back("O=C1NC(=O)C2NC(=O)C(=O)NC=2N1"); // wrong in OpenBabel +//molNonArom.push_back("C1=CC=CC=CC=C1"); // wrong in OpenBabel + molNonArom.push_back("C1CCCC#CCC1"); + + std::vector< std::string > molArom; + + // TODO more molecules + molArom.push_back("c1c2c(nc[nH]2)ncn1"); +//molArom.push_back("c1cc2C=Cc3cccc(c1)c23"); // wrong : OpenBabel + Marvin:general + molArom.push_back("Oc1ccccc1"); + molArom.push_back("Nc1ncnc2[nH]cnc12"); + molArom.push_back("NC(=O)c1cccnc1"); + molArom.push_back("[O-]C(=O)C(=O)Cc1ccccc1"); + molArom.push_back("[O-]C(=O)C(=O)Cc1c[nH]c2ccccc12"); + molArom.push_back("[O-]C(=O)C(=O)Cc1cnc2ccccc12"); + molArom.push_back("COc1cc(cc(OC)c1O)C=CC([O-])=O"); + molArom.push_back("COc1cc(C=CCO)ccc1O"); + molArom.push_back("[H]C(=C([H])c1c[nH]cn1)C([O-])=O"); + molArom.push_back("CC(=O)n1ccnc1"); + molArom.push_back("COc1cc(C=CC=O)ccc1O"); + molArom.push_back("Cc1ncsc1CCO"); + molArom.push_back("Oc1ccc(cc1)C=CC(=O)c1ccc(O)cc1O"); + molArom.push_back("c1ccncc1"); + molArom.push_back("c1ccccc1-c2ccccc2"); + molArom.push_back("c1ccccc1c2ccccc2"); + + + molArom.push_back("c1[nH]c2c(n1)c(=O)[nH]c(n2)N"); // guanine + molArom.push_back("c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N"); // guanosine + molArom.push_back("c1nc2c(n1[CH]3C[CH]([CH](O3)CO)O)[nH]c(nc2=O)N"); // deoxyguanosine + molArom.push_back("n1c(c2c(nc1)ncn2)N"); // adenine + molArom.push_back("Nc1ncnc2n(cnc12)[CH]1O[CH](CO)[CH](O)[CH]1O"); // adenosine + molArom.push_back("n2c1c(ncnc1n(c2)[CH]3O[CH]([CH](O)C3)CO)N"); // deoxyadenosine + + + // tricky cases including sulphur (sulphur ring is predicted non-aromatic) + molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)(=O)OP(O)([O-])=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)(O)=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CC(O)=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(O)=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CCO)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(C[CH]=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)([O-])=O)c2C)c(N)n1"); + molArom.push_back("Cc1ncc(C[n+]2csc(CCOP(O)(=O)OP(O)([O-])=O)c2C)c(N)n1"); + + molArom.push_back("Oc1ccc(cc1)c2cn3c(nc(Cc4ccccc4)c3=O)c(Cc5ccccc5)[nH]2"); + molArom.push_back("CC[CH](C)c1nc2c(CCCNC(N)=N)[nH]c(cn2c1=O)c3c[nH]c4ccccc43"); + molArom.push_back("OS(=O)(=O)Oc1ccc(Cc2nc3c(Cc4ccccc4)[nH]c(cn3c2=O)c5ccc(OS(O)(=O)=O)cc5)cc1"); + molArom.push_back("Oc1ccc(Cc2nc3c(Cc4ccccc4)[nH]c(cn3c2=O)c5ccc(O)cc5)cc1"); + + // weird cases with biiiig aromatic ring containing several smaller ones + // --> currently not working since covering large aromatic ring is not predicted and ignored, thus backup handling does not work +// molArom.push_back("Cc1c(CCC(O)=O)c2cc3[nH]c(cc4nc(cc5[nH]c(cc1n2)c(C)c5C=C)c(C)c4C=C)c(C)c3CCC(O)=O"); +// molArom.push_back("Cc1c(CCC(O)=O)c2cc3nc(cc4[nH]c(cc5nc(cc1[nH]2)c(C)c5CCC(O)=O)c(CCC(O)=O)c4C)c(CCC(O)=O)c3C"); +// molArom.push_back("Cc1c(CCC(O)=O)c2cc3[nH]c(cc4nc(cc5[nH]c(cc1n2)c(CCC(O)=O)c5C)c(CCC(O)=O)c4C)c(CCC(O)=O)c3C"); + + + const std::set < std::string > & models = AP_NSPDK_Model::getAvailableModels(); + + for ( std::set < std::string >::const_iterator modelID = models.begin(); modelID != models.end(); ++modelID) { + + std::cout <<"\n################################################\n\n"; + std::cout <<"load model '"<<*modelID<<"'\n"; std::cout.flush(); + AP_NSPDK apSVM(*modelID); + + testFeatures( apSVM, "c1cc2C=Cc3cccc(c1)c23" ); + + std::cout <<"\n**********************************\n\n"; + std::cout <<"\n testing non-aromatic molecules :\n"<::const_iterator mol; + for ( mol=molNonArom.begin(); mol != molNonArom.end(); mol++ ) { + try { + testMol( apSVM, *mol ); + } catch (std::exception & ex) { + std::cout <<" --> aromaticity perception failed : " + < aromaticity perception failed : " + < -#include - -#include "ggl/Graph.hh" -#include - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/SMILESparser.hh" -#include "ggl/chem/GS_SMILES.hh" - -#include "dataTargetGraph_1.icc" - -#include "utilPrintGraph_Interface.icc" - -void runSuccessiveInsert( const std::vector& SMILES) { - - typedef std::set< std::string > SMILES_container; - typedef std::insert_iterator< SMILES_container > SMILES_inserter; - -// typedef std::vector< std::string > SMILES_container; -// typedef std::back_insert_iterator< SMILES_container > SMILES_inserter; - -// typedef std::list< std::string > SMILES_container; -// typedef std::front_insert_iterator< SMILES_container > SMILES_inserter; - - SMILES_container smilesStorage; - - SMILES_inserter insert(smilesStorage,smilesStorage.begin()); // for insert_iterator -// SMILES_inserter insert(smilesStorage); // for front_* or back_insert_iterator - - std::cout <<"\n create GS_SMILES(INSERTER) gs"< gs(insert); - - for (size_t i=0; i call SMILESparser::parse(..) "< result - = ggl::chem::SMILESparser::parseSMILES(SMILES.at(i)); - if (result.second == -1) { - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(result.first); - print(toPrint); - std::cout < adding graph to gs"< adding graph to gs"< SMILES Parser failed !!!\n" - << "stoped at: \"" << SMILES.at(i)[result.second] << "\"" <<"\n" - << "\"" << SMILES.at(i) << "\"" <<"\n" - << std::setw(1+result.second) << " " << "^ error" - <<"\n" - << std::endl; - } - } - - std::cout <<" ==> content of SMILES storage :" <& SMILES) { - - typedef std::set< std::string > SMILES_container; - typedef std::insert_iterator< SMILES_container > SMILES_inserter; - -// typedef std::vector< std::string > SMILES_container; -// typedef std::back_insert_iterator< SMILES_container > SMILES_inserter; - -// typedef std::list< std::string > SMILES_container; -// typedef std::front_insert_iterator< SMILES_container > SMILES_inserter; - - SMILES_container smilesStorage; - - SMILES_inserter insert(smilesStorage,smilesStorage.begin()); // for insert_iterator -// SMILES_inserter insert(smilesStorage); // for front_* or back_insert_iterator - - std::cout <<"\n create GS_SMILES(INSERTER) gs"< gs(insert); - - // the graph to fill - ggl::chem::Molecule toFill; - - for (size_t i=0; i<1 && i ret = - ggl::chem::SMILESparser::parseSMILES( SMILES.at(i) ); - - // check if parsing was successful - if (ret.second < 0) { - - // make copy for further processing - ggl::chem::MoleculeUtil::copy( ret.first, toFill ); - - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(toFill); - print(toPrint); - } - else { - // give parsing error output - std::cout << " ==> SMILES Parser failed !!!\n" - << "stopped at: \"" << ret.second << "\"" <<"\n" - << "\"" << SMILES.at(i) << "\"" <<"\n" - << std::endl; - } - } - - boost::property_map::type MV_Property_Map_t = boost::get(ggl::PropNodeLabel(), toFill); - boost::property_map::type ME_Property_Map_t = boost::get(ggl::PropEdgeLabel(), toFill); - - ggl::chem::Molecule::vertex_descriptor c1 = boost::add_vertex(toFill); - MV_Property_Map_t[c1] = "C"; - ggl::chem::Molecule::vertex_descriptor c2 = boost::add_vertex(toFill); - MV_Property_Map_t[c2] = "C"; - ggl::chem::Molecule::vertex_descriptor o1 = boost::add_vertex(toFill); - MV_Property_Map_t[o1] = "O"; - ggl::chem::Molecule::edge_descriptor e1 = boost::add_edge(c1, c2, toFill).first; - ME_Property_Map_t[e1] = "="; - ggl::chem::Molecule::edge_descriptor e2 = boost::add_edge(c2, o1, toFill).first; - ME_Property_Map_t[e2] = "-"; - - std::cout <<"\n ==> final graph :\n" - < toPrint(toFill); - print(toPrint); - - std::cout <<"\n ==> adding graph to gs"< content of SMILES storage :" < SMILES; - - SMILES.push_back( "CC(C)C(=O)O" ); - SMILES.push_back( "n1ccccc1" ); - SMILES.push_back( "[nH]1cccc1" ); - - runSuccessiveInsert(SMILES); - runFullInsert(SMILES); - - std::cout <<"\n" - <<"=============== TEST END ===================\n" - <<"==============================================\n" - < +#include + +#include "ggl/Graph.hh" +#include + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/SMILESparser.hh" +#include "ggl/chem/GS_SMILES.hh" + +#include "dataTargetGraph_1.icc" + +#include "utilPrintGraph_Interface.icc" + +void runSuccessiveInsert( const std::vector& SMILES) { + + typedef std::set< std::string > SMILES_container; + typedef std::insert_iterator< SMILES_container > SMILES_inserter; + +// typedef std::vector< std::string > SMILES_container; +// typedef std::back_insert_iterator< SMILES_container > SMILES_inserter; + +// typedef std::list< std::string > SMILES_container; +// typedef std::front_insert_iterator< SMILES_container > SMILES_inserter; + + SMILES_container smilesStorage; + + SMILES_inserter insert(smilesStorage,smilesStorage.begin()); // for insert_iterator +// SMILES_inserter insert(smilesStorage); // for front_* or back_insert_iterator + + std::cout <<"\n create GS_SMILES(INSERTER) gs"< gs(insert); + + for (size_t i=0; i call SMILESparser::parse(..) "< result + = ggl::chem::SMILESparser::parseSMILES(SMILES.at(i)); + if (result.second == -1) { + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(result.first); + print(toPrint); + std::cout < adding graph to gs"< adding graph to gs"< SMILES Parser failed !!!\n" + << "stoped at: \"" << SMILES.at(i)[result.second] << "\"" <<"\n" + << "\"" << SMILES.at(i) << "\"" <<"\n" + << std::setw(1+result.second) << " " << "^ error" + <<"\n" + << std::endl; + } + } + + std::cout <<" ==> content of SMILES storage :" <& SMILES) { + + typedef std::set< std::string > SMILES_container; + typedef std::insert_iterator< SMILES_container > SMILES_inserter; + +// typedef std::vector< std::string > SMILES_container; +// typedef std::back_insert_iterator< SMILES_container > SMILES_inserter; + +// typedef std::list< std::string > SMILES_container; +// typedef std::front_insert_iterator< SMILES_container > SMILES_inserter; + + SMILES_container smilesStorage; + + SMILES_inserter insert(smilesStorage,smilesStorage.begin()); // for insert_iterator +// SMILES_inserter insert(smilesStorage); // for front_* or back_insert_iterator + + std::cout <<"\n create GS_SMILES(INSERTER) gs"< gs(insert); + + // the graph to fill + ggl::chem::Molecule toFill; + + for (size_t i=0; i<1 && i ret = + ggl::chem::SMILESparser::parseSMILES( SMILES.at(i) ); + + // check if parsing was successful + if (ret.second < 0) { + + // make copy for further processing + ggl::chem::MoleculeUtil::copy( ret.first, toFill ); + + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(toFill); + print(toPrint); + } + else { + // give parsing error output + std::cout << " ==> SMILES Parser failed !!!\n" + << "stopped at: \"" << ret.second << "\"" <<"\n" + << "\"" << SMILES.at(i) << "\"" <<"\n" + << std::endl; + } + } + + boost::property_map::type MV_Property_Map_t = boost::get(ggl::PropNodeLabel(), toFill); + boost::property_map::type ME_Property_Map_t = boost::get(ggl::PropEdgeLabel(), toFill); + + ggl::chem::Molecule::vertex_descriptor c1 = boost::add_vertex(toFill); + MV_Property_Map_t[c1] = "C"; + ggl::chem::Molecule::vertex_descriptor c2 = boost::add_vertex(toFill); + MV_Property_Map_t[c2] = "C"; + ggl::chem::Molecule::vertex_descriptor o1 = boost::add_vertex(toFill); + MV_Property_Map_t[o1] = "O"; + ggl::chem::Molecule::edge_descriptor e1 = boost::add_edge(c1, c2, toFill).first; + ME_Property_Map_t[e1] = "="; + ggl::chem::Molecule::edge_descriptor e2 = boost::add_edge(c2, o1, toFill).first; + ME_Property_Map_t[e2] = "-"; + + std::cout <<"\n ==> final graph :\n" + < toPrint(toFill); + print(toPrint); + + std::cout <<"\n ==> adding graph to gs"< content of SMILES storage :" < SMILES; + + SMILES.push_back( "CC(C)C(=O)O" ); + SMILES.push_back( "n1ccccc1" ); + SMILES.push_back( "[nH]1cccc1" ); + + runSuccessiveInsert(SMILES); + runFullInsert(SMILES); + + std::cout <<"\n" + <<"=============== TEST END ===================\n" + <<"==============================================\n" + < - -#include "ggl/Rule_GMLparser.hh" -#include "ggl/GS_stream.hh" - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/SMILESparser.hh" -#include "ggl/chem/SMILESwriter.hh" -#include "ggl/chem/ChemRule.hh" -#include "ggl/chem/MR_Reactions.hh" - -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/Graph_boost.hh" -#include "sgm/Graph_boostV_p.hh" - -#include "dataChemRule_1.icc" -#include "utilPrintRule.icc" - -using namespace ggl; -using namespace ggl::chem; - -void performTest( const std::vector & inputSMILES - , const ggl::chem::ChemRule& r - , const bool addEachComponent - , const ggl::chem::ReactionRateCalculation* rateCalc ) { - - //////////////////////////////////////////////////////////////////////////// - - // create data structures needed for call - Smiles2GraphMap knownSmiles2graph; - std::vector mVec; - Smiles2GraphMap newSmiles2graph; - MR_Reactions::Reaction_Container newReactions; - - std::cout <<"\n=========== CREATE MOLECULE INPUT =============\n" <::const_iterator it=inputSMILES.begin(); it!=inputSMILES.end(); it++) { - // parse SMILES to graph - std::pair result - = ggl::chem::SMILESparser::parseSMILES(*it); - // check parsing result - if (result.second != -1) { - std::cout <<"parsing error in SMILES string '" - <<*it - <<"' at position " < targets(mVec); - - print(targets); - - - std::cout <<"\n================= MATCHING ======================\n" < ret = ggl::Rule_GMLparser::parseRule( ruleDielsAlderGML ); - - std::cout <<" result of rule GML parsing : " < inputSMILES; - inputSMILES.push_back( "C=CO" ); - inputSMILES.push_back( "C=CC(=C)C" ); - inputSMILES.push_back( "O=C1C=CC(=O)O1" ); - inputSMILES.push_back( "C1=CCCC=C1" ); - inputSMILES.push_back( "C1=CC=C1" ); - - std::cout <<"\n input SMILES :" <::const_iterator it=inputSMILES.begin(); it!=inputSMILES.end(); it++) - std::cout <<*it < + +#include "ggl/Rule_GMLparser.hh" +#include "ggl/GS_stream.hh" + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/SMILESparser.hh" +#include "ggl/chem/SMILESwriter.hh" +#include "ggl/chem/ChemRule.hh" +#include "ggl/chem/MR_Reactions.hh" + +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/Graph_boost.hh" +#include "sgm/Graph_boostV_p.hh" + +#include "dataChemRule_1.icc" +#include "utilPrintRule.icc" + +using namespace ggl; +using namespace ggl::chem; + +void performTest( const std::vector & inputSMILES + , const ggl::chem::ChemRule& r + , const bool addEachComponent + , const ggl::chem::ReactionRateCalculation* rateCalc ) { + + //////////////////////////////////////////////////////////////////////////// + + // create data structures needed for call + Smiles2GraphMap knownSmiles2graph; + std::vector mVec; + Smiles2GraphMap newSmiles2graph; + MR_Reactions::Reaction_Container newReactions; + + std::cout <<"\n=========== CREATE MOLECULE INPUT =============\n" <::const_iterator it=inputSMILES.begin(); it!=inputSMILES.end(); it++) { + // parse SMILES to graph + std::pair result + = ggl::chem::SMILESparser::parseSMILES(*it); + // check parsing result + if (result.second != -1) { + std::cout <<"parsing error in SMILES string '" + <<*it + <<"' at position " < targets(mVec); + + print(targets); + + + std::cout <<"\n================= MATCHING ======================\n" < ret = ggl::Rule_GMLparser::parseRule( ruleDielsAlderGML ); + + std::cout <<" result of rule GML parsing : " < inputSMILES; + inputSMILES.push_back( "C=CO" ); + inputSMILES.push_back( "C=CC(=C)C" ); + inputSMILES.push_back( "O=C1C=CC(=O)O1" ); + inputSMILES.push_back( "C1=CCCC=C1" ); + inputSMILES.push_back( "C1=CC=C1" ); + + std::cout <<"\n input SMILES :" <::const_iterator it=inputSMILES.begin(); it!=inputSMILES.end(); it++) + std::cout <<*it < -#include - -#include "ggl/chem/MoleculeComponent.hh" -#include "ggl/chem/MoleculeComponent_GML_grammar.hh" - -#include "sgm/Graph_boost.hh" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace chem; - -const std::string gml[] = { -" molcomp [\n" -" description \" '-Cl' (attached to a primary carbon with no other chlorine atoms attached)\"\n" -" priority 4\n" -" energy -11.7\n" -" node [ id 0 label \"*\" ]\n" -" node [ id 1 label \"Cl\" ]\n" -" edge [ source 0 target 1 label \"-\" ]\n" -" compIDs [ id 1 ]\n" -" constrainAdj [\n" -" id 0\n" -" op =\n" -" count 1\n" -" nodeLabels [ label \"Cl\" ]\n" -" ]\n" -" constrainAdj [\n" -" id 0\n" -" op =\n" -" count 2\n" -" nodeLabels [ label \"H\" ]\n" -" ]\n" -" constrainNode [\n" -" id 0\n" -" op =\n" -" nodeLabels [ label \"C\" label \"c\" ]\n" -" ]\n" -" ]" - , -" molcomp [\n" -" description \" '-S-' (participating in a ring)\"\n" -" priority 2\n" -" energy 0.72\n" -" node [ id 0 label \"*\" ]\n" -" node [ id 1 label \"S\" ]\n" -" node [ id 2 label \"*\" ]\n" -" edge [ source 0 target 1 label \"-\" ]\n" -" edge [ source 1 target 2 label \"-\" ]\n" -" compIDs [ id 1 ]\n" -" ringFragment [ id 0 id 1 id 2 type nonaromatic ]\n" -" ]" - , - "" // marks the end of the array -}; - - - -void print( const MoleculeComponent & m ) { - std::cout - <<" + description = '" <constrainedNodeID <<" "; - switch(tmp->op) { - case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; - case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; - case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; - default: std::cout <op; break; - } - std::cout <<" " <count <<" NL={ "; - for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->nodeLabels.begin(); it != tmp->nodeLabels.end(); it++) { - std::cout <<(*it) <<" "; - } - std::cout <<"} EL={"; - for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->edgeLabels.begin(); it != tmp->edgeLabels.end(); it++) { - std::cout <<(*it) <<" "; - } - std::cout <<"}\n"; - } - if (dynamic_cast(m.constraints[i]) != NULL) { - sgm::MC_NodeLabel* tmp = dynamic_cast(m.constraints[i]); - std::cout <<" - cNod " - <constrainedNodeID <<" "; - std::cout <<" NL={ "; - for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->nodeLabels.begin(); it != tmp->nodeLabels.end(); it++) { - std::cout <<(*it) <<" "; - } - std::cout <<"}\n"; - } - } - std::cout - <<" + rings = " <fragment.begin(); n!=r->fragment.end(); n++) { - std::cout <<*n <<" "; - } - switch( r->type ) { - case MoleculeComponent::RF_aromaticHydrocarbon : std::cout <<" = aromatic hydrocarbon"; break; - case MoleculeComponent::RF_heteroaromatic : std::cout <<" = heteroaromatic"; break; - case MoleculeComponent::RF_nonaromatic : std::cout <<" = non-aromatic"; break; - case MoleculeComponent::RF_undefined : std::cout <<" = type undefined"; break; - } - std::cout <MoleculeComponent_GML_grammar::parse( GML )" < ret = MoleculeComponent_GML_grammar::parseGML(gml[i]); - - if (ret.second < 0 ) - { - - std::cout <<"\n result MoleculeComponent : " < +#include + +#include "ggl/chem/MoleculeComponent.hh" +#include "ggl/chem/MoleculeComponent_GML_grammar.hh" + +#include "sgm/Graph_boost.hh" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace chem; + +const std::string gml[] = { +" molcomp [\n" +" description \" '-Cl' (attached to a primary carbon with no other chlorine atoms attached)\"\n" +" priority 4\n" +" energy -11.7\n" +" node [ id 0 label \"*\" ]\n" +" node [ id 1 label \"Cl\" ]\n" +" edge [ source 0 target 1 label \"-\" ]\n" +" compIDs [ id 1 ]\n" +" constrainAdj [\n" +" id 0\n" +" op =\n" +" count 1\n" +" nodeLabels [ label \"Cl\" ]\n" +" ]\n" +" constrainAdj [\n" +" id 0\n" +" op =\n" +" count 2\n" +" nodeLabels [ label \"H\" ]\n" +" ]\n" +" constrainNode [\n" +" id 0\n" +" op =\n" +" nodeLabels [ label \"C\" label \"c\" ]\n" +" ]\n" +" ]" + , +" molcomp [\n" +" description \" '-S-' (participating in a ring)\"\n" +" priority 2\n" +" energy 0.72\n" +" node [ id 0 label \"*\" ]\n" +" node [ id 1 label \"S\" ]\n" +" node [ id 2 label \"*\" ]\n" +" edge [ source 0 target 1 label \"-\" ]\n" +" edge [ source 1 target 2 label \"-\" ]\n" +" compIDs [ id 1 ]\n" +" ringFragment [ id 0 id 1 id 2 type nonaromatic ]\n" +" ]" + , + "" // marks the end of the array +}; + + + +void print( const MoleculeComponent & m ) { + std::cout + <<" + description = '" <constrainedNodeID <<" "; + switch(tmp->op) { + case sgm::MC_NodeAdjacency::MC_EQ : std::cout <<"="; break; + case sgm::MC_NodeAdjacency::MC_L : std::cout <<"<"; break; + case sgm::MC_NodeAdjacency::MC_G : std::cout <<">"; break; + default: std::cout <op; break; + } + std::cout <<" " <count <<" NL={ "; + for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->nodeLabels.begin(); it != tmp->nodeLabels.end(); it++) { + std::cout <<(*it) <<" "; + } + std::cout <<"} EL={"; + for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->edgeLabels.begin(); it != tmp->edgeLabels.end(); it++) { + std::cout <<(*it) <<" "; + } + std::cout <<"}\n"; + } + if (dynamic_cast(m.constraints[i]) != NULL) { + sgm::MC_NodeLabel* tmp = dynamic_cast(m.constraints[i]); + std::cout <<" - cNod " + <constrainedNodeID <<" "; + std::cout <<" NL={ "; + for (sgm::MC_NodeAdjacency::LabelSet::const_iterator it= tmp->nodeLabels.begin(); it != tmp->nodeLabels.end(); it++) { + std::cout <<(*it) <<" "; + } + std::cout <<"}\n"; + } + } + std::cout + <<" + rings = " <fragment.begin(); n!=r->fragment.end(); n++) { + std::cout <<*n <<" "; + } + switch( r->type ) { + case MoleculeComponent::RF_aromaticHydrocarbon : std::cout <<" = aromatic hydrocarbon"; break; + case MoleculeComponent::RF_heteroaromatic : std::cout <<" = heteroaromatic"; break; + case MoleculeComponent::RF_nonaromatic : std::cout <<" = non-aromatic"; break; + case MoleculeComponent::RF_undefined : std::cout <<" = type undefined"; break; + } + std::cout <MoleculeComponent_GML_grammar::parse( GML )" < ret = MoleculeComponent_GML_grammar::parseGML(gml[i]); + + if (ret.second < 0 ) + { + + std::cout <<"\n result MoleculeComponent : " < -#include - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/MoleculeDecomposition.hh" -#include "ggl/chem/SMILESparser.hh" - -#include "sgm/Graph_boost.hh" -#include "sgm/GM_vf2.hh" -#include "sgm/SGM_vf2.hh" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace ggl::chem; - -// SMILES REFERENCE : http://metacyc.org/ - -const std::string SMILES[] = { - -// "ENERGY","SMILES", // "ENTRY","NAMES","GROUP_DECOMPOSITION" - "-480.93","OP([O-])(=O)OP([O-])([O-])=O", // 8,"diphosphate|pyrophosphate|ppi|","pyrophosphate : 1" - "-18.97","[H]N([H])[H]", // 9,"ammonia|nh4|","NH4 : 1" - "-18.97","[NH4+]", // 9,"ammonia(aq)|nh4|","NH4 : 1" - "-112.69","CC(=O)C([O-])=O", // 15,"pyruvate|pyr|",">C=O : 1 | -COO : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" - "-188.9","[O-]C(=O)CCC(=O)C([O-])=O", // 17,"alpha-ketoglutarate|akg|",">C=O : 1 | -CH2- : 2 | -COO : 2 | Origin : 1 | OCCO : 1" - "-32.05","[H]OO[H]", // 18,"hydrogen peroxide|","H2O2 : 1" - "-190.52","OC(=O)CC(=O)C([O-])=O", // 20,"oxaloacetate|oaa|",">C=O : 1 | -CH2- : 1 | -COO : 2 | Origin : 1 | OCCO : 1" - "-87.73","[N+]CC([O-])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" - "-87.73","[NH3+]CC([O-1])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" - "-162.96","[O-]C(=O)CCC([O-])=O", // 23,"succinate|succ|","-COO : 2 | -CH2- : 2 | Origin : 1" - "-111.04","[H]C(=O)C([O-])=O", // 26,"glyoxylate|glx|","-COO : 1 | -CH=O : 1 | Origin : 1 | OCCO : 1" - "-83.9","[H]C([O-])=O", // 32,"formate|for|","formate : 1" - "-177.97","[O-]S([O-])(=O)=O", // 33,"sulfate|so4|","sulfate : 1" - "-31.2","[H]C([H])=O", // 38,"formaldehyde|fald|","formaldehyde : 1" - "-316.08","[O-]P([O-])(=O)OC(=C)C([O-])=O", // 40,"phosphoenolpyruvate|pep|","-OPO3 : 1 | =C< : 1 | -COO : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" - "-33.4","[H]C(C)=O", // 48,"acetaldehyde|acald|","acetaldehyde : 1" - "-48.7","NC(N)=O", // 50,"urea|","urea : 1" - "-86.11","[N+]CCC([O-])=O", // 54,"beta-alanine|","-CH2- : 2 | -COO : 1 | -NH3 : 1 | Origin : 1" - "-61.07","O=C1NC=CC(=O)N1", // 58,"uracil|","ring >C=O : 2 | ring =CH- : 2 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 1" - "-111.07","CCC(=O)C([O-])=O", // 59,"2-oxobutanoate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" - "12.19","C[N+](C)(C)CCO", // 61,"choline|","-CH2- : 2 | >N< : 1 | -CH3 : 3 | -OH : 1 | Origin : 1" - "-116.18","OCC(O)CO", // 62,"glycerol|glyc|",">CH- : 1 | -CH2- : 2 | -OH : 3 | Origin : 1" - "-84.87","CC(C)CC([N+])C([O-])=O", // 66,"leucine|leu|",">CH- : 2 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -CH3 : 2 | Origin : 1" - "-439.84","CC(=C)CCOP([O-1])(=O)OP([O-])([O-1])=O", // 68,"isopentenyl-diphosphate|","-OPO2- : 1 | -OPO3 : 1 | -CH2- : 2 | =C< : 1 | -CH3 : 1 | =CH2 : 1 | Origin : 1" - "-634.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)O1", // 70,"dATP","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 2 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" - "-41.9","CO", // 71,"methanol|","methanol : 1" - "-87.92","CC([N+])C([O-])=O", // 72,"alanine|ala|",">CH- : 1 | -COO : 1 | -CH3 : 1 | -NH3 : 1 | Origin : 1" - "-9.9","Oc1ccccc1", // 76,"phenol|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -OH : 1 | Origin : 1" - "78.85","Nc1ncnc2[nH]cnc12", // 77,"adenine|","two fused rings >C= : 2 | ring =C< : 1 | ring =N- : 3 | ring -NH- : 1 | -NH2 : 1 | ring =CH- : 2 | Origin : 1 | heteroaromatic : 2" - "5.55","NC(=O)c1cccnc1", // 80,"nicotinamide|","ring =C< : 1 | ring =CH- : 4 | >C=O : 1 | ring =N- : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" - "-280.44","OC(CC([O-])=O)(CC([O-])=O)C([O-])=O", // 83,"citrate|cit|",">C< : 1 | -CH2- : 2 | -COO : 3 | -OH : 1 | Origin : 1" - "-122.98","OCC([O-])=O", // 84,"glycolate|glyclt|","-COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1" - "-85.13","CCC([O-])=O", // 85,"propanoate|ppa|","-COO : 1 | -CH2- : 1 | -CH3 : 1 | Origin : 1" - "-75.82","[O-]C(=O)C(=O)Cc1ccccc1", // 86,"keto-phenylpyruvate|phenylpyruvate|","aromatic ring =C< : 1 | -CH2- : 1 | aromatic ring =CH- : 5 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1" - "-148.92","OCC(=O)C([O-])=O", // 87,"3-hydroxypyruvate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1 | OCCO : 1" - "-108.16","OCC(=O)CO", // 90,"dihydroxyacetone|dha|glycerone",">C=O : 1 | -CH2- : 2 | -OH : 2 | Origin : 1" - "-38.9","NO", // 92,"hydroxylamine|","hydroxylamine : 1" - "-38.52","CC(C)=O", // 95,"acetone|","acetone : 1" - "-111.88","[H]C(=O)CC([O-])=O", // 98,"3-oxopropanoate|","-CH2- : 1 | -COO : 1 | -CH=O : 1 | Origin : 1" - "-301.65","CC(=O)OP([O-])([O-])=O", // 99,"acetyl-phosphate|acetyl-p|","-CO-OPO3- : 1 | -CH3 : 1 | Origin : 1" - "-110.26","[O-]C(=O)CCC=O", // 100,"4-oxobutanoate|","-CH2- : 2 | -COO : 1 | -CH=O : 1 | Origin : 1" - "-439.18","CC(C)=CCOP([O-])(=O)OP([O-])([O-])=O", // 102,"dimethylallyl-diphosphate|","-OPO2- : 1 | -OPO3 : 1 | -CH2- : 1 | =CH- : 1 | =C< : 1 | -CH3 : 2 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "28.4","Nc1nc2[nH]cnc2c(=O)[nH]1", // 105,"guanine|","two fused rings >C= : 2 | ring =N- : 2 | ring -NH- : 2 | ring >C=O : 1 | ring =C< : 1 | ring =CH- : 1 | -NH2 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-21.54","NC(=O)CCCCC1CCSS1", // 106,"lipoamide|","ring -CH< : 1 | ring -CH2- : 2 | ring -S- : 2 | -CH2- : 4 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" - "-64.07","CCCCCCCCCCCCCCCC([O-])=O", // 107,"palmitate|","-CH2- : 14 | -COO : 1 | -CH3 : 1 | Origin : 1" - "-123.17","CC(O)C([O-])=O", // 109,"lactate|lac-L|",">CH- : 1 | -COO : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" - "-0.35","[H]C(=O)c1ccccc1", // 112,"benzaldehyde|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -CH=O : 1 | Origin : 1 | OCCC : 1" - -// only 1 heteroaromatic ring by jankowski -// "23.12","O=c1[nH]cnc2nc[nH]c12", // 113,"hypoxanthine|Hypoxanthine|hypoxanthine(0,4)|hypoxanthine|hxan|","two fused rings >C= : 2 | ring >C=O : 1 | ring =N- : 2 | ring -NH- : 2 | ring =CH- : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-70.28","[H]C(=O)CO", // 115,"glycolaldehyde|","-CH2- : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" - "-142.48","C([O-])(=O)C1(=CC(=O)NC(N1)=O)", // 122,"orotate|","ring =C< : 1 | ring =CH- : 1 | -COO : 1 | ring >C=O : 2 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 2" - "-65.59","CN(CC([O-])=O)C(N)=[N+]", // 125,"creatine|Creatine|creatine(0,9)|creatine|","-N< : 1 | -CH2- : 1 | =C< : 1 | -CH3 : 1 | -COO : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" - "-279.02","OC(C(CC([O-])=O)C([O-])=O)C([O-])=O", // 127,"isocitrate|icit|",">CH- : 2 | -CH2- : 1 | -COO : 3 | -OH : 1 | Origin : 1" - "-49.77","[O-]C(=O)C(=O)Cc1c[nH]c2ccccc12", // 130,"indole-3-pyruvate|","aromatic ring fused to nonaromatic ring >C= : 2 | ring =C< : 1 | aromatic ring =CH- : 4 | -CH2- : 1 | ring =CH- : 1 | ring -NH- : 1 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1 | heteroaromatic : 1" - "-112.07","CC(C=O)C([O-])=O", // 137,"2-methyl-3-oxopropanoate|",">CH- : 1 | -COO : 1 | -CH=O : 1 | -CH3 : 1 | Origin : 1" - "-257.01","[N+]CCOP([O-])([O-])=O", // 145,"O-phosphorylethanolamine|","-OPO3 : 1 | -CH2- : 2 | -NH3 : 1 | Origin : 1" - "-90.93","C12(NC(=O)NC=1C(=O)NC(=O)N2)", // 146,"urate|CHEBI:17775","two fused rings >C= : 2 | ring >C=O : 3 | amide : 4 | ring -NH- : 4 | Origin : 1 | OCCC : 1" - "-14.2","O=C1CCCCC1", // 150,"cyclohexanone|","ring >C=O : 1 | ring -CH2- : 5 | Origin : 1" - "-32.27","[O-]C(=O)C=Cc1ccccc1", // 152,"trans-cinnamate|","aromatic ring =C< : 1 | =CH- : 2 | aromatic ring =CH- : 5 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" - "70.9","CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CCO", // 160,"retinol|","ring =C< : 2 | ring >C< : 1 | =CH- : 6 | ring -CH2- : 3 | -CH3 : 5 | =C< : 2 | -CH2- : 1 | -OH : 1 | Origin : 1 | CCCC : 4" - "-121.41","COc1cc(cc(OC)c1O)C=CC([O-])=O", // 163,"sinapate|","aromatic ring =C< : 4 | aromatic ring =CH- : 2 | -O- : 2 | -OH : 1 | -CH3 : 2 | =CH- : 2 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" - "-65.83","C[N+](C)(C)CC(O)CC([O-])=O", // 164,"carnitine|","-CH2- : 2 | >N< : 1 | >CH- : 1 | -CH3 : 3 | -OH : 1 | -COO : 1 | Origin : 1" - "-166.94","NC(=O)NC(NC(N)=O)C([O-])=O", // 168,"allantoate|",">CH- : 1 | -COO : 1 | >C=O : 2 | amide : 4 | -NH- : 2 | -NH2 : 2 | Origin : 1" - "-85.66","[N+]CCCC([N+])C([O-])=O", // 171,"ornithine|orn|",">CH- : 1 | -COO : 1 | -CH2- : 3 | -NH3 : 2 | Origin : 1" - "-59.99","[H]C(=O)C(C)=O", // 173,"methylglyoxal|",">C=O : 1 | -CH=O : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" - "-8.28","OCc1ccccc1", // 176,"benzyl-alcohol|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -CH2- : 1 | -OH : 1 | Origin : 1" - "-106.7","[H]C(=O)C(O)CO", // 180,"glyceraldehyde|glyald|",">CH- : 1 | -CH2- : 1 | -CH=O : 1 | -OH : 2 | Origin : 1" - "-27.35","NC(=O)CCCCC(S)CCS", // 181,"dihydrolipoamide|","-CH2- : 6 | >CH- : 1 | -SH : 2 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" - "1.47","CSC", // 182,"dimethyl sulfide|","-S- : 1 | -CH3 : 2 | Origin : 1" - "-75.84","NC(=[N+])NCC([O-])=O", // 183,"guanidinoacetic acid|","-COO : 1 | -CH2- : 1 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" - "-200.31","C[N+](C)(C)CCOP([O-])([O-])=O", // 186,"choline phosphate|","-CH2- : 2 | >N< : 1 | -CH3 : 3 | -OPO3 : 1 | Origin : 1" - "-51.81","COc1cc(C=CCO)ccc1O", // 187,"coniferol|","aromatic ring =C< : 3 | -OH : 2 | aromatic ring =CH- : 3 | -O- : 1 | =CH- : 2 | -CH3 : 1 | -CH2- : 1 | Origin : 1 | CCCC : 1" - "-114.09","CC(=O)NCCCC([O-])=O", // 193,"N-acetyl-L-alpha-amino-n-butyrate|CHEBI:17645","-CH2- : 3 | -COO : 1 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-63.98","[O-]C(=O)CCCCC1SSCC1", // 200,"alpha-lipoate|","ring -CH< : 1 | ring -CH2- : 2 | ring -S- : 2 | -CH2- : 4 | -COO : 1 | Origin : 1" - "-124.15","[N+]C(CO)C([O-])=O", // 201,"serine|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" - "-26.85","[H]C(=C([H])c1c[nH]cn1)C([O-])=O", // 202,"urocanate|","ring =C< : 1 | =CH- : 2 | ring =CH- : 2 | ring =N- : 1 | ring -NH- : 1 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1 | heteroaromatic : 1" - "-72.12","CC(O)C(C)=O", // 204,"acetoin|",">CH- : 1 | >C=O : 1 | -CH3 : 2 | -OH : 1 | Origin : 1" - -// wrong SMILES -// "-34.72","CC(O)C(=O)C1(CNC2(=NC(N)=NC(=O)[C-]2(N=1)))", // 206,"sepiapterin|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | >C=O : 1 | >CH- : 1 | -CH3 : 1 | -OH : 1 | amide : 1 | Origin : 1 | OCCC : 1 | OCCN : 1 | CCNC : 2" - - "-20.76","OC1CCCCC1", // 208,"cyclohexanol|","ring -CH< : 1 | ring -CH2- : 5 | -OH : 1 | Origin : 1" - "-145.2","CC(C([O-])=O)=C(C)C([O-])=O", // 216,"dimethylmaleate|","-COO : 2 | =C< : 2 | -CH3 : 2 | Origin : 1 | OCCC : 2" - "-70.47","[H]C(=O)C(C)O", // 217,"lactaldehyde|",">CH- : 1 | -CH=O : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" - "-119.74","OCCCC([O-])=O", // 223,"4-hydroxybutyrate|","-CH2- : 3 | -COO : 1 | -OH : 1 | Origin : 1" - "-121.36","[O-]C(=O)CCO", // 224,"3-hydroxypropanoate|b-Hydroxypropionate|hydroxypropionate(-1,5)|hydroxypropionate|b-hydroxypropionate|","-CH2- : 2 | -COO : 1 | -OH : 1 | Origin : 1" - "-115.71","CC(=O)NCCC([O-])=O", // 226,"N-acetyl-L-alanine|CHEBI:16682","-COO : 1 | -CH2- : 2 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-199.38","OC(CCC([O-])=O)C([O-])=O", // 228,"2-hydroxyglutarate|",">CH- : 1 | -CH2- : 2 | -COO : 2 | -OH : 1 | Origin : 1" - "-226.94","OC(CC(=O)C([O-])=O)C([O-])=O", // 237,"4-hydroxy-2-oxoglutarate|",">CH- : 1 | -COO : 2 | -CH2- : 1 | -OH : 1 | >C=O : 1 | Origin : 1 | OCCO : 1" - "-149.92","[O-]C(C=O)C([O-])=O", // 240,"2-hydroxy-3-oxopropanoate|",">CH- : 1 | -COO : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" - "-115.3","[O-]C(=O)C(=O)Cc1ccc(O)cc1", // 241,"4-hydroxyphenylpyruvate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -OH : 1 | Origin : 1 | OCCO : 1" - "-121.55","CC(CO)C([O-])=O", // 243,"3-hydroxy-2-methylpropanoate|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" - "-79.76","OCCO", // 251,"ethylene-glycol|","-CH2- : 2 | -OH : 2 | Origin : 1" - "-143.7","[O-]C(=O)C=CC([O-])=O", // 252,"maleate|fumarate|fum|","-COO : 2 | =CH- : 2 | Origin : 1 | OCCC : 2" - "-30.81","[H]C(=O)CCC", // 253,"butanal|butyraldehyde|","-CH2- : 2 | -CH=O : 1 | -CH3 : 1 | Origin : 1" - "-16.11","CCCCCC=CCC=CCCCCCCCC([O-])=O", // 256,"9-cis,12-cis-octadecadienoate|","-CH2- : 12 | =CH- : 4 | -COO : 1 | -CH3 : 1 | Origin : 1" - "22.2","N#C[S-]", // 265,"thiocyanate|","#C- : 1 | #N : 1 | -Sneg : 1 | Origin : 1" - "-43.72","CC(C)O", // 269,"isopropanol|",">CH- : 1 | -CH3 : 2 | -OH : 1 | Origin : 1" - "-114.87","NC(=[N+])NCCS([O-])(=O)=O", // 272,"taurocyamine|","-SO3 : 1 | -CH2- : 2 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" - "-144.58","OCC(O)C(=O)CO", // 274,"erythrulose|",">CH- : 1 | >C=O : 1 | -CH2- : 2 | -OH : 3 | Origin : 1" - "78.83","CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CC=O", // 275,"11-cis-retinal|all-trans-retinal|","ring =C< : 2 | ring >C< : 1 | =CH- : 6 | ring -CH2- : 3 | -CH3 : 5 | =C< : 2 | -CH=O : 1 | Origin : 1 | OCCC : 1 | CCCC : 4" - "-125.76","CC([N+])(CO)C([O-])=O", // 276,"2-methylserine|",">C< : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" - "-113.53","CC(=O)CC([O-])=O", // 277,"3-oxobutanoate|acetoacetate|acac|b-ketobutyrate|","-CH2- : 1 | -COO : 1 | -CH3 : 1 | >C=O : 1 | Origin : 1" - "-69.79","[O-]C(=O)CCCCC(S)CCS", // 278,"dihydro-alpha-lipoate|","-CH2- : 6 | >CH- : 1 | -SH : 2 | -COO : 1 | Origin : 1" - "-143.75","CC(C([O-])=O)C(=C)C([O-])=O", // 282,"methylitaconate|",">CH- : 1 | =C< : 1 | -COO : 2 | -CH3 : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" - "-302.57","[H]C(=O)OP(O)(O)=O", // 284,"formyl-phosphate|","formylphosphate : 1" - "3.35","CC(=O)n1ccnc1", // 289,"N-acetylimidazole|",">C=O : 1 | ring =CH- : 3 | -CH3 : 1 | ring =N- : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | heteroaromatic : 1" - "-57.81","C[N+](C)(C)CC(=O)CC([O-])=O", // 296,"3-dehydrocarnitine|",">N< : 1 | -CH2- : 2 | -CH3 : 3 | >C=O : 1 | -COO : 1 | Origin : 1" - "-43.88","COc1cc(C=CC=O)ccc1O", // 299,"coniferyl-aldehyde|","aromatic ring =C< : 3 | -OH : 1 | aromatic ring =CH- : 3 | -O- : 1 | =CH- : 2 | -CH3 : 1 | -CH=O : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" - "-80.78","[O-]C(=O)CNC=[N+]", // 303,"N-formiminoglycine|","-CH2- : 1 | -COO : 1 | -NH- : 1 | =CH- : 1 | =NH2 : 1 | Origin : 1" - "-70.87","OC(=Cc1ccccc1)C([O-])=O", // 304,"enol-phenylpyruvate|","aromatic ring =C< : 1 | =CH- : 1 | aromatic ring =CH- : 5 | =C< : 1 | -COO : 1 | -OH : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" - "-101.66","CCC(=O)OC(CC([O-])=O)C[N+](C)(C)C", // 310,"propionylcarnitine|",">CH- : 1 | -O-CO- : 1 | -CH2- : 3 | >N< : 1 | -COO : 1 | -CH3 : 4 | Origin : 1" - "-39.83","C(=O)c1cccc(O)c1", // 314,"3-hydroxybenzaldehyde|","aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH=O : 1 | -OH : 1 | Origin : 1 | OCCC : 1" - "-272.38","[O-]C(=O)CNC(=[N+])NP([O-])([O-])=O", // 318,"phosphoguanidinoacetate|","-OPO2 : 1 | -NH- : 2 | =C< : 1 | =NH2 : 1 | -CH2- : 1 | -COO : 1 | Origin : 1" - "-118.57","O=C1NC(=O)C2NC(=O)C(=O)NC=2N1", // 319,"tetrahydroxypteridine|","two fused rings >C= : 2 | ring >C=O : 4 | amide : 4 | ring -NH- : 4 | Origin : 1 | OCCO : 1 | OCCC : 1" - "-157.39","CC([N+]C(C)C([O-])=O)C([O-])=O", // 320,"2,2'-iminodipropanoate|",">CH- : 2 | -COO : 2 | -NH2- : 1 | -CH3 : 2 | Origin : 1" - -// only one heteroaromatic ring by jankowski ... most probably wrong SMILES -// "-110.61","[O-]C(=O)c1nc2[nH]c(=O)[nH]c(=O)c2[nH]1", // 322,"xanthine-8-carboxylate|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 2 | ring =N- : 1 | ring =C< : 1 | -COO : 1 | amide : 2 | Origin : 1 | OCCC : 1 | OCCN : 1 | heteroaromatic : 1" - - "-47.76","OCc1cccc(O)c1", // 323,"3-hydroxybenzyl-alcohol|","aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 1 | -OH : 2 | Origin : 1" - "-86.31","[O-]C(=O)CCC1NC=NC1=O", // 339,"4,5-dihydro-4-oxo-5-imidazolepropanoate|","ring -CH< : 1 | ring >C=O : 1 | ring -NH- : 1 | -CH2- : 2 | ring =N- : 1 | ring =CH- : 1 | -COO : 1 | Origin : 1 | OCNC : 1" - "-127.36","[O-]C(=O)CNC(=O)OCc1ccccc1", // 341,"benzyloxycarbonylglycine|","aromatic ring =C< : 1 | -CH2- : 2 | aromatic ring =CH- : 5 | -O-CO- : 1 | -COO : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-65.26","C[S+](C)CCC([O-])=O", // 348,"dimethylpropiothetin|","-COO : 1 | -CH2- : 2 | -S< : 1 | -CH3 : 2 | Origin : 1" - "-20.93","CCCCCCC=CC=CCCCCCCCC([O-])=O", // 350,"9-cis,11-trans-octadecadienoate|","-CH2- : 12 | =CH- : 4 | -COO : 1 | -CH3 : 1 | Origin : 1 | CCCC : 1" - "-132.27","[O-]C(=O)CC1OC(=O)C=C1", // 352,"2,5-dihydro-5-oxofuran-2-acetate|","ring -CH< : 1 | ring -O-CO- : 1 | ring =CH- : 2 | -CH2- : 1 | -COO : 1 | Origin : 1 | OCCC : 1" - "-7.11","Cc1ncsc1CCO", // 359,"4-methyl-5-2'-hydroxyethyl-thiazole|","ring =C< : 2 | -CH2- : 2 | ring -S- : 1 | ring =N- : 1 | -CH3 : 1 | ring =CH- : 1 | -OH : 1 | Origin : 1 | heteroaromatic : 1" - "-187.28","[O-]C(=O)CCCC(=O)C([O-])=O", // 381,"2-oxoadipate|","-CH2- : 3 | >C=O : 1 | -COO : 2 | Origin : 1 | OCCO : 1" - "-65.96","Oc1ccc(cc1)C=CC(=O)c1ccc(O)cc1O", // 395,"2',4,4'-trihydroxychalcone|","aromatic ring =C< : 5 | >C=O : 1 | aromatic ring =CH- : 7 | =CH- : 2 | -OH : 3 | Origin : 1 | OCCC : 2 | CCCC : 1" - "-140.26","OC([O-])=O", // 399,"hco3|bicarbonate|","HCO3 : 1" - "-32.43","CCC=O", // 400,"propanal|","-CH3 : 1 | -CH2- : 1 | -CH=O : 1 | Origin : 1" - "-146.69","[O-]C(=O)C1=NC(=O)NC(=O)N1", // 406,"oxonic-acid|","ring >C=O : 2 | ring =C< : 1 | -COO : 1 | ring =N- : 1 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCN : 1 | OCNC : 1" - "33.64","Nc1ccccc1", // 412,"aniline|","aromatic ring =CH- : 5 | aromatic ring =C< : 1 | -NH2 : 1 | Origin : 1" - "-25.26","CC(=O)OCC[N+](C)(C)C", // 413,"acetylcholine|","-CH3 : 4 | >N< : 1 | -CH2- : 2 | -O-CO- : 1 | Origin : 1" - "-41.91","CCCO", // 449,"n-propanol|","-CH3 : 1 | -CH2- : 2 | -OH : 1 | Origin : 1" - "-311.41","OP([O-])(=O)NC(=[N+])NCCS([O-])(=O)=O", // 452,"phosphotaurocyamine|","-OPO2 : 1 | -NH- : 2 | =C< : 1 | =NH2 : 1 | -CH2- : 2 | -SO3 : 1 | Origin : 1" - "-45.29","[N+]CC(N)=O", // 459,"glycinamide|","-NH3 : 1 | -CH2- : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" - "-84.04","[N+]CCCCC([N+])C([O-])=O", // 465,"lysine|","-COO : 1 | -CH2- : 4 | >CH- : 1 | -NH3 : 2 | Origin : 1" - "-80.46","[O-]C(=O)CNC(=O)Cc1ccccc1", // 471,"phenylacetylglycine|","-COO : 1 | -CH2- : 2 | >C=O : 1 | aromatic ring =C< : 1 | aromatic ring =CH- : 5 | amide : 1 | -NH- : 1 | Origin : 1" - "-320.66","OCC(=O)COP([O-])([O-])=O", // 476,"glycerone-phosphate|","-OH : 1 | -CH2- : 2 | >C=O : 1 | -OPO3 : 1 | Origin : 1" - "-78.65","CCCCCCC([O-])=O", // 490,"heptanoate|","-CH3 : 1 | -CH2- : 5 | -COO : 1 | Origin : 1" - "-23.3","[O-]C#N", // 523,"cyanate|","#C- : 1 | #N : 1 | -Oneg : 1 | Origin : 1" - "-161","OC(=O)C([O-])=O", // 524,"oxalate|","oxalate : 1" - "-4.07","CC", // 525,"ethane|","ethane : 1" - "-88.29","CC([O-])=O", // 526,"acetate|ac|","acetate : 1" - "-43.44","CCO", // 527,"ethanol|etoh|","ethanol : 1" - "-83.51","CCCC([O-])=O", // 530,"butyrate|but|","-CH2- : 2 | -COO : 1 | -CH3 : 1 | Origin : 1" - "-81.89","CCCCC([O-])=O", // 531,"valerate|","-CH2- : 3 | -COO : 1 | -CH3 : 1 | Origin : 1" - "-64.98","[O-]C(=O)C=C", // 532,"acrylate|","-COO : 1 | =CH- : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" - "-62.7","C(C)=CC([O-])=O", // 533,"crotonate|","-CH3 : 1 | =CH- : 2 | -COO : 1 | Origin : 1 | OCCC : 1" - "-83.39","[N+]C(CS)C([O-])=O", // 536,"cysteine|cys-L|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | -SH : 1 | Origin : 1" - "-159.61","[N+]C(CSSCC([N+])C([O-])=O)C([O-])=O", // 537,"cystine|",">CH- : 2 | -CH2- : 2 | -COO : 2 | -NH3 : 2 | -S-S- : 1 | Origin : 1" - "-6.19","CN1CC(=O)NC1=N", // 539,"creatinine|","ring >C= : 1 | ring -N< : 1 | =NH : 1 | ring -CH2- : 1 | -CH3 : 1 | ring >C=O : 1 | amide : 1 | ring -NH- : 1 | Origin : 1" - "-9.55","CN", // 541,"methylamine|","methylamine : 1" - "-1.35","[N+](C)C", // 542,"dimethylamine|","-CH3 : 2 | -NH2- : 1 | Origin : 1" - "4.55","C[N+](C)C", // 543,"trimethylamine|","-CH3 : 3 | -NH< : 1 | Origin : 1" - "44.52","c1ccncc1", // 544,"pyridine|","ring =CH- : 5 | ring =N- : 1 | Origin : 1 | heteroaromatic : 1" - "-201","OC(CC([O-])=O)C([O-])=O", // 545,"malate|mal-L|",">CH- : 1 | -CH2- : 1 | -COO : 2 | -OH : 1 | Origin : 1" - "-319.2","[H]C(=O)C(O)COP([O-])([O-])=O", // 548,"glyceraldehyde-3-phosphate|g3p|","-OPO3 : 1 | -CH2- : 1 | >CH- : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" - "-118.31","[N+]CC(=O)NCC([O-])=O", // 549,"glycylglycine|",">C=O : 1 | -CH2- : 2 | -NH3 : 1 | -COO : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-268.54","[O-]C(=O)CC(C([O-])=O)C(=O)C([O-])=O", // 551,"oxalosuccinate|",">CH- : 1 | >C=O : 1 | -CH2- : 1 | -COO : 3 | Origin : 1 | OCCO : 1" - "-8.21","C", // 556,"ch4|methane|","methane : 1" - "33.26","c1ccccc1", // 561,"benzene|","aromatic ring =CH- : 6 | Origin : 1 | Hydrocarbon : 1" - -// proton filling not needed and not working here.. :/ -// "-1.1","[Fe+3]", // 567,"fe3|Fe3+|","Fe3 : 1" - - "-83.7","CC(C)CC([O-])=O", // 570,"isovalerate|","-CH2- : 1 | >CH- : 1 | -COO : 1 | -CH3 : 2 | Origin : 1" - "30.6","NN", // 575,"n2h4|","N2H4 : 1" - "-122.7","OS(S)(=O)=O", // 577,"s2o3|tsul|","S2O3H : 1" - "-143.5","OS(=O)S(O)=O", // 578,"s2o4|","S2O4 : 1" - "-229","OS(=O)(=O)SS(O)(=O)=O", // 579,"s3o6|","S3O6 : 1" - "-241.82","[O-]S(=O)(=O)SSS([O-])(=O)=O", // 580,"s4o6|","-SO3 : 2 | -S-S- : 1 | Origin : 1" - "27.62","C1CC1", // 583,"cyclopropane|","ring -CH2- : 3 | Origin : 1 | Hydrocarbon : 1 | threemember : 1" - "206.47","CC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCC1=CC(=O)c2ccccc2C1=O", // 589,"2dmmq8|2-Demethylmenaquinone-8|","aromatic ring fused to nonaromatic ring >C= : 2 | ring >C=O : 2 | aromatic ring =CH- : 4 | ring =C< : 1 | ring =CH- : 1 | -CH2- : 15 | =CH- : 8 | =C< : 8 | -CH3 : 9 | Origin : 1 | OCCC : 4" - "-12.6","[H]C([H])([H])Cl", // 594,"chloromethane|","chloromethane : 1" - "-15.8","[H]C([H])(Cl)Cl", // 595,"dichloromethane|","dichloromethane : 1" - "-15.9","[H]C(Cl)(Cl)Cl", // 596,"trichloromethane|","trichloromethane : 1" - "-10.8","ClC(Cl)(Cl)Cl", // 597,"tetrachloromethane|","tetrachloromethane : 1" - "-13.73","CCCl", // 598,"chloroethane|","-CH3 : 1 | -CH2- : 1 | primary -Cl : 1 | Origin : 1" - "-18.24","ClCCCl", // 599,"1,2-dichloroethane|","-CH2- : 2 | primary -Cl : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "-20.16","ClCC(Cl)Cl", // 601,"1,1,2-trichloroethane|","primary Cl2 : 2 | >CH- : 1 | primary -Cl : 1 | -CH2- : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "-20.16","ClC(Cl)C(Cl)Cl", // 602,"1,1,2,2-tetrachloroethane|","primary Cl2 : 4 | >CH- : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 2" - "-13.18","CC(Cl)(Cl)Cl", // 603,"1,1,1-trichloroethane|","primary Cl3 : 3 | -CH3 : 1 | >C< : 1 | Origin : 1" - "-17.69","ClCC(Cl)(Cl)Cl", // 604,"1,1,1,2-tetrachloroethane|","primary Cl3 : 3 | >C< : 1 | -CH2- : 1 | primary -Cl : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "-13.3","ClC(Cl)(Cl)C(Cl)(Cl)Cl", // 606,"hexachloroethane|","primary Cl3 : 6 | >C< : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 3" - "-2","CCC", // 607,"propane|","-CH3 : 2 | -CH2- : 1 | Origin : 1 | Hydrocarbon : 1" - "-0.38","CCCC", // 612,"butane|","-CH3 : 2 | -CH2- : 2 | Origin : 1 | Hydrocarbon : 1" - "1.24","CCCCC", // 615,"pentane|","-CH2- : 3 | -CH3 : 2 | Origin : 1 | Hydrocarbon : 1" - "8.21","ClC(Cl)=C", // 621,"1,1-dichloroethylene|","secondary Cl2 : 2 | =CH2 : 1 | =C< : 1 | Origin : 1" - "6.52","ClC(Cl)=C(Cl)Cl", // 623,"tetrachloroethylene|","secondary Cl2 : 4 | =C< : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 2" - "24.22","Clc1ccccc1", // 624,"monochlorobenzene|","aromatic ring =CH- : 5 | aromatic ring =C< : 1 | tertiary -Cl : 1 | Origin : 1" - "20.78","Clc1ccccc1Cl", // 625,"1,2-dichlorobenzene|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | tertiary -Cl : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "18.86","Clc1cccc(Cl)c1", // 626,"1,3-dichlorobenzene|","aromatic ring =C< : 2 | tertiary -Cl : 2 | aromatic ring =CH- : 4 | Origin : 1" - "18.86","Clc1ccc(Cl)cc1", // 627,"1,4-dichlorobenzene|","aromatic ring =C< : 2 | tertiary -Cl : 2 | aromatic ring =CH- : 4 | Origin : 1" - "17.34","Clc1cccc(Cl)c1Cl", // 628,"1,2,3-trichlorobenzene|","aromatic ring =CH- : 3 | aromatic ring =C< : 3 | tertiary -Cl : 3 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" - "15.42","Clc1ccc(Cl)c(Cl)c1", // 629,"1,2,4-trichlorobenzene|","aromatic ring =C< : 3 | tertiary -Cl : 3 | aromatic ring =CH- : 3 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "13.5","Clc1cc(Cl)cc(Cl)c1", // 630,"1,3,5-trichlorobenzene|","aromatic ring =C< : 3 | tertiary -Cl : 3 | aromatic ring =CH- : 3 | Origin : 1" - "13.9","Clc1ccc(Cl)c(Cl)c1Cl", // 631,"1,2,3,4-tetrachlorobenzene|","aromatic ring =CH- : 2 | aromatic ring =C< : 4 | tertiary -Cl : 4 | Origin : 1 | BinaryVicinalCl : 3 | DistinctVicinalCl : 3" - "11.98","Clc1cc(Cl)c(Cl)c(Cl)c1", // 632,"1,2,3,5-tetrachlorobenzene|","aromatic ring =C< : 4 | tertiary -Cl : 4 | aromatic ring =CH- : 2 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" - "11.98","Clc1cc(Cl)c(Cl)cc1Cl", // 633,"1,2,4,5-tetrachlorobenzene|","aromatic ring =C< : 4 | tertiary -Cl : 4 | aromatic ring =CH- : 2 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" - "10.46","Clc1cc(Cl)c(Cl)c(Cl)c1Cl", // 634,"pentachlorobenzene|","aromatic ring =CH- : 1 | aromatic ring =C< : 5 | tertiary -Cl : 5 | Origin : 1 | BinaryVicinalCl : 4 | DistinctVicinalCl : 4" - "8.94","Clc1c(Cl)c(Cl)c(Cl)c(Cl)c1Cl", // 635,"hexachlorobenzene|","aromatic ring =C< : 6 | tertiary -Cl : 6 | Origin : 1 | BinaryVicinalCl : 6 | DistinctVicinalCl : 6" - "-58.41","[O-]C(=O)c1ccccc1Cl", // 636,"2-chlorobenzoate|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -COO : 1 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" - "-58.41","[O-]C(=O)c1cccc(Cl)c1", // 637,"3-chlorobenzoate|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -COO : 1 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" - "-58.41","[O-]C(=O)c1ccc(Cl)cc1", // 638,"4-chlorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" - "-63.77","[O-]C(=O)c1ccc(Cl)cc1Cl", // 640,"2,4-dichlorobenzoate|","aromatic ring =C< : 3 | -COO : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1" - "-63.77","[O-]C(=O)c1c(Cl)cccc1Cl", // 642,"2,6-dichlorobenzoate|","aromatic ring =C< : 3 | -COO : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1" - "-61.85","[O-]C(=O)c1c([H])c([H])c(Cl)c(Cl)c1[H]", // 643,"3,4-dichlorobenzoate|","aromatic ring =CH- : 3 | aromatic ring =C< : 3 | -COO : 1 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "-94.03","[O-]C(=O)c1ccccc1F", // 650,"2-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" - "-94.03","[O-]C(=O)c1cccc(F)c1", // 651,"3-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" - "-94.03","[O-]C(=O)c1ccc(F)cc1", // 652,"4-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" - "-34.43","[O-]C(=O)c1ccccc1I", // 653,"2-iodobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -I : 1 | Origin : 1 | OCCC : 1" - "-15.26","Oc1ccccc1Cl", // 659,"2-chlorophenol|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -OH : 1 | tertiary -Cl : 1 | Origin : 1" - "-15.26","Oc1cccc(Cl)c1", // 660,"3-chlorophenol|","aromatic ring =C< : 2 | -OH : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1" - "-15.26","Oc1ccc(Cl)cc1", // 661,"4-chlorophenol|","aromatic ring =C< : 2 | -OH : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1" - "-20.62","Oc1ccc(Cl)cc1Cl", // 663,"2,4-dichlorophenol|","aromatic ring =C< : 3 | -OH : 1 | tertiary -Cl : 2 | aromatic ring =CH- : 3 | Origin : 1" - "-20.62","Oc1cc(Cl)ccc1Cl", // 664,"2,5-dichlorophenol|","aromatic ring =C< : 3 | -OH : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1" - "-11.92","[O-]c1c(Cl)cccc1Cl", // 665,"2,6-dichlorophenol|","aromatic ring =C< : 3 | tertiary -Cl : 2 | aromatic ring =CH- : 3 | -Oneg : 1 | Origin : 1" - "-24.06","Oc1cc(Cl)c(Cl)cc1Cl", // 669,"2,4,5-trichlorophenol|","aromatic ring =C< : 4 | -OH : 1 | aromatic ring =CH- : 2 | tertiary -Cl : 3 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - "-17.28","[O-]c1c(Cl)cc(Cl)cc1Cl", // 670,"2,4,6-trichlorophenol|","aromatic ring =C< : 4 | tertiary -Cl : 3 | aromatic ring =CH- : 2 | -Oneg : 1 | Origin : 1" - "-18.8","[O-]c1c(Cl)c(Cl)cc(Cl)c1Cl", // 676,"2,3,5,6-tetrachlorophenol|","aromatic ring =C< : 5 | tertiary -Cl : 4 | aromatic ring =CH- : 1 | -Oneg : 1 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" - "-20.32","[O-]c1c(Cl)c(Cl)c(Cl)c(Cl)c1Cl", // 677,"pentachlorophenol|","aromatic ring =C< : 6 | tertiary -Cl : 5 | -Oneg : 1 | Origin : 1 | BinaryVicinalCl : 4 | DistinctVicinalCl : 4" - "-121.26","SCCS([O-])(=O)=O", // 678,"CoM|coenzyme-M|","-SO3 : 1 | -CH2- : 2 | -SH : 1 | Origin : 1" - "-115.39","CSCCS([O-])(=O)=O", // 679,"methyl-CoM|methyl-coenzyme-M|","-SO3 : 1 | -CH2- : 2 | -S- : 1 | -CH3 : 1 | Origin : 1" - - "-529.59","NC(=O)c1ccc[n+](c1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 1,"NAD(+)|nad+|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 8 | ring =CH- : 6 | ring =N- : 3 | ring -O- : 2 | ring =C< : 2 | -OH : 4 | -NH2 : 2 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | dbl sgl ring =N< : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 3" - "-524.32","NC(=O)C1=CN(C=CC1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 2,"NADH|nadh|","ring -N< : 2 | two fused rings >C= : 2 | ring -CH< : 8 | ring =CH- : 5 | ring =N- : 3 | ring -O- : 2 | ring =C< : 2 | -OH : 4 | -NH2 : 2 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH2- : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2 | NADH : 1" - "-736.82","NC(=O)C1=CN(C=CC1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(OP([O-])([O-])=O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 3,"NADPH|","ring -CH< : 8 | ring -N< : 2 | ring -O- : 2 | two fused rings >C= : 2 | ring =CH- : 5 | -OPO3 : 1 | ring =N- : 3 | -OH : 3 | -CH2- : 2 | ring =C< : 2 | -OPO3- : 1 | -NH2 : 2 | -OPO2- : 1 | ring -CH2- : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2 | NADH : 1" - "-742.09","NC(=O)c1ccc[n+](c1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(OP([O-])([O-])=O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 4,"NADP(+)|","ring -CH< : 8 | ring -N< : 1 | ring -O- : 2 | two fused rings >C= : 2 | ring =CH- : 6 | -OPO3 : 1 | ring =N- : 3 | -OH : 3 | -CH2- : 2 | ring =C< : 2 | -OPO3- : 1 | -NH2 : 2 | -OPO2- : 1 | dbl sgl ring =N< : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 3" - "-751.99","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n2cnc3c(N)ncnc23)C(O)C(=O)NCCC(=O)NCCS", // 7,"Coenzyme A|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -SH : 1 | amide : 2 | -NH- : 2 | Origin : 1 | heteroaromatic : 2 | COA : 1" - "-605.77","C(OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(=O)NC2(=O)))", // 10,"UDP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - -// only 2 heteroaromatic rings by jankowski -// "-538.18","Cc1cc2Nc3c([nH]c(=O)[nH]c3=O)N(CC(O)C(O)C(O)COP([O-])(=O)OP([O-])(=O)OCC3OC(C(O)C3O)n3cnc4c(N)ncnc34)c2cc1C", // 11,"FADH2|","ring -N< : 2 | two fused rings >C= : 4 | aromatic ring fused to nonaromatic ring >C= : 2 | -CH2- : 3 | aromatic ring =CH- : 2 | >CH- : 3 | ring -NH- : 3 | ring >C=O : 2 | aromatic ring =C< : 2 | -OH : 5 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH< : 4 | ring -O- : 1 | ring =CH- : 2 | ring =N- : 3 | ring =C< : 1 | -NH2 : 1 | amide : 2 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" - - "-257.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])([O-])=O)C(O)C1O", // 13,"AMP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" - "-76.11","[N+]C(CCSCC1OC(C(O)C1O)n1cnc2c(N)ncnc12)C([O-])=O", // 14,"S-adenosyl-L-homocysteine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 3 | -S- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 2" - "-785.83","CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 16,"acetyl-CoA|accoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - -// only 1 heteroaromatic ring by jankowski -// no OCCC match -> double bond in larger heteroring? - "-516.3","N1=C(N)NC(=O)c2ncn(C3OC(COP([O-])(=O)OP([O-])([O-])=O)C(O)C3O)c21", // 19,"GDP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-756.9","C(C1(C(C(C(O1)N2(C=CC(NC2=O)=O))O)O))OP(OP(OC3(C(C(C(C(O3)CO)O)O)NC(C)=O))([O-])=O)([O-])=O", // 24,"UDP-N-acetyl-D-glucosamine|","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 2 | ring =CH- : 2 | -OH : 5 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | >C=O : 1 | -CH3 : 1 | amide : 3 | ring -N< : 1 | ring -NH- : 1 | -NH- : 1 | Origin : 1 | OCCC : 1" - -// only 1 heteroaromatic ring by jankowski -// "-724.3","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 25,"GTP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-165.75","[NH3+]C(CC([O-])=O)C([O-])=O", // 27,"L-aspartate|asp-L|",">CH- : 1 | -CH2- : 1 | -COO : 2 | -NH3 : 1 | Origin : 1" - "-220.95","[N+]C(CCC(=O)NC(CS)C(=O)NCC([O-])=O)C([O-])=O", // 28,"reduced-glutathione|",">CH- : 2 | >C=O : 2 | -CH2- : 4 | -SH : 1 | -COO : 2 | -NH3 : 1 | amide : 2 | -NH- : 2 | Origin : 1" - "-762.55","C2(C(O)C(O)C(COP(=O)([O-])OP(=O)(OC1(OC(CO)C(O)C(O)C1(O)))[O-])O2)N3(C=CC(=O)NC3(=O))", // 29,"UDPgalactose|UDPglucose|","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 2 | ring =CH- : 2 | -OH : 6 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-345.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP([O-])([O-])=O", // 31,"CMP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO3 : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-346.33","C12(N(CC(O)C(O)C(O)COP([O-])(=O)[O-])c3(c(NC=2(C(=O)NC(=O)N1))cc(C)c(C)c3))", // 34,"FMNH2|fmnred|","ring -N< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | two fused rings >C= : 2 | -CH2- : 2 | aromatic ring =CH- : 2 | >CH- : 3 | ring -NH- : 3 | aromatic ring =C< : 2 | ring >C=O : 2 | -OH : 3 | -CH3 : 2 | -OPO3 : 1 | amide : 2 | Origin : 1 | OCCC : 1" - "-73.77","[N+]C(CCCNC(N)=[N+])C([O-])=O", // 35,"L-arginine|arg|","-CH2- : 3 | >CH- : 1 | -COO : 1 | -NH3 : 1 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" - "-761.38","C(OP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(N)=NC2(=O)))", // 36,"CTP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO2- : 2 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-121.69","[N+]C(CCC(N)=O)C([O-])=O", // 37,"L-glutamine|gln-L|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" - "-75.91","CSCCC([N+])C([O-])=O", // 39,"L-methionine|met-L|",">CH- : 1 | -COO : 1 | -CH2- : 2 | -NH3 : 1 | -S- : 1 | -CH3 : 1 | Origin : 1" - "-813.77","C(OP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(=O)NC2(=O)))", // 41,"UTP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-25","[N+]C(Cc1c[nH]c2ccccc12)C([O-])=O", // 42,"L-tryptophan|trp-L|","aromatic ring fused to nonaromatic ring >C= : 2 | ring =C< : 1 | aromatic ring =CH- : 4 | -CH2- : 1 | ring =CH- : 1 | ring -NH- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 1" - "-51.05","[N+]C(Cc1ccccc1)C([O-])=O", // 43,"L-phenylalanine|phe-L|","aromatic ring =C< : 1 | -CH2- : 1 | aromatic ring =CH- : 5 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-729.58","OC1C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 45,"ITP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-90.53","[N+]C(Cc1ccc(O)cc1)C([O-])=O", // 46,"L-tyrosine|tyr-L|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -OH : 1 | Origin : 1" - "-863.66","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)CC([O-])=O", // 47,"malonyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-431.67","C(OP(=O)([O-])[O-])C1(OC(O)(CO)C(O)C1(O))", // 49,"D-fructose 6-phosphate|","ring -CH< : 3 | ring -O- : 1 | -CH2- : 2 | ring >C< : 1 | -OH : 4 | -OPO3 : 1 | Origin : 1" - "-377.65","OCC1OC(OC2(CO)OC(CO)C(O)C2O)C(O)C(O)C1O", // 51,"sucrose|sucr|","ring >C< : 1 | -O- : 1 | ring -O- : 2 | ring -CH< : 8 | -CH2- : 3 | -OH : 8 | Origin : 1" - "-862.04","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)CCC([O-])=O", // 52,"succinyl-CoA|succoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 8 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - -// only 1 heteroaromatic ring by jankowski -// "-521.58","OC1C(COP([O-])(=O)OP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 56,"IDP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-397.77","C(OP([O-])([O-])=O)C1OC(N2C=CC(=O)NC2(=O))C(O)C1(O)", // 57,"UMP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-553.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP([O-])([O-])=O)([O-])=O", // 60,"CDP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO2- : 1 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-394.12","C(OP([O-])(=O)[O-])C1(C(O)C(O)C(O)O1)", // 63,"D-ribose 5-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 4 | ring -O- : 1 | -OH : 3 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-313.58","OC1C(COP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 69,"IMP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-634.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)O1", // 70,"dATP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 2 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" - "-45.63","[N+]C(Cc1c[nH]cn1)C([O-])=O", // 73,"L-histidine|","ring =C< : 1 | -CH2- : 1 | ring =CH- : 2 | ring =N- : 1 | >CH- : 1 | ring -NH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 1" - "-219.96","OC1C(O)C(O)C(O)C(O)C1O", // 74,"myo-inositol|","ring -CH< : 6 | -OH : 6 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-308.3","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])([O-])=O)C(O)C1O", // 75,"GMP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 4 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | -NH2 : 1 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-62.54","[O-]C(=O)C1CCCN1", // 78,"S-proline|","ring -CH< : 1 | -COO : 1 | ring -CH2- : 3 | ring -NH- : 1 | Origin : 1" - "-123.31","[N+]C(CC(N)=O)C([O-])=O", // 79,"L-asparagine|asn-L|",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" - "-763.15","CCCCCCCCCCCCCCCC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 81,"palmitoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 20 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-81.77","[N+]C(CCS)C([O-])=O", // 82,"L-homocysteine|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | -SH : 1 | Origin : 1" - "-86.49","CC(C)C([N+])C([O-])=O", // 89,"L-valine|val-L|",">CH- : 2 | -COO : 1 | -NH3 : 1 | -CH3 : 2 | Origin : 1" - "-124.34","CC(O)C([N+])C([O-])=O", // 91,"L-threonine|thr-L|",">CH- : 2 | -COO : 1 | -NH3 : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" - "-216.02","OCC1OC(=O)C(O)C(O)C1O", // 93,"D-glucono-1,5-lactone|","ring -CH< : 4 | ring -O-CO- : 1 | -CH2- : 1 | -OH : 4 | Origin : 1" - "-426.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])([O-])=O)O1", // 94,"dADP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" - "-45.35","Nc1ncnc2n(cnc12)C1OC(CO)C(O)C1O", // 96,"adenosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 3 | -NH2 : 1 | -CH2- : 1 | Origin : 1 | heteroaromatic : 2" - "-164.13","[NH3+]C(CCC([O-])=O)C([O-])=O", // 97,"D-glutamate|glu-L|",">CH- : 1 | -CH2- : 2 | -COO : 2 | -NH3 : 1 | Origin : 1" - -// wrong SMILES -> no -COO group by jankowski -// "-586.8","OC(=O)C(COP([O-])([O-])=O)OP([O-])([O-])=O", // 103,"2,3-bisphospho-D-glyceric acid|1,3-bpg|","-CO-OPO3- : 1 | >CH- : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | Origin : 1" - - "-305.54","C(C2(C(CC(N1(C(N=C(C=C1)N)=O))O2)O))OP([O-])([O-])=O", // 104,"dCMP|","ring -CH< : 3 | ring >C=O : 1 | ring =CH- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring =N- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-169.49","OC1C=CC(=CC1OC(=C)C([O-])=O)C([O-])=O", // 108,"chorismate|","ring -CH< : 2 | ring =CH- : 3 | -O- : 1 | ring =C< : 1 | -OH : 1 | =C< : 1 | -COO : 2 | =CH2 : 1 | Origin : 1 | OCCC : 2 | CCCC : 1" - "-268.66","OCC(O)C(O)C(O)C(O)C([O-])=O", // 110,"D-gluconate|glcn|",">CH- : 4 | -OH : 5 | -COO : 1 | -CH2- : 1 | Origin : 1" - "-122.53","[N+]C(CCO)C([O-])=O", // 114,"L-homoserine|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" - "-326.4","[H]C1(OC(O)(CC(O)C1NC(C)=O)C([O-])=O)C(O)C(O)CO", // 116,"N-acetylneuraminate|","ring -CH< : 3 | ring -O- : 1 | >CH- : 2 | ring >C< : 1 | -OH : 5 | ring -CH2- : 1 | >C=O : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-209.4","OCC(=O)C(O)C(O)C(=O)CO", // 117,"5-dehydro-D-fructose|",">CH- : 2 | >C=O : 2 | -OH : 4 | -CH2- : 2 | Origin : 1" - "-355.62","[H]C(=O)C(O)C(O)COP([O-])([O-])=O", // 118,"D-erythrose-4-phosphate|","-OPO3 : 1 | -CH2- : 1 | >CH- : 2 | -OH : 2 | -CH=O : 1 | Origin : 1" - "-18.43","[H]C12CCC3=CC(=O)CCC3(C)C1([H])CCC1(C)C(=O)CCC21[H]", // 119,"4-androstene-3,17-dione|","two fused rings >CH- : 3 | ring -CH2- : 8 | two fused rings >C< : 2 | two fused rings >C= : 1 | -CH3 : 2 | ring >C=O : 2 | ring =CH- : 1 | Origin : 1 | OCCC : 1" - -// only 1 heteroaromatic ring by jankowski -// "-101.08","OCC1OC(C(O)C1O)n1cnc2c(O)ncnc12", // 121,"inosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 3 | -CH2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-185.27","OCC1OC(C(O)C1O)N2C=CC(=O)NC2=O", // 124,"uridine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 3 | -CH2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-479.69","C(OP([O-])(=O)OP(OCC[N+](C)(C)C)([O-])=O)C1(OC(C(O)C1(O))N2(C=CC(=NC2=O)N))", // 126,"CDP-choline|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 3 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | >N< : 1 | -CH3 : 3 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-862.82","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)C([O-])=O", // 128,"oxalyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCO : 1 | heteroaromatic : 2" - "-123.87","[N+]C(CCCNC(N)=O)C([O-])=O", // 129,"L-citrulline|citr-L|","-CH2- : 3 | >CH- : 1 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" - "-812.61","CC(=O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 131,"acetoacetyl-CoA|aacoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 4 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-261.5","OC1OC(C(O)C(O)C1O)C([O-])=O", // 132,"α-D-galacturonate|CHEBI:58658","ring -CH< : 5 | ring -O- : 1 | -COO : 1 | -OH : 4 | Origin : 1" - "-151.52","[O-]C(=O)C1CC(=O)NC(=O)N1", // 133,"S-dihydroorotate|","ring -CH< : 1 | ring -CH2- : 1 | -COO : 1 | ring >C=O : 2 | amide : 2 | ring -NH- : 2 | Origin : 1" - "-481.16","OC(COP([O-])([O-])=O)C(O)C(O)C(O)C([O-])=O", // 136,"6-phospho-D-gluconate|","-OPO3 : 1 | -CH2- : 1 | >CH- : 4 | -OH : 4 | -COO : 1 | Origin : 1" - "-395.53","C(OP(=O)([O-])[O-])C1(OC(O)C([N+])C(O)C1(O))", // 138,"D-glucosamine-6-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -NH3 : 1 | Origin : 1" - "-644.17","C(C1(C(C(C(O1)(COP([O-])([O-])=O)O)O)O))OP([O-])([O-])=O", // 139,"D-fructose-1,6-bisphosphate|","ring >C< : 1 | ring -O- : 1 | ring -CH< : 3 | -CH2- : 2 | -OH : 3 | -OPO3 : 2 | Origin : 1" - "-376.76","OCC1OC(OC2C(O)C(O)OC(CO)C2O)C(O)C(O)C1O", // 140,"laminaribiose|beta-laminaribiose|","ring -CH< : 10 | -O- : 1 | -OH : 8 | ring -O- : 2 | -CH2- : 2 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-476.46","Nc1nc2n(cnc2c(=O)[nH]1)C1CC(O)C(COP([O-])(=O)OP([O-])([O-])=O)O1", // 141,"dGDP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 3 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | ring -CH2- : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" -// "-268.46","Nc1nc2n(cnc2c(=O)[nH]1)C1CC(O)C(COP([O-])([O-])=O)O1", // 142,"dGMP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 3 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | ring -CH2- : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-566.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])OP(=O)([O-])[O-])O2))", // 143,"dTDP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-358.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])[O-])O2))", // 144,"dTMP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - -// only 1 heteroaromatic ring by jankowski -// "-95.8","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(CO)C(O)C1O", // 149,"guanosine|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 4 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | -NH2 : 1 | -OH : 3 | -CH2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-115.26","CC(=O)NC(CCC[N+])C([O-])=O", // 153,"N2-acetyl-L-ornithine|CHEBI:16543",">CH- : 1 | -COO : 1 | -CH2- : 3 | >C=O : 1 | -CH3 : 1 | -NH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-203.96","NC(=O)NC(CC([O-])=O)C([O-])=O", // 154,"N-carbamoyl-L-aspartate|",">CH- : 1 | -CH2- : 1 | -COO : 2 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" - "-157.18","[H]C(=[N+])NC(CCC(O)=O)C([O-])=O", // 155,"N-formimino-L-glutamate|",">CH- : 1 | -CH2- : 2 | -NH- : 1 | -COO : 2 | =CH- : 1 | =NH2 : 1 | Origin : 1" - "-113.05","[H]C(=O)CC([N+])C([O-])=O", // 156,"L-aspartate-4-semialdehyde|",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -CH=O : 1 | Origin : 1" - "-337.74","NC(=O)c1ccc[n+](c1)C1OC(COP(O)([O-])=O)C(O)C1O", // 157,"beta-nicotinamide-mononucleotide|CHEBI:16171","ring -CH< : 4 | dbl sgl ring =N< : 1 | ring -O- : 1 | ring =CH- : 4 | -OH : 2 | ring =C< : 1 | -CH2- : 1 | >C=O : 1 | -OPO3 : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" - "-774.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])O2))", // 158,"dTTP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-16.98","[H]C12CCC3(C)C(=O)CCC3([H])C1([H])CCc1cc(O)ccc21", // 159,"estrone|","two fused rings >CH- : 3 | two fused rings >C< : 1 | ring -CH2- : 6 | ring >C=O : 1 | -CH3 : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | aromatic ring =CH- : 3 | aromatic ring =C< : 1 | -OH : 1 | Origin : 1" - "-132.88","C1(N=C(C=CN1C2(C(O)C(O)C(CO)O2))N)(=O)", // 161,"cytidine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 3 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-536.13","OCC1OC(OCC2OC(OC3(CO)OC(CO)C(O)C3O)C(O)C(O)C2O)C(O)C(O)C1O", // 165,"raffinose|","ring >C< : 1 | -O- : 2 | ring -O- : 3 | ring -CH< : 13 | -CH2- : 4 | -OH : 11 | Origin : 1" - "-171.29","OC1CC(=CC(O)C1O)C([O-])=O", // 166,"shikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring -CH< : 3 | -OH : 3 | Origin : 1 | OCCC : 1" - "-622.63","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])(=O)OC2OC(CO)C(O)C(O)C2O)C(O)C1O", // 167,"ADPglucose|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 9 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 2 | ring =C< : 1 | -OH : 6 | -NH2 : 1 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | Origin : 1 | heteroaromatic : 2" - "-710.16","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP(OC3(C(C(C(C(O3)CO)O)O)O))([O-])=O)([O-])=O", // 169,"CDPglucose|CHEBI:58660","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 1 | ring =CH- : 2 | -OH : 6 | ring =N- : 1 | -CH2- : 2 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-189.02","OCC(O)C(O)C(O)CO", // 172,"arabitol|xylitol|ribitol|",">CH- : 3 | -OH : 5 | -CH2- : 2 | Origin : 1" - "-83.86","NC(C(O)=O)c1ccc(O)cc1", // 174,"D-4-hydroxyphenylglycine|","-COO : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >CH- : 1 | -NH2 : 1 | -OH : 1 | Origin : 1" - "-239.04","OC(C(O)C([O-])=O)C([O-])=O", // 175,"meso-tartrate|",">CH- : 2 | -COO : 2 | -OH : 2 | Origin : 1" - "-536.39","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP(OCC[N+])([O-])=O)([O-])=O", // 178,"CDP-ethanolamine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 3 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | -NH3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-191.87","Nc1ncnc2n(cnc12)C1OC2COP([O-])(=O)OC2C1O", // 179,"adenosine-3'5'-cyclicphosphate|CHEBI:17489","ring -N< : 1 | ring -CH< : 2 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 2 | ring =N- : 3 | two fused rings >CH- : 2 | -OH : 1 | ring =C< : 1 | ring -OPO2- : 1 | ring -CH2- : 1 | -NH2 : 1 | Origin : 1 | heteroaromatic : 2" - "-135.27","CCCCCC(O)C=CC1C(O)CC(=O)C1CCCCCCC([O-])=O", // 184,"prostaglandin E1|","ring -CH< : 3 | ring >C=O : 1 | -CH2- : 10 | =CH- : 2 | ring -CH2- : 1 | -OH : 2 | >CH- : 1 | -COO : 1 | -CH3 : 1 | Origin : 1" - "-112.91","CCCCCC(O)C=CC1C(O)CC(=O)C1CC=CCCCC([O-])=O", // 185,"prostaglandin E2|","ring -CH< : 3 | ring >C=O : 1 | -CH2- : 8 | =CH- : 4 | ring -CH2- : 1 | -OH : 2 | >CH- : 1 | -COO : 1 | -CH3 : 1 | Origin : 1" - "-371.9","OC(COP([O-])([O-])=O)C([O-])=O", // 188,"3-phospho-D-glycerate|pg3|CHEBI:17794","-OPO3 : 1 | -CH2- : 1 | >CH- : 1 | -COO : 1 | -OH : 1 | Origin : 1" - "-163.98","NC(=O)NC(O)C([O-])=O", // 189,"--ureidoglycolate|CHEBI:57296",">CH- : 1 | -COO : 1 | -OH : 1 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" - "-394.12","OCC1OC(OP([O-])([O-])=O)C(O)C1O", // 190,"D-ribose-1-phosphate|","ring -CH< : 4 | ring -O- : 1 | -OPO3 : 1 | -OH : 3 | -CH2- : 1 | Origin : 1" - "-193.73","CC(=O)NC(CCC([O-])=O)C([O-])=O", // 191,"N-acetyl-L-glutamate|",">CH- : 1 | -CH2- : 2 | -COO : 2 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-371.9","[H]C(CO)(OP([O-])([O-])=O)C([O-])=O", // 192,"2-phospho-D-glycerate|pg2|CHEBI:17835","-OPO3 : 1 | >CH- : 1 | -COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1" - "-212.63","C(O)C1(OC(O)C(NC(C)=O)C(O)C1(O))", // 194,"N-acetyl-D-mannosamine|N-acetyl-D-glucosamine|","ring -CH< : 5 | -OH : 4 | ring -O- : 1 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-643.28","C(C1(OC(C(C(C1O)O)O)OP(=O)([O-])[O-]))OP(=O)([O-])[O-]", // 195,"D-glucose 1,6-bisphosphate|","-OPO3 : 2 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -CH2- : 1 | Origin : 1" - "-354.28","OCC1OC(CC1O)OP([O-])([O-])=O", // 196,"2-deoxy-alpha-D-ribose-1-phosphate|CHEBI:11563","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | -OPO3 : 1 | -CH2- : 1 | -OH : 2 | Origin : 1" - "-354.28","C(OP([O-])(=O)[O-])C1(OC(O)CC1(O))", // 197,"2-deoxy-D-ribose-5-phosphate|CHEBI:16132","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | -OH : 2 | Origin : 1" - "-680.33","CC1(=CN(C(=O)NC1(=O))C3(CC(O)C(COP(=O)([O-])OP(=O)([O-])OC2(OC(C)C(=O)C(O)C2(O)))O3))", // 198,"dTDP-4-dehydro-6-deoxy-D-glucose|CHEBI:16128","ring -CH< : 7 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 3 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 3 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-513.54","C(C2(C(CC(N1(C(N=C(C=C1)N)=O))O2)O))OP(OP(=O)([O-])[O-])([O-])=O", // 199,"dCDP|","ring -CH< : 3 | ring >C=O : 1 | ring =CH- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring =N- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -NH2 : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-784.18","[H]C(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 203,"formyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -CH=O : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-723.12","CC1(=CN(C(=O)NC1(=O))C3(CC(O)C(COP(=O)([O-])OP(=O)([O-])OC2(OC(CO)C(O)C(O)C2(O)))O3))", // 207,"dTDPglucose|","ring -CH< : 8 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 2 | -OH : 5 | -CH3 : 1 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - "-761.78","CC=CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 209,"cis-but-2-enoyl-CoA|trans-but-2-enoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | =CH- : 2 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" - "-539.49","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCS", // 210,"3'-dephospho-CoA|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 3 | -NH2 : 1 | -CH2- : 6 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -SH : 1 | amide : 2 | -NH- : 2 | Origin : 1 | heteroaromatic : 2" - "-169.49","OC1C(OC(=C)C([O-])=O)C=CC=C1C([O-])=O", // 211,"isochorismate|","ring -CH< : 2 | -O- : 1 | ring =CH- : 3 | ring =C< : 1 | -OH : 1 | =C< : 1 | -COO : 2 | =CH2 : 1 | Origin : 1 | OCCC : 2 | CCCC : 1" - "-965.77","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSSCC(NC(=O)CCC([N+])C(O)=O)C(=O)NCC([O-])=O", // 215,"CoA-glutathione|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 10 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 3 | -CH3 : 2 | >C=O : 4 | -S-S- : 1 | -COO : 2 | -NH3 : 1 | amide : 4 | -NH- : 4 | Origin : 1 | heteroaromatic : 2" - -// no heteroaromatic ring by jankowski -// "-280.96","Nc1ccn(C2OC3COP([O-])(=O)OC3C2O)c(=O)n1", // 218,"cytidine-2'3'-cyclicphosphate|CHEBI:17065","ring -CH< : 2 | two fused rings >CH- : 2 | ring -O- : 2 | ring >C=O : 1 | ring =CH- : 2 | ring =N- : 1 | ring -OPO2- : 1 | -CH2- : 1 | ring =C< : 1 | -OH : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - - "-23.54","[H]C12CCC3(C)C(O)CCC3([H])C1([H])CCc1cc(O)ccc21", // 219,"estradiol-17beta|CHEBI:16469","two fused rings >CH- : 3 | two fused rings >C< : 1 | ring -CH2- : 6 | ring -CH< : 1 | -CH3 : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | -OH : 2 | aromatic ring =CH- : 3 | aromatic ring =C< : 1 | Origin : 1" - "-162.51","[NH3+]C(CCCC([O-])=O)C([O-])=O", // 220,"L-2-aminoadipate|","-CH2- : 3 | >CH- : 1 | -COO : 2 | -NH3 : 1 | Origin : 1" - "-161.6","CC(=O)OCC([N+])C([O-])=O", // 222,"acetyl-L-serine|CHEBI:17981",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -O-CO- : 1 | -CH3 : 1 | Origin : 1" - "-376.76","OCC1OC(OC2OC(CO)C(O)C(O)C2O)C(O)C(O)C1O", // 227,"alpha,alpha-trehalose|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -OH : 8 | -CH2- : 2 | Origin : 1" - "-431.67","C(O)C1(OC(O)(COP(=O)([O-])[O-])C(O)C1(O))", // 229,"fructose-1-phosphate|CHEBI:18105","ring >C< : 1 | ring -CH< : 3 | ring -O- : 1 | -CH2- : 2 | -OH : 4 | -OPO3 : 1 | Origin : 1" - "-437.94","OCC(O)C(O)C(O)C(O)COP([O-])([O-])=O", // 230,"sorbitol-6-phosphate|D-mannitol-1-phosphate|",">CH- : 4 | -OH : 5 | -CH2- : 2 | -OPO3 : 1 | Origin : 1" - "-394.55","CC1C(O)C(O)C(O)C(O1)OP([O-])([O-])=O", // 231,"L-fuculose-1-phosphate|CHEBI:16647","-OPO3 : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -CH3 : 1 | Origin : 1" - "-393.5","OCC(=O)C(O)C(O)COP([O-])([O-])=O", // 232,"ribulose-5-phosphate|xylulose-5-phosphate|xu5p-D|",">CH- : 2 | >C=O : 1 | -OH : 3 | -CH2- : 2 | -OPO3 : 1 | Origin : 1" - "-479.18","C1(=C(C(=O)[O-])N(C(NC1(=O))=O)C2(C(O)C(C(COP([O-])([O-])=O)O2)O))", // 233,"orotidine-5'-phosphate|CHEBI:15842","ring -CH< : 4 | ring -O- : 1 | ring =C< : 1 | ring >C=O : 2 | -OH : 2 | ring =CH- : 1 | -COO : 1 | -CH2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 2" - "-370.27","CC(O)(CCOP([O-])([O-])=O)CC([O-])=O", // 234,"5-phosphomevalonate|CHEBI:17436","-CH2- : 3 | >C< : 1 | -COO : 1 | -CH3 : 1 | -OH : 1 | -OPO3 : 1 | Origin : 1" - "-392.04","OC(COP([O-])([O-])=O)C(O)C(O)C=O", // 235,"D-arabinose-5-phosphate|",">CH- : 3 | -OH : 3 | -CH2- : 1 | -CH=O : 1 | -OPO3 : 1 | Origin : 1" - "-430.78","OC1OC(COP([O-])([O-])=O)C(O)C(O)C1O", // 236,"D-galactose-6-phosphate|D-glucose-6-phosphate|D-mannose-6-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 4 | Origin : 1" - "-393.69","CC(O)C(O)C(O)C(=O)COP([O-])([O-])=O", // 238,"L-rhamnulose-1-phosphate|","-OPO3 : 1 | -CH2- : 1 | >C=O : 1 | >CH- : 3 | -OH : 3 | -CH3 : 1 | Origin : 1" - "-85.85","CC([N+])CC([N+])CC([O-])=O", // 242,"L-erythro-3,5-diaminohexanoate|","-CH2- : 2 | >CH- : 2 | -NH3 : 2 | -CH3 : 1 | -COO : 1 | Origin : 1" - "-378.44","OCC1OC(OC2C(O)C(O)C(O)C(O)C2O)C(O)C(O)C1O", // 245,"1-alpha-D-galactosyl-myo-inositol|","ring -CH< : 11 | -O- : 1 | -OH : 9 | ring -O- : 1 | -CH2- : 1 | Origin : 1" - -// only 2 heteroaromatic rings by jankowski -// no OCCC by jankowski -// "-529.37","Cc1cc2nc3c(nc(=O)[nH]c3=O)n(CC(O)C(O)C(O)COP([O-])(=O)OP([O-])(=O)OCC3OC(C(O)C3O)n3cnc4c(N)ncnc34)c2cc1C", // 250,"flavin-adenine-dinucleotide|fad|","ring -N< : 2 | two fused rings >C= : 4 | aromatic ring fused to nonaromatic ring >C= : 2 | -CH2- : 3 | ring =N- : 5 | aromatic ring =CH- : 2 | >CH- : 3 | ring >C=O : 2 | aromatic ring =C< : 2 | -OH : 5 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH< : 4 | ring -O- : 1 | ring =CH- : 2 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCN : 1 | OCNC : 1 | NCCN : 1 | CCNC : 1 | heteroaromatic : 2" - - "-694.61","OCC1OC(OCC2OC(OCC3OC(OC4(CO)OC(CO)C(O)C4O)C(O)C(O)C3O)C(O)C(O)C2O)C(O)C(O)C1O", // 257,"stachyose|","ring >C< : 1 | -O- : 3 | ring -O- : 4 | ring -CH< : 18 | -CH2- : 5 | -OH : 14 | Origin : 1" - -// wrong SMILES -> no "ring -NH-" -// "-478.33","C1(=NC(=C2(C(=N1)N(C=N2)C3(OC(C(C3O)OP([O-])([O-])=O)COP([O-])(=O)[O-])))N)", // 259,"adenosine-3',5'-biphosphate|","dbl sgl ring =N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 2 | -OH : 1 | ring =C< : 1 | -OPO3 : 2 | -CH2- : 1 | ring -NH- : 1 | -NH2 : 1 | Origin : 1 | CCCN : 1 | CCNC : 3" - -// only 1 heteroaromatic ring by jankowski -// "-151.93","OCC1OC(C(O)C1O)n1cnc2c1[nH]c(=O)[nH]c2=O", // 266,"xanthosine|","two fused rings >C= : 2 | ring -N< : 1 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 1 | ring >C=O : 2 | ring -O- : 1 | -OH : 3 | -CH2- : 1 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" - - "-337.52","C12(N(CC(O)C(O)C(O)COP([O-])(=O)[O-])c3(c(N=C2(C(=O)NC(=O)N=1))cc(C)c(C)c3))", // 270,"FMN|fmnox|","ring -N< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | two fused rings >C= : 2 | -CH2- : 2 | aromatic ring =CH- : 2 | ring =N- : 2 | >CH- : 3 | aromatic ring =C< : 2 | ring >C=O : 2 | -OH : 3 | -CH3 : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCN : 1 | OCNC : 1 | NCCN : 1 | CCNC : 1" - "-110.12","[H]C1(CCC(=O)N1)C([O-])=O", // 280,"5-oxo-D-proline|","ring -CH< : 1 | ring -CH2- : 2 | -COO : 1 | ring >C=O : 1 | amide : 1 | ring -NH- : 1 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-673.08","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])(=O)OP([O-])(=O)OC2OC(CO)C(O)C(O)C2O)C(O)C1O", // 281,"GDPgalactose|GDPmannose|GDPglucose|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 9 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 2 | ring >C=O : 1 | ring =C< : 1 | -OH : 6 | -NH2 : 1 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - - "-863.85","CC(C(O)=O)C(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 288,"methylmalonyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-202.8","CC(C([O-])=O)C(C)(O)C([O-])=O", // 295,"R,S-2,3-dimethylmalate|2,3-dimethylmalate|",">C< : 1 | >CH- : 1 | -COO : 2 | -CH3 : 2 | -OH : 1 | Origin : 1" - "-166.28","OC1CC(=CC(=O)C1O)C([O-])=O", // 297,"3-dehydroshikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring -CH< : 2 | ring >C=O : 1 | -OH : 2 | Origin : 1 | OCCC : 2" - "-164.73","OC1C=C(CC(=O)C1O)C([O-])=O", // 298,"5-dehydroshikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring >C=O : 1 | ring -CH< : 2 | -OH : 2 | Origin : 1 | OCCC : 1" - -// wrong SMILES -> no -COO -// "-279.89","COc1cc(cc(OC)c1O)C=CC(=O)OC1OC(CO)C(O)C(O)C1O", // 306,"1-sinapoyl-D-glucose|","aromatic ring =C< : 4 | -O- : 3 | aromatic ring =CH- : 2 | ring -CH< : 5 | -CH3 : 2 | ring -O- : 1 | =CH- : 2 | -OH : 4 | -CH2- : 1 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" - -// no heteroaromatic ring by jankowski -// "-39.72","CC(O)C(O)C1=Nc2c(NC1)[nH]c(N)nc2=O", // 308,"7,8-dihydrobiopterin|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | >CH- : 2 | -OH : 2 | -CH3 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 2" - - "-380.65","[N+]C(CC(=O)OP([O-])([O-])=O)C([O-])=O", // 315,"4-phospho-L-aspartate|L-4-aspartyl-phosphate|","-CO-OPO3- : 1 | -CH2- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1" - -// is heteroaromatic ring by jankowski -// "-125.24","NC(=O)C1=CN(C=CC1)C1OC(CO)C(O)C1O", // 317,"nicotinamide-riboside|","ring -CH< : 4 | dbl sgl ring =N< : 1 | ring -O- : 1 | ring =CH- : 4 | -OH : 3 | ring =C< : 1 | -CH2- : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" - - "-215.78","[H]C1(OC(=O)C(O)C1O)C(O)CO", // 324,"D-galactono-1,4-lactone|","ring -CH< : 3 | ring -O-CO- : 1 | >CH- : 1 | -OH : 4 | -CH2- : 1 | Origin : 1" - "-291.21","CC(O)C(=O)SCC(NC(=O)CCC([N+])C(O)=O)C(=O)NCC([O-])=O", // 328,"R-S-lactoylglutathione|",">CH- : 3 | -CH2- : 4 | >C=O : 3 | -COO : 2 | -CH3 : 1 | -OH : 1 | -NH3 : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1" - "-80.65","CC(=O)NC(Cc1ccccc1)C([O-])=O", // 332,"N-acetyl-L-phenylalanine|",">CH- : 1 | -CH2- : 1 | -COO : 1 | aromatic ring =C< : 1 | >C=O : 1 | aromatic ring =CH- : 5 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - -// wrong SMILES -> no ring -// "-248.86","[H]C(O)(CO)C([H])(O)C([H])(O)C([H])(NC(=O)CO)C=O", // 333,"N-glycolyl-D-mannosamine|","ring -CH< : 5 | -OH : 5 | ring -O- : 1 | >C=O : 1 | -CH2- : 2 | amide : 1 | -NH- : 1 | Origin : 1" - -// wrong SMILES -> no -NH3 possible -// "-165.94","CNC(CC(O)=O)C([O-])=O", // 336,"L-threo-3-methylaspartate|",">CH- : 2 | -COO : 2 | -CH3 : 1 | -NH3 : 1 | Origin : 1" - - "-153.08","OC(=O)CC1NC(=O)NC1=O", // 340,"L-5-carboxymethylhydantoin|","ring -CH< : 1 | ring >C=O : 2 | -CH2- : 1 | -COO : 1 | amide : 2 | ring -NH- : 2 | Origin : 1" - "-36.26","[H]C12CCC3([H])C4([H])CCC(=O)C4(C)CCC3([H])C1(C)CCC(=O)C2", // 342,"5alpha-androstane-3,17-dione|5beta-androstane-3,17-dione|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring >C=O : 2 | Origin : 1" - "-408.89","OC1C(COP([O-])([O-])=O)OC(C1O)n1cnc2c(NC(CC(O)=O)C(O)=O)ncnc12", // 343,"adenylosuccinate|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH- : 1 | -CH2- : 2 | >CH- : 1 | -OPO3 : 1 | -COO : 2 | Origin : 1 | heteroaromatic : 2" - -// wrong SMILES -> no -OPO3 by jankowski -// "0.09","NC(=O)c1ncn(C2OC(COP([O-])([O-])=O)C(O)C2O)c1N", // 349,"5-amino-4-imidazolecarboxamide|","ring =C< : 2 | >C=O : 1 | ring =N- : 1 | ring -NH- : 1 | -NH2 : 2 | ring =CH- : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" - - "-183.72","OCC(O)CC(=O)C([O-])=O", // 351,"2-dehydro-3-deoxy-L-pentonate|","-COO : 1 | >C=O : 1 | -CH2- : 2 | >CH- : 1 | -OH : 2 | Origin : 1 | OCCO : 1" - "-425.13","CC(=O)NC1C(O)C(O)C(CO)OC1OP([O-])([O-])=O", // 355,"N-acetyl-alpha-D-glucosamine-1-phosphate|N-acetyl-D-glucosamine-1-phosphate|","ring -CH< : 5 | ring -O- : 1 | -OPO3 : 1 | -OH : 3 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-425.13","CC(=O)NC1(C(O)OC(COP([O-])([O-])=O)C(O)C1(O))", // 356,"N-acetyl-D-mannosamine-6-phosphate|N-acetyl-D-glucosamine-6-phosphate|","ring -CH< : 5 | -OH : 3 | ring -O- : 1 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - -// no heteroaromatic ring by jankowski -// "-651.64","CC1OC(OP([O-])(=O)OP([O-])(=O)OCC2OC(CC2O)n2cc(C)c(=O)[nH]c2=O)C(O)C(O)C1N", // 357,"dTDP-4-amino-4,6-dideoxy-D-glucose|","ring -CH< : 8 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 3 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | -NH3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" - - "-49.38","[H]C12CCC3([H])C4([H])CCC(O)C4(C)CCC3([H])C1(C)CCC(O)C2", // 363,"5alpha-androstane-3alpha,17beta-diol|5alpha-androstane-3beta,17alpha-diol|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring -CH< : 2 | -OH : 2 | Origin : 1" - -// wrong SMILES -> same as 363 -// "-42.82","[H]C12CCC3([H])C4([H])CCC(=O)C4(C)CCC3([H])C1(C)CCC(O)C2", // 364,"5alpha-androstane-3alpha-ol-17-one|5beta-androstane-3alpha-ol-17-one|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring >C=O : 1 | ring -CH< : 1 | -OH : 1 | Origin : 1" - - "-294.26","[O-]C(=O)CCC(=O)NC(CCCC(=O)C([O-])=O)C([O-])=O", // 365,"N-succinyl-2-L-amino-6-oxoheptanedioate|",">CH- : 1 | -CH2- : 5 | -COO : 3 | >C=O : 2 | amide : 1 | -NH- : 1 | Origin : 1 | OCCO : 1" - "-432.64","OC(COP([O-])([O-])=O)C(O)CC(=O)C([O-])=O", // 366,"6-phospho-2-dehydro-3-deoxy-D-gluconate|2-dehydro-3-deoxy-D-galactonate-6-phosphate|","-OPO3 : 1 | -CH2- : 2 | >CH- : 2 | -OH : 2 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1" - "-269.49","[N+]C(CCCC(NC(=O)CCC(O)=O)C(O)=O)C([O-])=O", // 367,"N-succinyl-L-2,6-diaminoheptanedioate|",">CH- : 2 | -CH2- : 5 | -COO : 3 | >C=O : 1 | -NH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-817.39","CCCC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 372,"3S-3-hydroxyhexanoyl-CoA|S-3-hydroxyhexanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 3 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-809.37","CCCC(=O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 373,"3-oxohexanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 4 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-758.54","CCCC=CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 374,"cis-hex-2-enoyl-CoA|trans-hex-2-enoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 8 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | =CH- : 2 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" - "-142.05","[H]C12CCC3([H])C4([H])CCC(O)(C(=O)CO)C4(C)CC(=O)C3([H])C1(C)CCC(=O)C2", // 376,"5alpha-pregnane-17alpha,21-diol-3,11,20-trione|5beta-pregnane-17alpha,21-diol-3,11,20-trione|","two fused rings >CH- : 4 | two fused rings >C< : 2 | ring -CH2- : 8 | ring >C< : 1 | -CH3 : 2 | ring >C=O : 2 | >C=O : 1 | -OH : 2 | -CH2- : 1 | Origin : 1" - -// only 1 heteroaromatic ring by jankowski -// "-61.24","OCC1OC(CC1O)n1cnc2c1nc[nH]c2=O", // 380,"2'-deoxyinosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 1 | -CH2- : 1 | -OH : 2 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" - -// only 1 amide by jankowski : WHO IS RIGHT ? -// --> are lactams not counted as amides ? -// "-120.89","[H]C12SC(C)(C)C(N1C(=O)C2NC(=O)C(N)c1ccc(O)cc1)C([O-])=O", // 382,"amoxicillin|","two fused rings -N< : 1 | two fused rings >CH- : 1 | ring -CH< : 2 | ring >C=O : 1 | ring -S- : 1 | ring >C< : 1 | -COO : 1 | -CH3 : 2 | >C=O : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >CH- : 1 | -NH2 : 1 | -OH : 1 | amide : 1 | -NH- : 1 | Origin : 1" - - "-345.38","C(C2(C(C(C(N1(C=CC(N)=NC1=O))O2)O)OP([O-])([O-])=O))O", // 383,"cytidine-3'-monophosphate|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -OPO3 : 1 | -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-217.61","C1(CO)(O)OCC(O)C(O)C1(O)", // 392,"D-psicose|L-sorbose|D-tagatose|","ring >C< : 1 | ring -CH< : 3 | ring -O- : 1 | -CH2- : 1 | -OH : 5 | ring -CH2- : 1 | Origin : 1" - "-152.6","OCC(O)C(O)CO", // 402,"L-threitol|","-OH : 4 | -CH2- : 2 | >CH- : 2 | Origin : 1" - -// ERROR : problem about maximal ring size : should be upper bounded otherwise "-O-" is never matched -// "-950.88","OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O", // 415,"cyclomaltohexaose|","ring -CH< : 30 | -O- : 6 | ring -O- : 6 | -CH2- : 6 | -OH : 18 | Origin : 1" -// "-1267.84","OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC8C(CO)OC(OC9C(CO)OC(OC1C(O)C2O)C(O)C9O)C(O)C8O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O", // 420,"cyclomaltooctaose|","ring -CH< : 40 | -O- : 8 | ring -O- : 8 | -CH2- : 8 | -OH : 24 | Origin : 1" -// "-532.92","OCC1OC(OC2C(O)C(CO)OC(OC3C(O)C(O)OC(CO)C3O)C2O)C(O)C(O)C1O", // 423,"laminaritriose|beta-laminaritriose|","-OH : 11 | ring -CH< : 10 | -O- : 2 | ring -O- : 2 | -CH2- : 3 | -CH=O : 1 | >CH- : 4 | Origin : 1" - - "-336.65","[N+]C(COP([O-])([O-])=O)C([O-])=O", // 436,"L-O-phosphoserine|",">CH- : 1 | -COO : 1 | -NH3 : 1 | -CH2- : 1 | -OPO3 : 1 | Origin : 1" - "-673.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 439,"ATP|atp|","ring =CH- : 2 | ring =N- : 3 | two fused rings >C= : 2 | ring =C< : 1 | -NH2 : 1 | ring -N< : 1 | ring -CH< : 4 | -OH : 2 | ring -O- : 1 | -OPO2- : 2 | -OPO3 : 1 | -CH2- : 1 | Origin : 1 | heteroaromatic : 2" - "-465.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 440,"ADP|adp|","ring =CH- : 2 | two fused rings >C= : 2 | ring =C< : 1 | -NH2 : 1 | ring =N- : 3 | ring -N< : 1 | ring -CH< : 4 | -OH : 2 | ring -O- : 1 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" - "-218.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])([O-])=O)O1", // 453,"2'-deoxyadenosine-5'-monophosphate|dAMP|","ring =C< : 1 | ring =CH- : 2 | -NH2 : 1 | ring =N- : 3 | two fused rings >C= : 2 | ring -CH< : 3 | ring -CH2- : 1 | ring -O- : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | ring -N< : 1 | Origin : 1 | heteroaromatic : 2" - "-367.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OS([O-])(=O)=O)C(O)C1O", // 475,"adenylyl-sulfate|aps|","ring =CH- : 2 | two fused rings >C= : 2 | ring =N- : 3 | ring =C< : 1 | -NH2 : 1 | ring -N< : 1 | ring -CH< : 4 | ring -O- : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -SO4 : 1 | Origin : 1 | heteroaromatic : 2" - "-214.49","OC1CC(O)(CC(=O)C1O)C([O-])=O", // 479,"3-dehydroquinate|5-dehydroquinate|","ring -CH2- : 2 | ring -CH< : 2 | -OH : 3 | ring >C=O : 1 | ring >C< : 1 | -COO : 1 | Origin : 1" - -// no heteroaromatic ring by jankowski -// "-825.37","CCCC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 481,"3R-3-hydroxyhexanoyl-CoA|","dbl sgl ring =N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 2 | -OH : 3 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | ring -NH- : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | CCCN : 1 | CCNC : 3" - - "-179.54","[H]C(O)(CO)C([H])(O)C([H])(O)C=O", // 488,"D-lyxose|","-OH : 4 | -CH=O : 1 | >CH- : 3 | -CH2- : 1 | Origin : 1" - "-589.26","OCC1OC(OC2OC(COP([O-])([O-])=O)C(O)C(O)C2O)C(O)C(O)C1O", // 493,"alpha,alpha-trehalose-6-phosphate|","ring -CH< : 10 | -CH2- : 2 | -OPO3 : 1 | -OH : 7 | ring -O- : 2 | -O- : 1 | Origin : 1" - "-820.63","CC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 498,"3-hydroxybutanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 3 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - "-782.59","CCCC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 501,"butyryl-CoA|btcoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 8 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" - -// no heteroaromatic ring by jankowski -// "-113.97","Nc1nc2NCC(CNc3ccc(cc3)C(=O)NC(CCC([O-])=O)C([O-])=O)Nc2c(=O)[nH]1", // 511,"5,6,7,8-tetrahydrofolate|thf|","-CH2- : 3 | -NH- : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | ring -CH2- : 1 | two fused rings >C= : 2 | ring >C=O : 1 | ring =C< : 1 | ring -NH- : 3 | ring =N- : 1 | ring -CH< : 1 | -NH2 : 1 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 1" -// "-93.65","Nc1nc2NCC3CN(CN3c2c(=O)[nH]1)c1ccc(cc1)C(=O)NC(CCC([O-])=O)C([O-])=O", // 513,"5,10-methylenetetrahydrofolate|","two fused rings -N< : 1 | two fused rings >C= : 2 | two fused rings >CH- : 1 | ring -CH2- : 3 | ring >C=O : 1 | ring -N< : 1 | ring -NH- : 2 | ring =N- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -CH2- : 2 | -COO : 2 | ring =C< : 1 | -NH2 : 1 | amide : 2 | -NH- : 1 | Origin : 1 | OCCC : 2 | CCNC : 1" -// "-144.77","[H]C(=O)N(CC1CNc2nc(N)[nH]c(=O)c2N1)c1ccc(cc1)C(=O)NC(CCC([O-])=O)C([O-])=O", // 514,"10-formyltetrahydrofolate|10fthf|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 1 | ring =N- : 1 | ring -CH< : 1 | ring -CH2- : 1 | ring =C< : 1 | -CH2- : 3 | -NH2 : 1 | aromatic ring =C< : 2 | -CH=O : 1 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 3 | -N< : 1 | -NH- : 1 | Origin : 1 | OCCC : 2 | CCNC : 1" -// "-106.95","[H]C(=N)N1C(CNc2ccc(cc2)C(=O)NC(CCC(O)=O)C(O)=O)CNc2nc(N)[nH]c(=O)c12", // 516,"5-formiminotetrahydrofolate|","two fused rings >C= : 2 | ring -N< : 1 | ring >C=O : 1 | ring -CH< : 1 | =CH- : 1 | ring -NH- : 2 | ring =N- : 1 | ring -CH2- : 1 | -CH2- : 3 | =NH : 1 | ring =C< : 1 | -NH- : 2 | -NH2 : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 1" -// "-109.12","Nc1nc2NCC(CNc3ccc(cc3)C(=O)NC(CCC(O)=O)C(O)=O)=Nc2c(=O)[nH]1", // 517,"7,8-dihydrofolate|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | -CH2- : 3 | -NH- : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 2" - -// no amide by jankowski : WHO IS RIGHT ? -// --> are lactams not counted as amides ? -// "-85.89","[H]C1(N)C(=O)N2C1([H])SC(C)(C)C2([H])C([O-])=O", // 521,"6-aminopenicillanate|","two fused rings -N< : 1 | two fused rings >CH- : 1 | ring -CH< : 2 | ring >C=O : 1 | ring -S- : 1 | ring >C< : 1 | -COO : 1 | -NH2 : 1 | -CH3 : 2 | Origin : 1" - - "-376.76","OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O", // 535,"cellobiose|beta-lactose|beta-maltose|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -CH2- : 2 | -OH : 8 | Origin : 1" - "-430.78","OCC1OC(OP([O-])([O-])=O)C(O)C(O)C1O", // 547,"glucose-1-phosphate|galactose-1-phosphate|mannose-1-phosphate|","ring -CH< : 5 | ring -O- : 1 | -OPO3 : 1 | -OH : 4 | -CH2- : 1 | Origin : 1" - "-764.06","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)C=C", // 560,"acrylyl-coa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | =CH- : 1 | =CH2 : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" - "-345.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP([O-])([O-])=O", // 586,"cmp|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO3 : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" - "-16.93","CC(Cl)CCl", // 609,"1,2-dichloropropane|","-CH3 : 1 | -CH2- : 1 | primary -Cl : 1 | >CH- : 1 | secondary -Cl : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" - -// wrong SMILES : no chlorines ... -// "-25.58","[H]C1(C(C(=O)N2CCCC2OC)C2(O)C(O)C1(Oc1cc(OC)cc(OC)c21)c1ccc(OC)cc1)c1ccccc1", // 674,"2,3,4,5-tetrachlorophenol|","aromatic ring =CH- : 1 | aromatic ring =C< : 5 | -OH : 1 | tertiary -Cl : 4 | Origin : 1 | BinaryVicinalCl : 3 | DistinctVicinalCl : 3" - - "-466.4","[N+]Cc1cc(COc2ccc(CCNC(=O)CCC(NC(=O)CCC(NC(=O)CCC(C(CCC(O)=O)C(O)=O)C(O)=O)C(O)=O)C(O)=O)cc2)co1", // 683,"MFR|methanofuran|","ring =C< : 2 | ring =CH- : 2 | -CH2- : 12 | -O- : 1 | ring -O- : 1 | aromatic ring =C< : 2 | -NH3 : 1 | aromatic ring =CH- : 4 | >C=O : 3 | >CH- : 4 | -COO : 5 | amide : 3 | -NH- : 3 | Origin : 1 | heteroaromatic : 1" - -// wrong SMILES : no -COO, no -OPO3- -// "-544.24","C1(NC2(N=C(N)NC(=O)C=2(NC1C(O)C(O)CO)))", // 685,"H4MPT|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 1 | ring =N- : 1 | ring -CH< : 6 | ring =C< : 1 | >CH- : 5 | -NH2 : 1 | -NH- : 1 | -CH3 : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | -OH : 5 | -O- : 1 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1" - -// no heteroaromatic ring by jankowski -// "-529.04","[H]C1(Nc2c(NC1C)nc(N)[nH]c2=O)C(C)Nc1ccc(CC(O)C(O)C(O)COC2OC(COP([O-])(=O)OC(CCC(O)=O)C(O)=O)C(O)C2O)cc1", // 687,"methenyl-H4MPT|","dbl sgl ring =N< : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | >CH- : 4 | -OH : 5 | -O- : 1 | ring -CH< : 6 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 1 | two fused rings -N< : 1 | ring >C=O : 1 | ring =C< : 1 | two fused rings >CH- : 1 | ring =CH- : 1 | -CH3 : 2 | -NH2 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 2" -// "-653.72","[H]C(CCC([O-])=O)(NC(=O)CCC([H])(NC(=O)C(C)OP([O-])(=O)OCC(O)C(O)C(O)CN1c2cc(O)ccc2Cc2c1[nH]c(=O)[nH]c2=O)C([O-])=O)C([O-])=O", // 689,"F420|","aromatic ring =CH- : 3 | aromatic ring =C< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | ring -N< : 1 | ring =CH- : 1 | two fused rings >C= : 2 | ring =N- : 1 | ring >C=O : 2 | -OH : 4 | -CH2- : 6 | >CH- : 6 | -OPO3- : 1 | >C=O : 2 | -CH3 : 1 | -COO : 3 | amide : 3 | ring -NH- : 1 | -NH- : 2 | Origin : 1 | OCCC : 1 | OCNC : 1 | CCCN : 1 | CCCC : 1" -// "-531.97","[H]C1(C(C)Nc2ccc(CC(O)C(O)C(O)COC3OC(COP([O-])(=O)OC(CCC(O)=O)C(O)=O)C(O)C3O)cc2)C(C)Nc2nc(N)[nH]c(=O)c2N1C", // 691,"CH3-H4MPT|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 1 | ring -N< : 1 | ring >C=O : 1 | ring -CH< : 6 | ring =C< : 1 | -CH3 : 3 | -NH2 : 1 | >CH- : 5 | -NH- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | -OH : 5 | -O- : 1 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1" - - "-353.81","CC(OP([O-])([O-])=O)C(NC(=O)CCCCCCS)C([O-])=O", // 695,"CoB|H-S-CoB|coenzyme-B|",">C=O : 1 | -CH3 : 1 | >CH- : 2 | -OPO3 : 1 | -COO : 1 | -CH2- : 6 | -SH : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-467.89","CC(OP([O-])([O-])=O)C(NC(=O)CCCCCCSSCCS([O-])(=O)=O)C([O-])=O", // 696,"CoM-S-S-CoB|",">C=O : 1 | -CH3 : 1 | >CH- : 2 | -OPO3 : 1 | -COO : 1 | -CH2- : 8 | -S-S- : 1 | -SO3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" - "-376.76","OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O", // 697,"O-alpha-D-glucopyranosyl-1->4-n|maltose|disaccharide|lactose|lcts|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -CH2- : 2 | -OH : 8 | Origin : 1" - "-376.76","OCC1OC(OCC2OC(O)C(O)C(O)C2O)C(O)C(O)C1O", // 698,"allolactose|","ring -CH< : 10 | -CH2- : 2 | -OH : 8 | ring -O- : 2 | -O- : 1 | Origin : 1" - "-535.24","OCC1OC(OC2C(CO)OC(OC3C(CO)OC(O)C(O)C3O)C(O)C2O)C(O)C(O)C1O", // 708,"cellotriose|beta-cellotriose|","ring -CH< : 15 | -O- : 2 | ring -O- : 3 | -CH2- : 3 | -OH : 11 | Origin : 1" - "-377.65","OCC1OC(OC2C(CO)OC(O)(CO)C2O)C(O)C(O)C1O", // 709,"lactulose|beta-lactulose|","ring -O- : 2 | ring -CH< : 8 | -O- : 1 | -OH : 8 | ring >C< : 1 | -CH2- : 3 | Origin : 1" - - "-570","P1(O)(=O)OP(O)(=O)OP(O)(=O)O1", // "cyclic trimetaphosphate" -// "NOT HANDLED BY JANKOWSKI","OP(O)(=O)OP(O)(=O)OP(O)(=O)O", // "triphosphoric acid" - - "" // marks the end of the array -}; - -class DR_print : public MoleculeDecomposition::DecompositionReporter { -public: - /*! - * Reports a component that was matched and its according ID - * in the final match graph - * @param component the component that was matched - * @param matchCount the number of matches found - * @param machtID the ID of the component in the final match graph - */ - void - reportComponent( const MoleculeComponent & component, - const size_t matchCount, - const size_t matchID ) - { - std::cout <<" + " << matchCount <<" [" <SMILESparser::parseSMILES( SMILES )" < ret = SMILESparser::parseSMILES(SMILES[i]); - - if (ret.second < 0 ) - { - std::cout <<"\n Molecule GRAPH to be evaluated : " <MoleculeDecomposition::getEnergy( MOLECULE corrected ) :\n" < +#include + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/MoleculeDecomposition.hh" +#include "ggl/chem/SMILESparser.hh" + +#include "sgm/Graph_boost.hh" +#include "sgm/GM_vf2.hh" +#include "sgm/SGM_vf2.hh" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace ggl::chem; + +// SMILES REFERENCE : http://metacyc.org/ + +const std::string SMILES[] = { + +// "ENERGY","SMILES", // "ENTRY","NAMES","GROUP_DECOMPOSITION" + "-480.93","OP([O-])(=O)OP([O-])([O-])=O", // 8,"diphosphate|pyrophosphate|ppi|","pyrophosphate : 1" + "-18.97","[H]N([H])[H]", // 9,"ammonia|nh4|","NH4 : 1" + "-18.97","[NH4+]", // 9,"ammonia(aq)|nh4|","NH4 : 1" + "-112.69","CC(=O)C([O-])=O", // 15,"pyruvate|pyr|",">C=O : 1 | -COO : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" + "-188.9","[O-]C(=O)CCC(=O)C([O-])=O", // 17,"alpha-ketoglutarate|akg|",">C=O : 1 | -CH2- : 2 | -COO : 2 | Origin : 1 | OCCO : 1" + "-32.05","[H]OO[H]", // 18,"hydrogen peroxide|","H2O2 : 1" + "-190.52","OC(=O)CC(=O)C([O-])=O", // 20,"oxaloacetate|oaa|",">C=O : 1 | -CH2- : 1 | -COO : 2 | Origin : 1 | OCCO : 1" + "-87.73","[N+]CC([O-])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" + "-87.73","[NH3+]CC([O-1])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" + "-162.96","[O-]C(=O)CCC([O-])=O", // 23,"succinate|succ|","-COO : 2 | -CH2- : 2 | Origin : 1" + "-111.04","[H]C(=O)C([O-])=O", // 26,"glyoxylate|glx|","-COO : 1 | -CH=O : 1 | Origin : 1 | OCCO : 1" + "-83.9","[H]C([O-])=O", // 32,"formate|for|","formate : 1" + "-177.97","[O-]S([O-])(=O)=O", // 33,"sulfate|so4|","sulfate : 1" + "-31.2","[H]C([H])=O", // 38,"formaldehyde|fald|","formaldehyde : 1" + "-316.08","[O-]P([O-])(=O)OC(=C)C([O-])=O", // 40,"phosphoenolpyruvate|pep|","-OPO3 : 1 | =C< : 1 | -COO : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" + "-33.4","[H]C(C)=O", // 48,"acetaldehyde|acald|","acetaldehyde : 1" + "-48.7","NC(N)=O", // 50,"urea|","urea : 1" + "-86.11","[N+]CCC([O-])=O", // 54,"beta-alanine|","-CH2- : 2 | -COO : 1 | -NH3 : 1 | Origin : 1" + "-61.07","O=C1NC=CC(=O)N1", // 58,"uracil|","ring >C=O : 2 | ring =CH- : 2 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 1" + "-111.07","CCC(=O)C([O-])=O", // 59,"2-oxobutanoate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" + "12.19","C[N+](C)(C)CCO", // 61,"choline|","-CH2- : 2 | >N< : 1 | -CH3 : 3 | -OH : 1 | Origin : 1" + "-116.18","OCC(O)CO", // 62,"glycerol|glyc|",">CH- : 1 | -CH2- : 2 | -OH : 3 | Origin : 1" + "-84.87","CC(C)CC([N+])C([O-])=O", // 66,"leucine|leu|",">CH- : 2 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -CH3 : 2 | Origin : 1" + "-439.84","CC(=C)CCOP([O-1])(=O)OP([O-])([O-1])=O", // 68,"isopentenyl-diphosphate|","-OPO2- : 1 | -OPO3 : 1 | -CH2- : 2 | =C< : 1 | -CH3 : 1 | =CH2 : 1 | Origin : 1" + "-634.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)O1", // 70,"dATP","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 2 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" + "-41.9","CO", // 71,"methanol|","methanol : 1" + "-87.92","CC([N+])C([O-])=O", // 72,"alanine|ala|",">CH- : 1 | -COO : 1 | -CH3 : 1 | -NH3 : 1 | Origin : 1" + "-9.9","Oc1ccccc1", // 76,"phenol|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -OH : 1 | Origin : 1" + "78.85","Nc1ncnc2[nH]cnc12", // 77,"adenine|","two fused rings >C= : 2 | ring =C< : 1 | ring =N- : 3 | ring -NH- : 1 | -NH2 : 1 | ring =CH- : 2 | Origin : 1 | heteroaromatic : 2" + "5.55","NC(=O)c1cccnc1", // 80,"nicotinamide|","ring =C< : 1 | ring =CH- : 4 | >C=O : 1 | ring =N- : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" + "-280.44","OC(CC([O-])=O)(CC([O-])=O)C([O-])=O", // 83,"citrate|cit|",">C< : 1 | -CH2- : 2 | -COO : 3 | -OH : 1 | Origin : 1" + "-122.98","OCC([O-])=O", // 84,"glycolate|glyclt|","-COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1" + "-85.13","CCC([O-])=O", // 85,"propanoate|ppa|","-COO : 1 | -CH2- : 1 | -CH3 : 1 | Origin : 1" + "-75.82","[O-]C(=O)C(=O)Cc1ccccc1", // 86,"keto-phenylpyruvate|phenylpyruvate|","aromatic ring =C< : 1 | -CH2- : 1 | aromatic ring =CH- : 5 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1" + "-148.92","OCC(=O)C([O-])=O", // 87,"3-hydroxypyruvate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1 | OCCO : 1" + "-108.16","OCC(=O)CO", // 90,"dihydroxyacetone|dha|glycerone",">C=O : 1 | -CH2- : 2 | -OH : 2 | Origin : 1" + "-38.9","NO", // 92,"hydroxylamine|","hydroxylamine : 1" + "-38.52","CC(C)=O", // 95,"acetone|","acetone : 1" + "-111.88","[H]C(=O)CC([O-])=O", // 98,"3-oxopropanoate|","-CH2- : 1 | -COO : 1 | -CH=O : 1 | Origin : 1" + "-301.65","CC(=O)OP([O-])([O-])=O", // 99,"acetyl-phosphate|acetyl-p|","-CO-OPO3- : 1 | -CH3 : 1 | Origin : 1" + "-110.26","[O-]C(=O)CCC=O", // 100,"4-oxobutanoate|","-CH2- : 2 | -COO : 1 | -CH=O : 1 | Origin : 1" + "-439.18","CC(C)=CCOP([O-])(=O)OP([O-])([O-])=O", // 102,"dimethylallyl-diphosphate|","-OPO2- : 1 | -OPO3 : 1 | -CH2- : 1 | =CH- : 1 | =C< : 1 | -CH3 : 2 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "28.4","Nc1nc2[nH]cnc2c(=O)[nH]1", // 105,"guanine|","two fused rings >C= : 2 | ring =N- : 2 | ring -NH- : 2 | ring >C=O : 1 | ring =C< : 1 | ring =CH- : 1 | -NH2 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-21.54","NC(=O)CCCCC1CCSS1", // 106,"lipoamide|","ring -CH< : 1 | ring -CH2- : 2 | ring -S- : 2 | -CH2- : 4 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" + "-64.07","CCCCCCCCCCCCCCCC([O-])=O", // 107,"palmitate|","-CH2- : 14 | -COO : 1 | -CH3 : 1 | Origin : 1" + "-123.17","CC(O)C([O-])=O", // 109,"lactate|lac-L|",">CH- : 1 | -COO : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" + "-0.35","[H]C(=O)c1ccccc1", // 112,"benzaldehyde|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -CH=O : 1 | Origin : 1 | OCCC : 1" + +// only 1 heteroaromatic ring by jankowski +// "23.12","O=c1[nH]cnc2nc[nH]c12", // 113,"hypoxanthine|Hypoxanthine|hypoxanthine(0,4)|hypoxanthine|hxan|","two fused rings >C= : 2 | ring >C=O : 1 | ring =N- : 2 | ring -NH- : 2 | ring =CH- : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-70.28","[H]C(=O)CO", // 115,"glycolaldehyde|","-CH2- : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" + "-142.48","C([O-])(=O)C1(=CC(=O)NC(N1)=O)", // 122,"orotate|","ring =C< : 1 | ring =CH- : 1 | -COO : 1 | ring >C=O : 2 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 2" + "-65.59","CN(CC([O-])=O)C(N)=[N+]", // 125,"creatine|Creatine|creatine(0,9)|creatine|","-N< : 1 | -CH2- : 1 | =C< : 1 | -CH3 : 1 | -COO : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" + "-279.02","OC(C(CC([O-])=O)C([O-])=O)C([O-])=O", // 127,"isocitrate|icit|",">CH- : 2 | -CH2- : 1 | -COO : 3 | -OH : 1 | Origin : 1" + "-49.77","[O-]C(=O)C(=O)Cc1c[nH]c2ccccc12", // 130,"indole-3-pyruvate|","aromatic ring fused to nonaromatic ring >C= : 2 | ring =C< : 1 | aromatic ring =CH- : 4 | -CH2- : 1 | ring =CH- : 1 | ring -NH- : 1 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1 | heteroaromatic : 1" + "-112.07","CC(C=O)C([O-])=O", // 137,"2-methyl-3-oxopropanoate|",">CH- : 1 | -COO : 1 | -CH=O : 1 | -CH3 : 1 | Origin : 1" + "-257.01","[N+]CCOP([O-])([O-])=O", // 145,"O-phosphorylethanolamine|","-OPO3 : 1 | -CH2- : 2 | -NH3 : 1 | Origin : 1" + "-90.93","C12(NC(=O)NC=1C(=O)NC(=O)N2)", // 146,"urate|CHEBI:17775","two fused rings >C= : 2 | ring >C=O : 3 | amide : 4 | ring -NH- : 4 | Origin : 1 | OCCC : 1" + "-14.2","O=C1CCCCC1", // 150,"cyclohexanone|","ring >C=O : 1 | ring -CH2- : 5 | Origin : 1" + "-32.27","[O-]C(=O)C=Cc1ccccc1", // 152,"trans-cinnamate|","aromatic ring =C< : 1 | =CH- : 2 | aromatic ring =CH- : 5 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" + "70.9","CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CCO", // 160,"retinol|","ring =C< : 2 | ring >C< : 1 | =CH- : 6 | ring -CH2- : 3 | -CH3 : 5 | =C< : 2 | -CH2- : 1 | -OH : 1 | Origin : 1 | CCCC : 4" + "-121.41","COc1cc(cc(OC)c1O)C=CC([O-])=O", // 163,"sinapate|","aromatic ring =C< : 4 | aromatic ring =CH- : 2 | -O- : 2 | -OH : 1 | -CH3 : 2 | =CH- : 2 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" + "-65.83","C[N+](C)(C)CC(O)CC([O-])=O", // 164,"carnitine|","-CH2- : 2 | >N< : 1 | >CH- : 1 | -CH3 : 3 | -OH : 1 | -COO : 1 | Origin : 1" + "-166.94","NC(=O)NC(NC(N)=O)C([O-])=O", // 168,"allantoate|",">CH- : 1 | -COO : 1 | >C=O : 2 | amide : 4 | -NH- : 2 | -NH2 : 2 | Origin : 1" + "-85.66","[N+]CCCC([N+])C([O-])=O", // 171,"ornithine|orn|",">CH- : 1 | -COO : 1 | -CH2- : 3 | -NH3 : 2 | Origin : 1" + "-59.99","[H]C(=O)C(C)=O", // 173,"methylglyoxal|",">C=O : 1 | -CH=O : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" + "-8.28","OCc1ccccc1", // 176,"benzyl-alcohol|","aromatic ring =C< : 1 | aromatic ring =CH- : 5 | -CH2- : 1 | -OH : 1 | Origin : 1" + "-106.7","[H]C(=O)C(O)CO", // 180,"glyceraldehyde|glyald|",">CH- : 1 | -CH2- : 1 | -CH=O : 1 | -OH : 2 | Origin : 1" + "-27.35","NC(=O)CCCCC(S)CCS", // 181,"dihydrolipoamide|","-CH2- : 6 | >CH- : 1 | -SH : 2 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" + "1.47","CSC", // 182,"dimethyl sulfide|","-S- : 1 | -CH3 : 2 | Origin : 1" + "-75.84","NC(=[N+])NCC([O-])=O", // 183,"guanidinoacetic acid|","-COO : 1 | -CH2- : 1 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" + "-200.31","C[N+](C)(C)CCOP([O-])([O-])=O", // 186,"choline phosphate|","-CH2- : 2 | >N< : 1 | -CH3 : 3 | -OPO3 : 1 | Origin : 1" + "-51.81","COc1cc(C=CCO)ccc1O", // 187,"coniferol|","aromatic ring =C< : 3 | -OH : 2 | aromatic ring =CH- : 3 | -O- : 1 | =CH- : 2 | -CH3 : 1 | -CH2- : 1 | Origin : 1 | CCCC : 1" + "-114.09","CC(=O)NCCCC([O-])=O", // 193,"N-acetyl-L-alpha-amino-n-butyrate|CHEBI:17645","-CH2- : 3 | -COO : 1 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-63.98","[O-]C(=O)CCCCC1SSCC1", // 200,"alpha-lipoate|","ring -CH< : 1 | ring -CH2- : 2 | ring -S- : 2 | -CH2- : 4 | -COO : 1 | Origin : 1" + "-124.15","[N+]C(CO)C([O-])=O", // 201,"serine|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" + "-26.85","[H]C(=C([H])c1c[nH]cn1)C([O-])=O", // 202,"urocanate|","ring =C< : 1 | =CH- : 2 | ring =CH- : 2 | ring =N- : 1 | ring -NH- : 1 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1 | heteroaromatic : 1" + "-72.12","CC(O)C(C)=O", // 204,"acetoin|",">CH- : 1 | >C=O : 1 | -CH3 : 2 | -OH : 1 | Origin : 1" + +// wrong SMILES +// "-34.72","CC(O)C(=O)C1(CNC2(=NC(N)=NC(=O)[C-]2(N=1)))", // 206,"sepiapterin|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | >C=O : 1 | >CH- : 1 | -CH3 : 1 | -OH : 1 | amide : 1 | Origin : 1 | OCCC : 1 | OCCN : 1 | CCNC : 2" + + "-20.76","OC1CCCCC1", // 208,"cyclohexanol|","ring -CH< : 1 | ring -CH2- : 5 | -OH : 1 | Origin : 1" + "-145.2","CC(C([O-])=O)=C(C)C([O-])=O", // 216,"dimethylmaleate|","-COO : 2 | =C< : 2 | -CH3 : 2 | Origin : 1 | OCCC : 2" + "-70.47","[H]C(=O)C(C)O", // 217,"lactaldehyde|",">CH- : 1 | -CH=O : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" + "-119.74","OCCCC([O-])=O", // 223,"4-hydroxybutyrate|","-CH2- : 3 | -COO : 1 | -OH : 1 | Origin : 1" + "-121.36","[O-]C(=O)CCO", // 224,"3-hydroxypropanoate|b-Hydroxypropionate|hydroxypropionate(-1,5)|hydroxypropionate|b-hydroxypropionate|","-CH2- : 2 | -COO : 1 | -OH : 1 | Origin : 1" + "-115.71","CC(=O)NCCC([O-])=O", // 226,"N-acetyl-L-alanine|CHEBI:16682","-COO : 1 | -CH2- : 2 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-199.38","OC(CCC([O-])=O)C([O-])=O", // 228,"2-hydroxyglutarate|",">CH- : 1 | -CH2- : 2 | -COO : 2 | -OH : 1 | Origin : 1" + "-226.94","OC(CC(=O)C([O-])=O)C([O-])=O", // 237,"4-hydroxy-2-oxoglutarate|",">CH- : 1 | -COO : 2 | -CH2- : 1 | -OH : 1 | >C=O : 1 | Origin : 1 | OCCO : 1" + "-149.92","[O-]C(C=O)C([O-])=O", // 240,"2-hydroxy-3-oxopropanoate|",">CH- : 1 | -COO : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" + "-115.3","[O-]C(=O)C(=O)Cc1ccc(O)cc1", // 241,"4-hydroxyphenylpyruvate|",">C=O : 1 | -COO : 1 | -CH2- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -OH : 1 | Origin : 1 | OCCO : 1" + "-121.55","CC(CO)C([O-])=O", // 243,"3-hydroxy-2-methylpropanoate|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" + "-79.76","OCCO", // 251,"ethylene-glycol|","-CH2- : 2 | -OH : 2 | Origin : 1" + "-143.7","[O-]C(=O)C=CC([O-])=O", // 252,"maleate|fumarate|fum|","-COO : 2 | =CH- : 2 | Origin : 1 | OCCC : 2" + "-30.81","[H]C(=O)CCC", // 253,"butanal|butyraldehyde|","-CH2- : 2 | -CH=O : 1 | -CH3 : 1 | Origin : 1" + "-16.11","CCCCCC=CCC=CCCCCCCCC([O-])=O", // 256,"9-cis,12-cis-octadecadienoate|","-CH2- : 12 | =CH- : 4 | -COO : 1 | -CH3 : 1 | Origin : 1" + "22.2","N#C[S-]", // 265,"thiocyanate|","#C- : 1 | #N : 1 | -Sneg : 1 | Origin : 1" + "-43.72","CC(C)O", // 269,"isopropanol|",">CH- : 1 | -CH3 : 2 | -OH : 1 | Origin : 1" + "-114.87","NC(=[N+])NCCS([O-])(=O)=O", // 272,"taurocyamine|","-SO3 : 1 | -CH2- : 2 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" + "-144.58","OCC(O)C(=O)CO", // 274,"erythrulose|",">CH- : 1 | >C=O : 1 | -CH2- : 2 | -OH : 3 | Origin : 1" + "78.83","CC(C=CC=C(C)C=CC1=C(C)CCCC1(C)C)=CC=O", // 275,"11-cis-retinal|all-trans-retinal|","ring =C< : 2 | ring >C< : 1 | =CH- : 6 | ring -CH2- : 3 | -CH3 : 5 | =C< : 2 | -CH=O : 1 | Origin : 1 | OCCC : 1 | CCCC : 4" + "-125.76","CC([N+])(CO)C([O-])=O", // 276,"2-methylserine|",">C< : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" + "-113.53","CC(=O)CC([O-])=O", // 277,"3-oxobutanoate|acetoacetate|acac|b-ketobutyrate|","-CH2- : 1 | -COO : 1 | -CH3 : 1 | >C=O : 1 | Origin : 1" + "-69.79","[O-]C(=O)CCCCC(S)CCS", // 278,"dihydro-alpha-lipoate|","-CH2- : 6 | >CH- : 1 | -SH : 2 | -COO : 1 | Origin : 1" + "-143.75","CC(C([O-])=O)C(=C)C([O-])=O", // 282,"methylitaconate|",">CH- : 1 | =C< : 1 | -COO : 2 | -CH3 : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" + "-302.57","[H]C(=O)OP(O)(O)=O", // 284,"formyl-phosphate|","formylphosphate : 1" + "3.35","CC(=O)n1ccnc1", // 289,"N-acetylimidazole|",">C=O : 1 | ring =CH- : 3 | -CH3 : 1 | ring =N- : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | heteroaromatic : 1" + "-57.81","C[N+](C)(C)CC(=O)CC([O-])=O", // 296,"3-dehydrocarnitine|",">N< : 1 | -CH2- : 2 | -CH3 : 3 | >C=O : 1 | -COO : 1 | Origin : 1" + "-43.88","COc1cc(C=CC=O)ccc1O", // 299,"coniferyl-aldehyde|","aromatic ring =C< : 3 | -OH : 1 | aromatic ring =CH- : 3 | -O- : 1 | =CH- : 2 | -CH3 : 1 | -CH=O : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" + "-80.78","[O-]C(=O)CNC=[N+]", // 303,"N-formiminoglycine|","-CH2- : 1 | -COO : 1 | -NH- : 1 | =CH- : 1 | =NH2 : 1 | Origin : 1" + "-70.87","OC(=Cc1ccccc1)C([O-])=O", // 304,"enol-phenylpyruvate|","aromatic ring =C< : 1 | =CH- : 1 | aromatic ring =CH- : 5 | =C< : 1 | -COO : 1 | -OH : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" + "-101.66","CCC(=O)OC(CC([O-])=O)C[N+](C)(C)C", // 310,"propionylcarnitine|",">CH- : 1 | -O-CO- : 1 | -CH2- : 3 | >N< : 1 | -COO : 1 | -CH3 : 4 | Origin : 1" + "-39.83","C(=O)c1cccc(O)c1", // 314,"3-hydroxybenzaldehyde|","aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH=O : 1 | -OH : 1 | Origin : 1 | OCCC : 1" + "-272.38","[O-]C(=O)CNC(=[N+])NP([O-])([O-])=O", // 318,"phosphoguanidinoacetate|","-OPO2 : 1 | -NH- : 2 | =C< : 1 | =NH2 : 1 | -CH2- : 1 | -COO : 1 | Origin : 1" + "-118.57","O=C1NC(=O)C2NC(=O)C(=O)NC=2N1", // 319,"tetrahydroxypteridine|","two fused rings >C= : 2 | ring >C=O : 4 | amide : 4 | ring -NH- : 4 | Origin : 1 | OCCO : 1 | OCCC : 1" + "-157.39","CC([N+]C(C)C([O-])=O)C([O-])=O", // 320,"2,2'-iminodipropanoate|",">CH- : 2 | -COO : 2 | -NH2- : 1 | -CH3 : 2 | Origin : 1" + +// only one heteroaromatic ring by jankowski ... most probably wrong SMILES +// "-110.61","[O-]C(=O)c1nc2[nH]c(=O)[nH]c(=O)c2[nH]1", // 322,"xanthine-8-carboxylate|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 2 | ring =N- : 1 | ring =C< : 1 | -COO : 1 | amide : 2 | Origin : 1 | OCCC : 1 | OCCN : 1 | heteroaromatic : 1" + + "-47.76","OCc1cccc(O)c1", // 323,"3-hydroxybenzyl-alcohol|","aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 1 | -OH : 2 | Origin : 1" + "-86.31","[O-]C(=O)CCC1NC=NC1=O", // 339,"4,5-dihydro-4-oxo-5-imidazolepropanoate|","ring -CH< : 1 | ring >C=O : 1 | ring -NH- : 1 | -CH2- : 2 | ring =N- : 1 | ring =CH- : 1 | -COO : 1 | Origin : 1 | OCNC : 1" + "-127.36","[O-]C(=O)CNC(=O)OCc1ccccc1", // 341,"benzyloxycarbonylglycine|","aromatic ring =C< : 1 | -CH2- : 2 | aromatic ring =CH- : 5 | -O-CO- : 1 | -COO : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-65.26","C[S+](C)CCC([O-])=O", // 348,"dimethylpropiothetin|","-COO : 1 | -CH2- : 2 | -S< : 1 | -CH3 : 2 | Origin : 1" + "-20.93","CCCCCCC=CC=CCCCCCCCC([O-])=O", // 350,"9-cis,11-trans-octadecadienoate|","-CH2- : 12 | =CH- : 4 | -COO : 1 | -CH3 : 1 | Origin : 1 | CCCC : 1" + "-132.27","[O-]C(=O)CC1OC(=O)C=C1", // 352,"2,5-dihydro-5-oxofuran-2-acetate|","ring -CH< : 1 | ring -O-CO- : 1 | ring =CH- : 2 | -CH2- : 1 | -COO : 1 | Origin : 1 | OCCC : 1" + "-7.11","Cc1ncsc1CCO", // 359,"4-methyl-5-2'-hydroxyethyl-thiazole|","ring =C< : 2 | -CH2- : 2 | ring -S- : 1 | ring =N- : 1 | -CH3 : 1 | ring =CH- : 1 | -OH : 1 | Origin : 1 | heteroaromatic : 1" + "-187.28","[O-]C(=O)CCCC(=O)C([O-])=O", // 381,"2-oxoadipate|","-CH2- : 3 | >C=O : 1 | -COO : 2 | Origin : 1 | OCCO : 1" + "-65.96","Oc1ccc(cc1)C=CC(=O)c1ccc(O)cc1O", // 395,"2',4,4'-trihydroxychalcone|","aromatic ring =C< : 5 | >C=O : 1 | aromatic ring =CH- : 7 | =CH- : 2 | -OH : 3 | Origin : 1 | OCCC : 2 | CCCC : 1" + "-140.26","OC([O-])=O", // 399,"hco3|bicarbonate|","HCO3 : 1" + "-32.43","CCC=O", // 400,"propanal|","-CH3 : 1 | -CH2- : 1 | -CH=O : 1 | Origin : 1" + "-146.69","[O-]C(=O)C1=NC(=O)NC(=O)N1", // 406,"oxonic-acid|","ring >C=O : 2 | ring =C< : 1 | -COO : 1 | ring =N- : 1 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCN : 1 | OCNC : 1" + "33.64","Nc1ccccc1", // 412,"aniline|","aromatic ring =CH- : 5 | aromatic ring =C< : 1 | -NH2 : 1 | Origin : 1" + "-25.26","CC(=O)OCC[N+](C)(C)C", // 413,"acetylcholine|","-CH3 : 4 | >N< : 1 | -CH2- : 2 | -O-CO- : 1 | Origin : 1" + "-41.91","CCCO", // 449,"n-propanol|","-CH3 : 1 | -CH2- : 2 | -OH : 1 | Origin : 1" + "-311.41","OP([O-])(=O)NC(=[N+])NCCS([O-])(=O)=O", // 452,"phosphotaurocyamine|","-OPO2 : 1 | -NH- : 2 | =C< : 1 | =NH2 : 1 | -CH2- : 2 | -SO3 : 1 | Origin : 1" + "-45.29","[N+]CC(N)=O", // 459,"glycinamide|","-NH3 : 1 | -CH2- : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" + "-84.04","[N+]CCCCC([N+])C([O-])=O", // 465,"lysine|","-COO : 1 | -CH2- : 4 | >CH- : 1 | -NH3 : 2 | Origin : 1" + "-80.46","[O-]C(=O)CNC(=O)Cc1ccccc1", // 471,"phenylacetylglycine|","-COO : 1 | -CH2- : 2 | >C=O : 1 | aromatic ring =C< : 1 | aromatic ring =CH- : 5 | amide : 1 | -NH- : 1 | Origin : 1" + "-320.66","OCC(=O)COP([O-])([O-])=O", // 476,"glycerone-phosphate|","-OH : 1 | -CH2- : 2 | >C=O : 1 | -OPO3 : 1 | Origin : 1" + "-78.65","CCCCCCC([O-])=O", // 490,"heptanoate|","-CH3 : 1 | -CH2- : 5 | -COO : 1 | Origin : 1" + "-23.3","[O-]C#N", // 523,"cyanate|","#C- : 1 | #N : 1 | -Oneg : 1 | Origin : 1" + "-161","OC(=O)C([O-])=O", // 524,"oxalate|","oxalate : 1" + "-4.07","CC", // 525,"ethane|","ethane : 1" + "-88.29","CC([O-])=O", // 526,"acetate|ac|","acetate : 1" + "-43.44","CCO", // 527,"ethanol|etoh|","ethanol : 1" + "-83.51","CCCC([O-])=O", // 530,"butyrate|but|","-CH2- : 2 | -COO : 1 | -CH3 : 1 | Origin : 1" + "-81.89","CCCCC([O-])=O", // 531,"valerate|","-CH2- : 3 | -COO : 1 | -CH3 : 1 | Origin : 1" + "-64.98","[O-]C(=O)C=C", // 532,"acrylate|","-COO : 1 | =CH- : 1 | =CH2 : 1 | Origin : 1 | OCCC : 1" + "-62.7","C(C)=CC([O-])=O", // 533,"crotonate|","-CH3 : 1 | =CH- : 2 | -COO : 1 | Origin : 1 | OCCC : 1" + "-83.39","[N+]C(CS)C([O-])=O", // 536,"cysteine|cys-L|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | -SH : 1 | Origin : 1" + "-159.61","[N+]C(CSSCC([N+])C([O-])=O)C([O-])=O", // 537,"cystine|",">CH- : 2 | -CH2- : 2 | -COO : 2 | -NH3 : 2 | -S-S- : 1 | Origin : 1" + "-6.19","CN1CC(=O)NC1=N", // 539,"creatinine|","ring >C= : 1 | ring -N< : 1 | =NH : 1 | ring -CH2- : 1 | -CH3 : 1 | ring >C=O : 1 | amide : 1 | ring -NH- : 1 | Origin : 1" + "-9.55","CN", // 541,"methylamine|","methylamine : 1" + "-1.35","[N+](C)C", // 542,"dimethylamine|","-CH3 : 2 | -NH2- : 1 | Origin : 1" + "4.55","C[N+](C)C", // 543,"trimethylamine|","-CH3 : 3 | -NH< : 1 | Origin : 1" + "44.52","c1ccncc1", // 544,"pyridine|","ring =CH- : 5 | ring =N- : 1 | Origin : 1 | heteroaromatic : 1" + "-201","OC(CC([O-])=O)C([O-])=O", // 545,"malate|mal-L|",">CH- : 1 | -CH2- : 1 | -COO : 2 | -OH : 1 | Origin : 1" + "-319.2","[H]C(=O)C(O)COP([O-])([O-])=O", // 548,"glyceraldehyde-3-phosphate|g3p|","-OPO3 : 1 | -CH2- : 1 | >CH- : 1 | -CH=O : 1 | -OH : 1 | Origin : 1" + "-118.31","[N+]CC(=O)NCC([O-])=O", // 549,"glycylglycine|",">C=O : 1 | -CH2- : 2 | -NH3 : 1 | -COO : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-268.54","[O-]C(=O)CC(C([O-])=O)C(=O)C([O-])=O", // 551,"oxalosuccinate|",">CH- : 1 | >C=O : 1 | -CH2- : 1 | -COO : 3 | Origin : 1 | OCCO : 1" + "-8.21","C", // 556,"ch4|methane|","methane : 1" + "33.26","c1ccccc1", // 561,"benzene|","aromatic ring =CH- : 6 | Origin : 1 | Hydrocarbon : 1" + +// proton filling not needed and not working here.. :/ +// "-1.1","[Fe+3]", // 567,"fe3|Fe3+|","Fe3 : 1" + + "-83.7","CC(C)CC([O-])=O", // 570,"isovalerate|","-CH2- : 1 | >CH- : 1 | -COO : 1 | -CH3 : 2 | Origin : 1" + "30.6","NN", // 575,"n2h4|","N2H4 : 1" + "-122.7","OS(S)(=O)=O", // 577,"s2o3|tsul|","S2O3H : 1" + "-143.5","OS(=O)S(O)=O", // 578,"s2o4|","S2O4 : 1" + "-229","OS(=O)(=O)SS(O)(=O)=O", // 579,"s3o6|","S3O6 : 1" + "-241.82","[O-]S(=O)(=O)SSS([O-])(=O)=O", // 580,"s4o6|","-SO3 : 2 | -S-S- : 1 | Origin : 1" + "27.62","C1CC1", // 583,"cyclopropane|","ring -CH2- : 3 | Origin : 1 | Hydrocarbon : 1 | threemember : 1" + "206.47","CC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCCC(C)=CCC1=CC(=O)c2ccccc2C1=O", // 589,"2dmmq8|2-Demethylmenaquinone-8|","aromatic ring fused to nonaromatic ring >C= : 2 | ring >C=O : 2 | aromatic ring =CH- : 4 | ring =C< : 1 | ring =CH- : 1 | -CH2- : 15 | =CH- : 8 | =C< : 8 | -CH3 : 9 | Origin : 1 | OCCC : 4" + "-12.6","[H]C([H])([H])Cl", // 594,"chloromethane|","chloromethane : 1" + "-15.8","[H]C([H])(Cl)Cl", // 595,"dichloromethane|","dichloromethane : 1" + "-15.9","[H]C(Cl)(Cl)Cl", // 596,"trichloromethane|","trichloromethane : 1" + "-10.8","ClC(Cl)(Cl)Cl", // 597,"tetrachloromethane|","tetrachloromethane : 1" + "-13.73","CCCl", // 598,"chloroethane|","-CH3 : 1 | -CH2- : 1 | primary -Cl : 1 | Origin : 1" + "-18.24","ClCCCl", // 599,"1,2-dichloroethane|","-CH2- : 2 | primary -Cl : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "-20.16","ClCC(Cl)Cl", // 601,"1,1,2-trichloroethane|","primary Cl2 : 2 | >CH- : 1 | primary -Cl : 1 | -CH2- : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "-20.16","ClC(Cl)C(Cl)Cl", // 602,"1,1,2,2-tetrachloroethane|","primary Cl2 : 4 | >CH- : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 2" + "-13.18","CC(Cl)(Cl)Cl", // 603,"1,1,1-trichloroethane|","primary Cl3 : 3 | -CH3 : 1 | >C< : 1 | Origin : 1" + "-17.69","ClCC(Cl)(Cl)Cl", // 604,"1,1,1,2-tetrachloroethane|","primary Cl3 : 3 | >C< : 1 | -CH2- : 1 | primary -Cl : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "-13.3","ClC(Cl)(Cl)C(Cl)(Cl)Cl", // 606,"hexachloroethane|","primary Cl3 : 6 | >C< : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 3" + "-2","CCC", // 607,"propane|","-CH3 : 2 | -CH2- : 1 | Origin : 1 | Hydrocarbon : 1" + "-0.38","CCCC", // 612,"butane|","-CH3 : 2 | -CH2- : 2 | Origin : 1 | Hydrocarbon : 1" + "1.24","CCCCC", // 615,"pentane|","-CH2- : 3 | -CH3 : 2 | Origin : 1 | Hydrocarbon : 1" + "8.21","ClC(Cl)=C", // 621,"1,1-dichloroethylene|","secondary Cl2 : 2 | =CH2 : 1 | =C< : 1 | Origin : 1" + "6.52","ClC(Cl)=C(Cl)Cl", // 623,"tetrachloroethylene|","secondary Cl2 : 4 | =C< : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 2" + "24.22","Clc1ccccc1", // 624,"monochlorobenzene|","aromatic ring =CH- : 5 | aromatic ring =C< : 1 | tertiary -Cl : 1 | Origin : 1" + "20.78","Clc1ccccc1Cl", // 625,"1,2-dichlorobenzene|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | tertiary -Cl : 2 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "18.86","Clc1cccc(Cl)c1", // 626,"1,3-dichlorobenzene|","aromatic ring =C< : 2 | tertiary -Cl : 2 | aromatic ring =CH- : 4 | Origin : 1" + "18.86","Clc1ccc(Cl)cc1", // 627,"1,4-dichlorobenzene|","aromatic ring =C< : 2 | tertiary -Cl : 2 | aromatic ring =CH- : 4 | Origin : 1" + "17.34","Clc1cccc(Cl)c1Cl", // 628,"1,2,3-trichlorobenzene|","aromatic ring =CH- : 3 | aromatic ring =C< : 3 | tertiary -Cl : 3 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" + "15.42","Clc1ccc(Cl)c(Cl)c1", // 629,"1,2,4-trichlorobenzene|","aromatic ring =C< : 3 | tertiary -Cl : 3 | aromatic ring =CH- : 3 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "13.5","Clc1cc(Cl)cc(Cl)c1", // 630,"1,3,5-trichlorobenzene|","aromatic ring =C< : 3 | tertiary -Cl : 3 | aromatic ring =CH- : 3 | Origin : 1" + "13.9","Clc1ccc(Cl)c(Cl)c1Cl", // 631,"1,2,3,4-tetrachlorobenzene|","aromatic ring =CH- : 2 | aromatic ring =C< : 4 | tertiary -Cl : 4 | Origin : 1 | BinaryVicinalCl : 3 | DistinctVicinalCl : 3" + "11.98","Clc1cc(Cl)c(Cl)c(Cl)c1", // 632,"1,2,3,5-tetrachlorobenzene|","aromatic ring =C< : 4 | tertiary -Cl : 4 | aromatic ring =CH- : 2 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" + "11.98","Clc1cc(Cl)c(Cl)cc1Cl", // 633,"1,2,4,5-tetrachlorobenzene|","aromatic ring =C< : 4 | tertiary -Cl : 4 | aromatic ring =CH- : 2 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" + "10.46","Clc1cc(Cl)c(Cl)c(Cl)c1Cl", // 634,"pentachlorobenzene|","aromatic ring =CH- : 1 | aromatic ring =C< : 5 | tertiary -Cl : 5 | Origin : 1 | BinaryVicinalCl : 4 | DistinctVicinalCl : 4" + "8.94","Clc1c(Cl)c(Cl)c(Cl)c(Cl)c1Cl", // 635,"hexachlorobenzene|","aromatic ring =C< : 6 | tertiary -Cl : 6 | Origin : 1 | BinaryVicinalCl : 6 | DistinctVicinalCl : 6" + "-58.41","[O-]C(=O)c1ccccc1Cl", // 636,"2-chlorobenzoate|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -COO : 1 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" + "-58.41","[O-]C(=O)c1cccc(Cl)c1", // 637,"3-chlorobenzoate|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -COO : 1 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" + "-58.41","[O-]C(=O)c1ccc(Cl)cc1", // 638,"4-chlorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1 | OCCC : 1" + "-63.77","[O-]C(=O)c1ccc(Cl)cc1Cl", // 640,"2,4-dichlorobenzoate|","aromatic ring =C< : 3 | -COO : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1" + "-63.77","[O-]C(=O)c1c(Cl)cccc1Cl", // 642,"2,6-dichlorobenzoate|","aromatic ring =C< : 3 | -COO : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1" + "-61.85","[O-]C(=O)c1c([H])c([H])c(Cl)c(Cl)c1[H]", // 643,"3,4-dichlorobenzoate|","aromatic ring =CH- : 3 | aromatic ring =C< : 3 | -COO : 1 | tertiary -Cl : 2 | Origin : 1 | OCCC : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "-94.03","[O-]C(=O)c1ccccc1F", // 650,"2-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" + "-94.03","[O-]C(=O)c1cccc(F)c1", // 651,"3-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" + "-94.03","[O-]C(=O)c1ccc(F)cc1", // 652,"4-fluorobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -F : 1 | Origin : 1 | OCCC : 1" + "-34.43","[O-]C(=O)c1ccccc1I", // 653,"2-iodobenzoate|","aromatic ring =C< : 2 | -COO : 1 | aromatic ring =CH- : 4 | aromatic -I : 1 | Origin : 1 | OCCC : 1" + "-15.26","Oc1ccccc1Cl", // 659,"2-chlorophenol|","aromatic ring =CH- : 4 | aromatic ring =C< : 2 | -OH : 1 | tertiary -Cl : 1 | Origin : 1" + "-15.26","Oc1cccc(Cl)c1", // 660,"3-chlorophenol|","aromatic ring =C< : 2 | -OH : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1" + "-15.26","Oc1ccc(Cl)cc1", // 661,"4-chlorophenol|","aromatic ring =C< : 2 | -OH : 1 | aromatic ring =CH- : 4 | tertiary -Cl : 1 | Origin : 1" + "-20.62","Oc1ccc(Cl)cc1Cl", // 663,"2,4-dichlorophenol|","aromatic ring =C< : 3 | -OH : 1 | tertiary -Cl : 2 | aromatic ring =CH- : 3 | Origin : 1" + "-20.62","Oc1cc(Cl)ccc1Cl", // 664,"2,5-dichlorophenol|","aromatic ring =C< : 3 | -OH : 1 | aromatic ring =CH- : 3 | tertiary -Cl : 2 | Origin : 1" + "-11.92","[O-]c1c(Cl)cccc1Cl", // 665,"2,6-dichlorophenol|","aromatic ring =C< : 3 | tertiary -Cl : 2 | aromatic ring =CH- : 3 | -Oneg : 1 | Origin : 1" + "-24.06","Oc1cc(Cl)c(Cl)cc1Cl", // 669,"2,4,5-trichlorophenol|","aromatic ring =C< : 4 | -OH : 1 | aromatic ring =CH- : 2 | tertiary -Cl : 3 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + "-17.28","[O-]c1c(Cl)cc(Cl)cc1Cl", // 670,"2,4,6-trichlorophenol|","aromatic ring =C< : 4 | tertiary -Cl : 3 | aromatic ring =CH- : 2 | -Oneg : 1 | Origin : 1" + "-18.8","[O-]c1c(Cl)c(Cl)cc(Cl)c1Cl", // 676,"2,3,5,6-tetrachlorophenol|","aromatic ring =C< : 5 | tertiary -Cl : 4 | aromatic ring =CH- : 1 | -Oneg : 1 | Origin : 1 | BinaryVicinalCl : 2 | DistinctVicinalCl : 2" + "-20.32","[O-]c1c(Cl)c(Cl)c(Cl)c(Cl)c1Cl", // 677,"pentachlorophenol|","aromatic ring =C< : 6 | tertiary -Cl : 5 | -Oneg : 1 | Origin : 1 | BinaryVicinalCl : 4 | DistinctVicinalCl : 4" + "-121.26","SCCS([O-])(=O)=O", // 678,"CoM|coenzyme-M|","-SO3 : 1 | -CH2- : 2 | -SH : 1 | Origin : 1" + "-115.39","CSCCS([O-])(=O)=O", // 679,"methyl-CoM|methyl-coenzyme-M|","-SO3 : 1 | -CH2- : 2 | -S- : 1 | -CH3 : 1 | Origin : 1" + + "-529.59","NC(=O)c1ccc[n+](c1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 1,"NAD(+)|nad+|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 8 | ring =CH- : 6 | ring =N- : 3 | ring -O- : 2 | ring =C< : 2 | -OH : 4 | -NH2 : 2 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | dbl sgl ring =N< : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 3" + "-524.32","NC(=O)C1=CN(C=CC1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 2,"NADH|nadh|","ring -N< : 2 | two fused rings >C= : 2 | ring -CH< : 8 | ring =CH- : 5 | ring =N- : 3 | ring -O- : 2 | ring =C< : 2 | -OH : 4 | -NH2 : 2 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH2- : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2 | NADH : 1" + "-736.82","NC(=O)C1=CN(C=CC1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(OP([O-])([O-])=O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 3,"NADPH|","ring -CH< : 8 | ring -N< : 2 | ring -O- : 2 | two fused rings >C= : 2 | ring =CH- : 5 | -OPO3 : 1 | ring =N- : 3 | -OH : 3 | -CH2- : 2 | ring =C< : 2 | -OPO3- : 1 | -NH2 : 2 | -OPO2- : 1 | ring -CH2- : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2 | NADH : 1" + "-742.09","NC(=O)c1ccc[n+](c1)C1OC(COP([O-])(=O)OP([O-])(=O)OCC2OC(C(OP([O-])([O-])=O)C2O)n2cnc3c(N)ncnc23)C(O)C1O", // 4,"NADP(+)|","ring -CH< : 8 | ring -N< : 1 | ring -O- : 2 | two fused rings >C= : 2 | ring =CH- : 6 | -OPO3 : 1 | ring =N- : 3 | -OH : 3 | -CH2- : 2 | ring =C< : 2 | -OPO3- : 1 | -NH2 : 2 | -OPO2- : 1 | dbl sgl ring =N< : 1 | >C=O : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 3" + "-751.99","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n2cnc3c(N)ncnc23)C(O)C(=O)NCCC(=O)NCCS", // 7,"Coenzyme A|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -SH : 1 | amide : 2 | -NH- : 2 | Origin : 1 | heteroaromatic : 2 | COA : 1" + "-605.77","C(OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(=O)NC2(=O)))", // 10,"UDP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + +// only 2 heteroaromatic rings by jankowski +// "-538.18","Cc1cc2Nc3c([nH]c(=O)[nH]c3=O)N(CC(O)C(O)C(O)COP([O-])(=O)OP([O-])(=O)OCC3OC(C(O)C3O)n3cnc4c(N)ncnc34)c2cc1C", // 11,"FADH2|","ring -N< : 2 | two fused rings >C= : 4 | aromatic ring fused to nonaromatic ring >C= : 2 | -CH2- : 3 | aromatic ring =CH- : 2 | >CH- : 3 | ring -NH- : 3 | ring >C=O : 2 | aromatic ring =C< : 2 | -OH : 5 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH< : 4 | ring -O- : 1 | ring =CH- : 2 | ring =N- : 3 | ring =C< : 1 | -NH2 : 1 | amide : 2 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" + + "-257.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])([O-])=O)C(O)C1O", // 13,"AMP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" + "-76.11","[N+]C(CCSCC1OC(C(O)C1O)n1cnc2c(N)ncnc12)C([O-])=O", // 14,"S-adenosyl-L-homocysteine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 3 | -S- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 2" + "-785.83","CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 16,"acetyl-CoA|accoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + +// only 1 heteroaromatic ring by jankowski +// no OCCC match -> double bond in larger heteroring? + "-516.3","N1=C(N)NC(=O)c2ncn(C3OC(COP([O-])(=O)OP([O-])([O-])=O)C(O)C3O)c21", // 19,"GDP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-756.9","C(C1(C(C(C(O1)N2(C=CC(NC2=O)=O))O)O))OP(OP(OC3(C(C(C(C(O3)CO)O)O)NC(C)=O))([O-])=O)([O-])=O", // 24,"UDP-N-acetyl-D-glucosamine|","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 2 | ring =CH- : 2 | -OH : 5 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | >C=O : 1 | -CH3 : 1 | amide : 3 | ring -N< : 1 | ring -NH- : 1 | -NH- : 1 | Origin : 1 | OCCC : 1" + +// only 1 heteroaromatic ring by jankowski +// "-724.3","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 25,"GTP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | ring =C< : 1 | -OH : 2 | -NH2 : 1 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-165.75","[NH3+]C(CC([O-])=O)C([O-])=O", // 27,"L-aspartate|asp-L|",">CH- : 1 | -CH2- : 1 | -COO : 2 | -NH3 : 1 | Origin : 1" + "-220.95","[N+]C(CCC(=O)NC(CS)C(=O)NCC([O-])=O)C([O-])=O", // 28,"reduced-glutathione|",">CH- : 2 | >C=O : 2 | -CH2- : 4 | -SH : 1 | -COO : 2 | -NH3 : 1 | amide : 2 | -NH- : 2 | Origin : 1" + "-762.55","C2(C(O)C(O)C(COP(=O)([O-])OP(=O)(OC1(OC(CO)C(O)C(O)C1(O)))[O-])O2)N3(C=CC(=O)NC3(=O))", // 29,"UDPgalactose|UDPglucose|","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 2 | ring =CH- : 2 | -OH : 6 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-345.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP([O-])([O-])=O", // 31,"CMP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO3 : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-346.33","C12(N(CC(O)C(O)C(O)COP([O-])(=O)[O-])c3(c(NC=2(C(=O)NC(=O)N1))cc(C)c(C)c3))", // 34,"FMNH2|fmnred|","ring -N< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | two fused rings >C= : 2 | -CH2- : 2 | aromatic ring =CH- : 2 | >CH- : 3 | ring -NH- : 3 | aromatic ring =C< : 2 | ring >C=O : 2 | -OH : 3 | -CH3 : 2 | -OPO3 : 1 | amide : 2 | Origin : 1 | OCCC : 1" + "-73.77","[N+]C(CCCNC(N)=[N+])C([O-])=O", // 35,"L-arginine|arg|","-CH2- : 3 | >CH- : 1 | -COO : 1 | -NH3 : 1 | -NH- : 1 | =C< : 1 | -NH2 : 1 | =NH2 : 1 | Origin : 1" + "-761.38","C(OP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(N)=NC2(=O)))", // 36,"CTP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO2- : 2 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-121.69","[N+]C(CCC(N)=O)C([O-])=O", // 37,"L-glutamine|gln-L|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" + "-75.91","CSCCC([N+])C([O-])=O", // 39,"L-methionine|met-L|",">CH- : 1 | -COO : 1 | -CH2- : 2 | -NH3 : 1 | -S- : 1 | -CH3 : 1 | Origin : 1" + "-813.77","C(OP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])C1(OC(C(O)C1(O))N2(C=CC(=O)NC2(=O)))", // 41,"UTP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-25","[N+]C(Cc1c[nH]c2ccccc12)C([O-])=O", // 42,"L-tryptophan|trp-L|","aromatic ring fused to nonaromatic ring >C= : 2 | ring =C< : 1 | aromatic ring =CH- : 4 | -CH2- : 1 | ring =CH- : 1 | ring -NH- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 1" + "-51.05","[N+]C(Cc1ccccc1)C([O-])=O", // 43,"L-phenylalanine|phe-L|","aromatic ring =C< : 1 | -CH2- : 1 | aromatic ring =CH- : 5 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-729.58","OC1C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 45,"ITP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-90.53","[N+]C(Cc1ccc(O)cc1)C([O-])=O", // 46,"L-tyrosine|tyr-L|",">CH- : 1 | -COO : 1 | -CH2- : 1 | -NH3 : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -OH : 1 | Origin : 1" + "-863.66","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)CC([O-])=O", // 47,"malonyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-431.67","C(OP(=O)([O-])[O-])C1(OC(O)(CO)C(O)C1(O))", // 49,"D-fructose 6-phosphate|","ring -CH< : 3 | ring -O- : 1 | -CH2- : 2 | ring >C< : 1 | -OH : 4 | -OPO3 : 1 | Origin : 1" + "-377.65","OCC1OC(OC2(CO)OC(CO)C(O)C2O)C(O)C(O)C1O", // 51,"sucrose|sucr|","ring >C< : 1 | -O- : 1 | ring -O- : 2 | ring -CH< : 8 | -CH2- : 3 | -OH : 8 | Origin : 1" + "-862.04","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)CCC([O-])=O", // 52,"succinyl-CoA|succoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 8 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + +// only 1 heteroaromatic ring by jankowski +// "-521.58","OC1C(COP([O-])(=O)OP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 56,"IDP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-397.77","C(OP([O-])([O-])=O)C1OC(N2C=CC(=O)NC2(=O))C(O)C1(O)", // 57,"UMP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-553.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP([O-])([O-])=O)([O-])=O", // 60,"CDP|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO2- : 1 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-394.12","C(OP([O-])(=O)[O-])C1(C(O)C(O)C(O)O1)", // 63,"D-ribose 5-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 4 | ring -O- : 1 | -OH : 3 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-313.58","OC1C(COP([O-])([O-])=O)OC(C1O)n1cnc2c1nc[nH]c2=O", // 69,"IMP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-634.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)O1", // 70,"dATP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 2 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" + "-45.63","[N+]C(Cc1c[nH]cn1)C([O-])=O", // 73,"L-histidine|","ring =C< : 1 | -CH2- : 1 | ring =CH- : 2 | ring =N- : 1 | >CH- : 1 | ring -NH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1 | heteroaromatic : 1" + "-219.96","OC1C(O)C(O)C(O)C(O)C1O", // 74,"myo-inositol|","ring -CH< : 6 | -OH : 6 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-308.3","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])([O-])=O)C(O)C1O", // 75,"GMP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 4 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | -NH2 : 1 | -OH : 2 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-62.54","[O-]C(=O)C1CCCN1", // 78,"S-proline|","ring -CH< : 1 | -COO : 1 | ring -CH2- : 3 | ring -NH- : 1 | Origin : 1" + "-123.31","[N+]C(CC(N)=O)C([O-])=O", // 79,"L-asparagine|asn-L|",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1" + "-763.15","CCCCCCCCCCCCCCCC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 81,"palmitoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 20 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-81.77","[N+]C(CCS)C([O-])=O", // 82,"L-homocysteine|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | -SH : 1 | Origin : 1" + "-86.49","CC(C)C([N+])C([O-])=O", // 89,"L-valine|val-L|",">CH- : 2 | -COO : 1 | -NH3 : 1 | -CH3 : 2 | Origin : 1" + "-124.34","CC(O)C([N+])C([O-])=O", // 91,"L-threonine|thr-L|",">CH- : 2 | -COO : 1 | -NH3 : 1 | -CH3 : 1 | -OH : 1 | Origin : 1" + "-216.02","OCC1OC(=O)C(O)C(O)C1O", // 93,"D-glucono-1,5-lactone|","ring -CH< : 4 | ring -O-CO- : 1 | -CH2- : 1 | -OH : 4 | Origin : 1" + "-426.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])(=O)OP([O-])([O-])=O)O1", // 94,"dADP|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" + "-45.35","Nc1ncnc2n(cnc12)C1OC(CO)C(O)C1O", // 96,"adenosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 3 | -NH2 : 1 | -CH2- : 1 | Origin : 1 | heteroaromatic : 2" + "-164.13","[NH3+]C(CCC([O-])=O)C([O-])=O", // 97,"D-glutamate|glu-L|",">CH- : 1 | -CH2- : 2 | -COO : 2 | -NH3 : 1 | Origin : 1" + +// wrong SMILES -> no -COO group by jankowski +// "-586.8","OC(=O)C(COP([O-])([O-])=O)OP([O-])([O-])=O", // 103,"2,3-bisphospho-D-glyceric acid|1,3-bpg|","-CO-OPO3- : 1 | >CH- : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | Origin : 1" + + "-305.54","C(C2(C(CC(N1(C(N=C(C=C1)N)=O))O2)O))OP([O-])([O-])=O", // 104,"dCMP|","ring -CH< : 3 | ring >C=O : 1 | ring =CH- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring =N- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -NH2 : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-169.49","OC1C=CC(=CC1OC(=C)C([O-])=O)C([O-])=O", // 108,"chorismate|","ring -CH< : 2 | ring =CH- : 3 | -O- : 1 | ring =C< : 1 | -OH : 1 | =C< : 1 | -COO : 2 | =CH2 : 1 | Origin : 1 | OCCC : 2 | CCCC : 1" + "-268.66","OCC(O)C(O)C(O)C(O)C([O-])=O", // 110,"D-gluconate|glcn|",">CH- : 4 | -OH : 5 | -COO : 1 | -CH2- : 1 | Origin : 1" + "-122.53","[N+]C(CCO)C([O-])=O", // 114,"L-homoserine|",">CH- : 1 | -CH2- : 2 | -COO : 1 | -NH3 : 1 | -OH : 1 | Origin : 1" + "-326.4","[H]C1(OC(O)(CC(O)C1NC(C)=O)C([O-])=O)C(O)C(O)CO", // 116,"N-acetylneuraminate|","ring -CH< : 3 | ring -O- : 1 | >CH- : 2 | ring >C< : 1 | -OH : 5 | ring -CH2- : 1 | >C=O : 1 | -COO : 1 | -CH2- : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-209.4","OCC(=O)C(O)C(O)C(=O)CO", // 117,"5-dehydro-D-fructose|",">CH- : 2 | >C=O : 2 | -OH : 4 | -CH2- : 2 | Origin : 1" + "-355.62","[H]C(=O)C(O)C(O)COP([O-])([O-])=O", // 118,"D-erythrose-4-phosphate|","-OPO3 : 1 | -CH2- : 1 | >CH- : 2 | -OH : 2 | -CH=O : 1 | Origin : 1" + "-18.43","[H]C12CCC3=CC(=O)CCC3(C)C1([H])CCC1(C)C(=O)CCC21[H]", // 119,"4-androstene-3,17-dione|","two fused rings >CH- : 3 | ring -CH2- : 8 | two fused rings >C< : 2 | two fused rings >C= : 1 | -CH3 : 2 | ring >C=O : 2 | ring =CH- : 1 | Origin : 1 | OCCC : 1" + +// only 1 heteroaromatic ring by jankowski +// "-101.08","OCC1OC(C(O)C1O)n1cnc2c(O)ncnc12", // 121,"inosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring >C=O : 1 | -OH : 3 | -CH2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-185.27","OCC1OC(C(O)C1O)N2C=CC(=O)NC2=O", // 124,"uridine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 2 | ring =CH- : 2 | -OH : 3 | -CH2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-479.69","C(OP([O-])(=O)OP(OCC[N+](C)(C)C)([O-])=O)C1(OC(C(O)C1(O))N2(C=CC(=NC2=O)N))", // 126,"CDP-choline|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 3 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | >N< : 1 | -CH3 : 3 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-862.82","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)C([O-])=O", // 128,"oxalyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCO : 1 | heteroaromatic : 2" + "-123.87","[N+]C(CCCNC(N)=O)C([O-])=O", // 129,"L-citrulline|citr-L|","-CH2- : 3 | >CH- : 1 | -COO : 1 | -NH3 : 1 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" + "-812.61","CC(=O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 131,"acetoacetyl-CoA|aacoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 4 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-261.5","OC1OC(C(O)C(O)C1O)C([O-])=O", // 132,"α-D-galacturonate|CHEBI:58658","ring -CH< : 5 | ring -O- : 1 | -COO : 1 | -OH : 4 | Origin : 1" + "-151.52","[O-]C(=O)C1CC(=O)NC(=O)N1", // 133,"S-dihydroorotate|","ring -CH< : 1 | ring -CH2- : 1 | -COO : 1 | ring >C=O : 2 | amide : 2 | ring -NH- : 2 | Origin : 1" + "-481.16","OC(COP([O-])([O-])=O)C(O)C(O)C(O)C([O-])=O", // 136,"6-phospho-D-gluconate|","-OPO3 : 1 | -CH2- : 1 | >CH- : 4 | -OH : 4 | -COO : 1 | Origin : 1" + "-395.53","C(OP(=O)([O-])[O-])C1(OC(O)C([N+])C(O)C1(O))", // 138,"D-glucosamine-6-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -NH3 : 1 | Origin : 1" + "-644.17","C(C1(C(C(C(O1)(COP([O-])([O-])=O)O)O)O))OP([O-])([O-])=O", // 139,"D-fructose-1,6-bisphosphate|","ring >C< : 1 | ring -O- : 1 | ring -CH< : 3 | -CH2- : 2 | -OH : 3 | -OPO3 : 2 | Origin : 1" + "-376.76","OCC1OC(OC2C(O)C(O)OC(CO)C2O)C(O)C(O)C1O", // 140,"laminaribiose|beta-laminaribiose|","ring -CH< : 10 | -O- : 1 | -OH : 8 | ring -O- : 2 | -CH2- : 2 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-476.46","Nc1nc2n(cnc2c(=O)[nH]1)C1CC(O)C(COP([O-])(=O)OP([O-])([O-])=O)O1", // 141,"dGDP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 3 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | ring -CH2- : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" +// "-268.46","Nc1nc2n(cnc2c(=O)[nH]1)C1CC(O)C(COP([O-])([O-])=O)O1", // 142,"dGMP|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 3 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | ring -CH2- : 1 | -NH2 : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-566.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])OP(=O)([O-])[O-])O2))", // 143,"dTDP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-358.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])[O-])O2))", // 144,"dTMP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + +// only 1 heteroaromatic ring by jankowski +// "-95.8","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(CO)C(O)C1O", // 149,"guanosine|","two fused rings >C= : 2 | ring -N< : 1 | ring =N- : 2 | ring -CH< : 4 | ring =CH- : 1 | ring >C=O : 1 | ring =C< : 1 | ring -O- : 1 | -NH2 : 1 | -OH : 3 | -CH2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-115.26","CC(=O)NC(CCC[N+])C([O-])=O", // 153,"N2-acetyl-L-ornithine|CHEBI:16543",">CH- : 1 | -COO : 1 | -CH2- : 3 | >C=O : 1 | -CH3 : 1 | -NH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-203.96","NC(=O)NC(CC([O-])=O)C([O-])=O", // 154,"N-carbamoyl-L-aspartate|",">CH- : 1 | -CH2- : 1 | -COO : 2 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" + "-157.18","[H]C(=[N+])NC(CCC(O)=O)C([O-])=O", // 155,"N-formimino-L-glutamate|",">CH- : 1 | -CH2- : 2 | -NH- : 1 | -COO : 2 | =CH- : 1 | =NH2 : 1 | Origin : 1" + "-113.05","[H]C(=O)CC([N+])C([O-])=O", // 156,"L-aspartate-4-semialdehyde|",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -CH=O : 1 | Origin : 1" + "-337.74","NC(=O)c1ccc[n+](c1)C1OC(COP(O)([O-])=O)C(O)C1O", // 157,"beta-nicotinamide-mononucleotide|CHEBI:16171","ring -CH< : 4 | dbl sgl ring =N< : 1 | ring -O- : 1 | ring =CH- : 4 | -OH : 2 | ring =C< : 1 | -CH2- : 1 | >C=O : 1 | -OPO3 : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" + "-774.34","CC1(=CN(C(=O)NC1(=O))C2(CC(O)C(COP(=O)([O-])OP(=O)([O-])OP(=O)([O-])[O-])O2))", // 158,"dTTP|","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -CH3 : 1 | -OPO2- : 2 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-16.98","[H]C12CCC3(C)C(=O)CCC3([H])C1([H])CCc1cc(O)ccc21", // 159,"estrone|","two fused rings >CH- : 3 | two fused rings >C< : 1 | ring -CH2- : 6 | ring >C=O : 1 | -CH3 : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | aromatic ring =CH- : 3 | aromatic ring =C< : 1 | -OH : 1 | Origin : 1" + "-132.88","C1(N=C(C=CN1C2(C(O)C(O)C(CO)O2))N)(=O)", // 161,"cytidine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 3 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-536.13","OCC1OC(OCC2OC(OC3(CO)OC(CO)C(O)C3O)C(O)C(O)C2O)C(O)C(O)C1O", // 165,"raffinose|","ring >C< : 1 | -O- : 2 | ring -O- : 3 | ring -CH< : 13 | -CH2- : 4 | -OH : 11 | Origin : 1" + "-171.29","OC1CC(=CC(O)C1O)C([O-])=O", // 166,"shikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring -CH< : 3 | -OH : 3 | Origin : 1 | OCCC : 1" + "-622.63","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])(=O)OC2OC(CO)C(O)C(O)C2O)C(O)C1O", // 167,"ADPglucose|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 9 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 2 | ring =C< : 1 | -OH : 6 | -NH2 : 1 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | Origin : 1 | heteroaromatic : 2" + "-710.16","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP(OC3(C(C(C(C(O3)CO)O)O)O))([O-])=O)([O-])=O", // 169,"CDPglucose|CHEBI:58660","ring -CH< : 9 | ring -O- : 2 | ring >C=O : 1 | ring =CH- : 2 | -OH : 6 | ring =N- : 1 | -CH2- : 2 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-189.02","OCC(O)C(O)C(O)CO", // 172,"arabitol|xylitol|ribitol|",">CH- : 3 | -OH : 5 | -CH2- : 2 | Origin : 1" + "-83.86","NC(C(O)=O)c1ccc(O)cc1", // 174,"D-4-hydroxyphenylglycine|","-COO : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >CH- : 1 | -NH2 : 1 | -OH : 1 | Origin : 1" + "-239.04","OC(C(O)C([O-])=O)C([O-])=O", // 175,"meso-tartrate|",">CH- : 2 | -COO : 2 | -OH : 2 | Origin : 1" + "-536.39","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP(OP(OCC[N+])([O-])=O)([O-])=O", // 178,"CDP-ethanolamine|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 3 | ring =C< : 1 | -OPO3- : 1 | -NH2 : 1 | -OPO2- : 1 | -NH3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-191.87","Nc1ncnc2n(cnc12)C1OC2COP([O-])(=O)OC2C1O", // 179,"adenosine-3'5'-cyclicphosphate|CHEBI:17489","ring -N< : 1 | ring -CH< : 2 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 2 | ring =N- : 3 | two fused rings >CH- : 2 | -OH : 1 | ring =C< : 1 | ring -OPO2- : 1 | ring -CH2- : 1 | -NH2 : 1 | Origin : 1 | heteroaromatic : 2" + "-135.27","CCCCCC(O)C=CC1C(O)CC(=O)C1CCCCCCC([O-])=O", // 184,"prostaglandin E1|","ring -CH< : 3 | ring >C=O : 1 | -CH2- : 10 | =CH- : 2 | ring -CH2- : 1 | -OH : 2 | >CH- : 1 | -COO : 1 | -CH3 : 1 | Origin : 1" + "-112.91","CCCCCC(O)C=CC1C(O)CC(=O)C1CC=CCCCC([O-])=O", // 185,"prostaglandin E2|","ring -CH< : 3 | ring >C=O : 1 | -CH2- : 8 | =CH- : 4 | ring -CH2- : 1 | -OH : 2 | >CH- : 1 | -COO : 1 | -CH3 : 1 | Origin : 1" + "-371.9","OC(COP([O-])([O-])=O)C([O-])=O", // 188,"3-phospho-D-glycerate|pg3|CHEBI:17794","-OPO3 : 1 | -CH2- : 1 | >CH- : 1 | -COO : 1 | -OH : 1 | Origin : 1" + "-163.98","NC(=O)NC(O)C([O-])=O", // 189,"--ureidoglycolate|CHEBI:57296",">CH- : 1 | -COO : 1 | -OH : 1 | >C=O : 1 | amide : 2 | -NH- : 1 | -NH2 : 1 | Origin : 1" + "-394.12","OCC1OC(OP([O-])([O-])=O)C(O)C1O", // 190,"D-ribose-1-phosphate|","ring -CH< : 4 | ring -O- : 1 | -OPO3 : 1 | -OH : 3 | -CH2- : 1 | Origin : 1" + "-193.73","CC(=O)NC(CCC([O-])=O)C([O-])=O", // 191,"N-acetyl-L-glutamate|",">CH- : 1 | -CH2- : 2 | -COO : 2 | >C=O : 1 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-371.9","[H]C(CO)(OP([O-])([O-])=O)C([O-])=O", // 192,"2-phospho-D-glycerate|pg2|CHEBI:17835","-OPO3 : 1 | >CH- : 1 | -COO : 1 | -CH2- : 1 | -OH : 1 | Origin : 1" + "-212.63","C(O)C1(OC(O)C(NC(C)=O)C(O)C1(O))", // 194,"N-acetyl-D-mannosamine|N-acetyl-D-glucosamine|","ring -CH< : 5 | -OH : 4 | ring -O- : 1 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-643.28","C(C1(OC(C(C(C1O)O)O)OP(=O)([O-])[O-]))OP(=O)([O-])[O-]", // 195,"D-glucose 1,6-bisphosphate|","-OPO3 : 2 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -CH2- : 1 | Origin : 1" + "-354.28","OCC1OC(CC1O)OP([O-])([O-])=O", // 196,"2-deoxy-alpha-D-ribose-1-phosphate|CHEBI:11563","ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | -OPO3 : 1 | -CH2- : 1 | -OH : 2 | Origin : 1" + "-354.28","C(OP([O-])(=O)[O-])C1(OC(O)CC1(O))", // 197,"2-deoxy-D-ribose-5-phosphate|CHEBI:16132","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 3 | ring -O- : 1 | ring -CH2- : 1 | -OH : 2 | Origin : 1" + "-680.33","CC1(=CN(C(=O)NC1(=O))C3(CC(O)C(COP(=O)([O-])OP(=O)([O-])OC2(OC(C)C(=O)C(O)C2(O)))O3))", // 198,"dTDP-4-dehydro-6-deoxy-D-glucose|CHEBI:16128","ring -CH< : 7 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 3 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 3 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-513.54","C(C2(C(CC(N1(C(N=C(C=C1)N)=O))O2)O))OP(OP(=O)([O-])[O-])([O-])=O", // 199,"dCDP|","ring -CH< : 3 | ring >C=O : 1 | ring =CH- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring =N- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 1 | -NH2 : 1 | -OPO2- : 1 | -OPO3 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-784.18","[H]C(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 203,"formyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -CH=O : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-723.12","CC1(=CN(C(=O)NC1(=O))C3(CC(O)C(COP(=O)([O-])OP(=O)([O-])OC2(OC(CO)C(O)C(O)C2(O)))O3))", // 207,"dTDPglucose|","ring -CH< : 8 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 2 | -OH : 5 | -CH3 : 1 | -OPO3- : 1 | -OPO2- : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + "-761.78","CC=CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 209,"cis-but-2-enoyl-CoA|trans-but-2-enoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | =CH- : 2 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" + "-539.49","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCS", // 210,"3'-dephospho-CoA|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 3 | -NH2 : 1 | -CH2- : 6 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 2 | -SH : 1 | amide : 2 | -NH- : 2 | Origin : 1 | heteroaromatic : 2" + "-169.49","OC1C(OC(=C)C([O-])=O)C=CC=C1C([O-])=O", // 211,"isochorismate|","ring -CH< : 2 | -O- : 1 | ring =CH- : 3 | ring =C< : 1 | -OH : 1 | =C< : 1 | -COO : 2 | =CH2 : 1 | Origin : 1 | OCCC : 2 | CCCC : 1" + "-965.77","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSSCC(NC(=O)CCC([N+])C(O)=O)C(=O)NCC([O-])=O", // 215,"CoA-glutathione|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 10 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 3 | -CH3 : 2 | >C=O : 4 | -S-S- : 1 | -COO : 2 | -NH3 : 1 | amide : 4 | -NH- : 4 | Origin : 1 | heteroaromatic : 2" + +// no heteroaromatic ring by jankowski +// "-280.96","Nc1ccn(C2OC3COP([O-])(=O)OC3C2O)c(=O)n1", // 218,"cytidine-2'3'-cyclicphosphate|CHEBI:17065","ring -CH< : 2 | two fused rings >CH- : 2 | ring -O- : 2 | ring >C=O : 1 | ring =CH- : 2 | ring =N- : 1 | ring -OPO2- : 1 | -CH2- : 1 | ring =C< : 1 | -OH : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + + "-23.54","[H]C12CCC3(C)C(O)CCC3([H])C1([H])CCc1cc(O)ccc21", // 219,"estradiol-17beta|CHEBI:16469","two fused rings >CH- : 3 | two fused rings >C< : 1 | ring -CH2- : 6 | ring -CH< : 1 | -CH3 : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | -OH : 2 | aromatic ring =CH- : 3 | aromatic ring =C< : 1 | Origin : 1" + "-162.51","[NH3+]C(CCCC([O-])=O)C([O-])=O", // 220,"L-2-aminoadipate|","-CH2- : 3 | >CH- : 1 | -COO : 2 | -NH3 : 1 | Origin : 1" + "-161.6","CC(=O)OCC([N+])C([O-])=O", // 222,"acetyl-L-serine|CHEBI:17981",">CH- : 1 | -CH2- : 1 | -COO : 1 | -NH3 : 1 | -O-CO- : 1 | -CH3 : 1 | Origin : 1" + "-376.76","OCC1OC(OC2OC(CO)C(O)C(O)C2O)C(O)C(O)C1O", // 227,"alpha,alpha-trehalose|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -OH : 8 | -CH2- : 2 | Origin : 1" + "-431.67","C(O)C1(OC(O)(COP(=O)([O-])[O-])C(O)C1(O))", // 229,"fructose-1-phosphate|CHEBI:18105","ring >C< : 1 | ring -CH< : 3 | ring -O- : 1 | -CH2- : 2 | -OH : 4 | -OPO3 : 1 | Origin : 1" + "-437.94","OCC(O)C(O)C(O)C(O)COP([O-])([O-])=O", // 230,"sorbitol-6-phosphate|D-mannitol-1-phosphate|",">CH- : 4 | -OH : 5 | -CH2- : 2 | -OPO3 : 1 | Origin : 1" + "-394.55","CC1C(O)C(O)C(O)C(O1)OP([O-])([O-])=O", // 231,"L-fuculose-1-phosphate|CHEBI:16647","-OPO3 : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 3 | -CH3 : 1 | Origin : 1" + "-393.5","OCC(=O)C(O)C(O)COP([O-])([O-])=O", // 232,"ribulose-5-phosphate|xylulose-5-phosphate|xu5p-D|",">CH- : 2 | >C=O : 1 | -OH : 3 | -CH2- : 2 | -OPO3 : 1 | Origin : 1" + "-479.18","C1(=C(C(=O)[O-])N(C(NC1(=O))=O)C2(C(O)C(C(COP([O-])([O-])=O)O2)O))", // 233,"orotidine-5'-phosphate|CHEBI:15842","ring -CH< : 4 | ring -O- : 1 | ring =C< : 1 | ring >C=O : 2 | -OH : 2 | ring =CH- : 1 | -COO : 1 | -CH2- : 1 | -OPO3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 2" + "-370.27","CC(O)(CCOP([O-])([O-])=O)CC([O-])=O", // 234,"5-phosphomevalonate|CHEBI:17436","-CH2- : 3 | >C< : 1 | -COO : 1 | -CH3 : 1 | -OH : 1 | -OPO3 : 1 | Origin : 1" + "-392.04","OC(COP([O-])([O-])=O)C(O)C(O)C=O", // 235,"D-arabinose-5-phosphate|",">CH- : 3 | -OH : 3 | -CH2- : 1 | -CH=O : 1 | -OPO3 : 1 | Origin : 1" + "-430.78","OC1OC(COP([O-])([O-])=O)C(O)C(O)C1O", // 236,"D-galactose-6-phosphate|D-glucose-6-phosphate|D-mannose-6-phosphate|","-OPO3 : 1 | -CH2- : 1 | ring -CH< : 5 | ring -O- : 1 | -OH : 4 | Origin : 1" + "-393.69","CC(O)C(O)C(O)C(=O)COP([O-])([O-])=O", // 238,"L-rhamnulose-1-phosphate|","-OPO3 : 1 | -CH2- : 1 | >C=O : 1 | >CH- : 3 | -OH : 3 | -CH3 : 1 | Origin : 1" + "-85.85","CC([N+])CC([N+])CC([O-])=O", // 242,"L-erythro-3,5-diaminohexanoate|","-CH2- : 2 | >CH- : 2 | -NH3 : 2 | -CH3 : 1 | -COO : 1 | Origin : 1" + "-378.44","OCC1OC(OC2C(O)C(O)C(O)C(O)C2O)C(O)C(O)C1O", // 245,"1-alpha-D-galactosyl-myo-inositol|","ring -CH< : 11 | -O- : 1 | -OH : 9 | ring -O- : 1 | -CH2- : 1 | Origin : 1" + +// only 2 heteroaromatic rings by jankowski +// no OCCC by jankowski +// "-529.37","Cc1cc2nc3c(nc(=O)[nH]c3=O)n(CC(O)C(O)C(O)COP([O-])(=O)OP([O-])(=O)OCC3OC(C(O)C3O)n3cnc4c(N)ncnc34)c2cc1C", // 250,"flavin-adenine-dinucleotide|fad|","ring -N< : 2 | two fused rings >C= : 4 | aromatic ring fused to nonaromatic ring >C= : 2 | -CH2- : 3 | ring =N- : 5 | aromatic ring =CH- : 2 | >CH- : 3 | ring >C=O : 2 | aromatic ring =C< : 2 | -OH : 5 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | ring -CH< : 4 | ring -O- : 1 | ring =CH- : 2 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCN : 1 | OCNC : 1 | NCCN : 1 | CCNC : 1 | heteroaromatic : 2" + + "-694.61","OCC1OC(OCC2OC(OCC3OC(OC4(CO)OC(CO)C(O)C4O)C(O)C(O)C3O)C(O)C(O)C2O)C(O)C(O)C1O", // 257,"stachyose|","ring >C< : 1 | -O- : 3 | ring -O- : 4 | ring -CH< : 18 | -CH2- : 5 | -OH : 14 | Origin : 1" + +// wrong SMILES -> no "ring -NH-" +// "-478.33","C1(=NC(=C2(C(=N1)N(C=N2)C3(OC(C(C3O)OP([O-])([O-])=O)COP([O-])(=O)[O-])))N)", // 259,"adenosine-3',5'-biphosphate|","dbl sgl ring =N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 2 | -OH : 1 | ring =C< : 1 | -OPO3 : 2 | -CH2- : 1 | ring -NH- : 1 | -NH2 : 1 | Origin : 1 | CCCN : 1 | CCNC : 3" + +// only 1 heteroaromatic ring by jankowski +// "-151.93","OCC1OC(C(O)C1O)n1cnc2c1[nH]c(=O)[nH]c2=O", // 266,"xanthosine|","two fused rings >C= : 2 | ring -N< : 1 | ring -CH< : 4 | ring =CH- : 1 | ring =N- : 1 | ring >C=O : 2 | ring -O- : 1 | -OH : 3 | -CH2- : 1 | amide : 2 | ring -NH- : 2 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" + + "-337.52","C12(N(CC(O)C(O)C(O)COP([O-])(=O)[O-])c3(c(N=C2(C(=O)NC(=O)N=1))cc(C)c(C)c3))", // 270,"FMN|fmnox|","ring -N< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | two fused rings >C= : 2 | -CH2- : 2 | aromatic ring =CH- : 2 | ring =N- : 2 | >CH- : 3 | aromatic ring =C< : 2 | ring >C=O : 2 | -OH : 3 | -CH3 : 2 | -OPO3 : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCN : 1 | OCNC : 1 | NCCN : 1 | CCNC : 1" + "-110.12","[H]C1(CCC(=O)N1)C([O-])=O", // 280,"5-oxo-D-proline|","ring -CH< : 1 | ring -CH2- : 2 | -COO : 1 | ring >C=O : 1 | amide : 1 | ring -NH- : 1 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-673.08","Nc1nc2n(cnc2c(=O)[nH]1)C1OC(COP([O-])(=O)OP([O-])(=O)OC2OC(CO)C(O)C(O)C2O)C(O)C1O", // 281,"GDPgalactose|GDPmannose|GDPglucose|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 9 | ring =CH- : 1 | ring =N- : 2 | ring -O- : 2 | ring >C=O : 1 | ring =C< : 1 | -OH : 6 | -NH2 : 1 | -CH2- : 2 | -OPO3- : 1 | -OPO2- : 1 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + + "-863.85","CC(C(O)=O)C(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 288,"methylmalonyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 6 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | -COO : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-202.8","CC(C([O-])=O)C(C)(O)C([O-])=O", // 295,"R,S-2,3-dimethylmalate|2,3-dimethylmalate|",">C< : 1 | >CH- : 1 | -COO : 2 | -CH3 : 2 | -OH : 1 | Origin : 1" + "-166.28","OC1CC(=CC(=O)C1O)C([O-])=O", // 297,"3-dehydroshikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring -CH< : 2 | ring >C=O : 1 | -OH : 2 | Origin : 1 | OCCC : 2" + "-164.73","OC1C=C(CC(=O)C1O)C([O-])=O", // 298,"5-dehydroshikimate|","ring =C< : 1 | ring -CH2- : 1 | ring =CH- : 1 | -COO : 1 | ring >C=O : 1 | ring -CH< : 2 | -OH : 2 | Origin : 1 | OCCC : 1" + +// wrong SMILES -> no -COO +// "-279.89","COc1cc(cc(OC)c1O)C=CC(=O)OC1OC(CO)C(O)C(O)C1O", // 306,"1-sinapoyl-D-glucose|","aromatic ring =C< : 4 | -O- : 3 | aromatic ring =CH- : 2 | ring -CH< : 5 | -CH3 : 2 | ring -O- : 1 | =CH- : 2 | -OH : 4 | -CH2- : 1 | -COO : 1 | Origin : 1 | OCCC : 1 | CCCC : 1" + +// no heteroaromatic ring by jankowski +// "-39.72","CC(O)C(O)C1=Nc2c(NC1)[nH]c(N)nc2=O", // 308,"7,8-dihydrobiopterin|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | >CH- : 2 | -OH : 2 | -CH3 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 2" + + "-380.65","[N+]C(CC(=O)OP([O-])([O-])=O)C([O-])=O", // 315,"4-phospho-L-aspartate|L-4-aspartyl-phosphate|","-CO-OPO3- : 1 | -CH2- : 1 | >CH- : 1 | -COO : 1 | -NH3 : 1 | Origin : 1" + +// is heteroaromatic ring by jankowski +// "-125.24","NC(=O)C1=CN(C=CC1)C1OC(CO)C(O)C1O", // 317,"nicotinamide-riboside|","ring -CH< : 4 | dbl sgl ring =N< : 1 | ring -O- : 1 | ring =CH- : 4 | -OH : 3 | ring =C< : 1 | -CH2- : 1 | >C=O : 1 | amide : 1 | -NH2 : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" + + "-215.78","[H]C1(OC(=O)C(O)C1O)C(O)CO", // 324,"D-galactono-1,4-lactone|","ring -CH< : 3 | ring -O-CO- : 1 | >CH- : 1 | -OH : 4 | -CH2- : 1 | Origin : 1" + "-291.21","CC(O)C(=O)SCC(NC(=O)CCC([N+])C(O)=O)C(=O)NCC([O-])=O", // 328,"R-S-lactoylglutathione|",">CH- : 3 | -CH2- : 4 | >C=O : 3 | -COO : 2 | -CH3 : 1 | -OH : 1 | -NH3 : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1" + "-80.65","CC(=O)NC(Cc1ccccc1)C([O-])=O", // 332,"N-acetyl-L-phenylalanine|",">CH- : 1 | -CH2- : 1 | -COO : 1 | aromatic ring =C< : 1 | >C=O : 1 | aromatic ring =CH- : 5 | -CH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + +// wrong SMILES -> no ring +// "-248.86","[H]C(O)(CO)C([H])(O)C([H])(O)C([H])(NC(=O)CO)C=O", // 333,"N-glycolyl-D-mannosamine|","ring -CH< : 5 | -OH : 5 | ring -O- : 1 | >C=O : 1 | -CH2- : 2 | amide : 1 | -NH- : 1 | Origin : 1" + +// wrong SMILES -> no -NH3 possible +// "-165.94","CNC(CC(O)=O)C([O-])=O", // 336,"L-threo-3-methylaspartate|",">CH- : 2 | -COO : 2 | -CH3 : 1 | -NH3 : 1 | Origin : 1" + + "-153.08","OC(=O)CC1NC(=O)NC1=O", // 340,"L-5-carboxymethylhydantoin|","ring -CH< : 1 | ring >C=O : 2 | -CH2- : 1 | -COO : 1 | amide : 2 | ring -NH- : 2 | Origin : 1" + "-36.26","[H]C12CCC3([H])C4([H])CCC(=O)C4(C)CCC3([H])C1(C)CCC(=O)C2", // 342,"5alpha-androstane-3,17-dione|5beta-androstane-3,17-dione|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring >C=O : 2 | Origin : 1" + "-408.89","OC1C(COP([O-])([O-])=O)OC(C1O)n1cnc2c(NC(CC(O)=O)C(O)=O)ncnc12", // 343,"adenylosuccinate|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 4 | ring =CH- : 2 | ring =N- : 3 | ring -O- : 1 | ring =C< : 1 | -OH : 2 | -NH- : 1 | -CH2- : 2 | >CH- : 1 | -OPO3 : 1 | -COO : 2 | Origin : 1 | heteroaromatic : 2" + +// wrong SMILES -> no -OPO3 by jankowski +// "0.09","NC(=O)c1ncn(C2OC(COP([O-])([O-])=O)C(O)C2O)c1N", // 349,"5-amino-4-imidazolecarboxamide|","ring =C< : 2 | >C=O : 1 | ring =N- : 1 | ring -NH- : 1 | -NH2 : 2 | ring =CH- : 1 | amide : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 1" + + "-183.72","OCC(O)CC(=O)C([O-])=O", // 351,"2-dehydro-3-deoxy-L-pentonate|","-COO : 1 | >C=O : 1 | -CH2- : 2 | >CH- : 1 | -OH : 2 | Origin : 1 | OCCO : 1" + "-425.13","CC(=O)NC1C(O)C(O)C(CO)OC1OP([O-])([O-])=O", // 355,"N-acetyl-alpha-D-glucosamine-1-phosphate|N-acetyl-D-glucosamine-1-phosphate|","ring -CH< : 5 | ring -O- : 1 | -OPO3 : 1 | -OH : 3 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-425.13","CC(=O)NC1(C(O)OC(COP([O-])([O-])=O)C(O)C1(O))", // 356,"N-acetyl-D-mannosamine-6-phosphate|N-acetyl-D-glucosamine-6-phosphate|","ring -CH< : 5 | -OH : 3 | ring -O- : 1 | >C=O : 1 | -CH3 : 1 | -CH2- : 1 | -OPO3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + +// no heteroaromatic ring by jankowski +// "-651.64","CC1OC(OP([O-])(=O)OP([O-])(=O)OCC2OC(CC2O)n2cc(C)c(=O)[nH]c2=O)C(O)C(O)C1N", // 357,"dTDP-4-amino-4,6-dideoxy-D-glucose|","ring -CH< : 8 | ring -O- : 2 | ring -CH2- : 1 | ring >C=O : 2 | ring =CH- : 1 | ring =C< : 1 | -CH2- : 1 | -OH : 3 | -CH3 : 2 | -OPO3- : 1 | -OPO2- : 1 | -NH3 : 1 | amide : 2 | ring -N< : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1" + + "-49.38","[H]C12CCC3([H])C4([H])CCC(O)C4(C)CCC3([H])C1(C)CCC(O)C2", // 363,"5alpha-androstane-3alpha,17beta-diol|5alpha-androstane-3beta,17alpha-diol|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring -CH< : 2 | -OH : 2 | Origin : 1" + +// wrong SMILES -> same as 363 +// "-42.82","[H]C12CCC3([H])C4([H])CCC(=O)C4(C)CCC3([H])C1(C)CCC(O)C2", // 364,"5alpha-androstane-3alpha-ol-17-one|5beta-androstane-3alpha-ol-17-one|","two fused rings >CH- : 4 | ring -CH2- : 9 | two fused rings >C< : 2 | -CH3 : 2 | ring >C=O : 1 | ring -CH< : 1 | -OH : 1 | Origin : 1" + + "-294.26","[O-]C(=O)CCC(=O)NC(CCCC(=O)C([O-])=O)C([O-])=O", // 365,"N-succinyl-2-L-amino-6-oxoheptanedioate|",">CH- : 1 | -CH2- : 5 | -COO : 3 | >C=O : 2 | amide : 1 | -NH- : 1 | Origin : 1 | OCCO : 1" + "-432.64","OC(COP([O-])([O-])=O)C(O)CC(=O)C([O-])=O", // 366,"6-phospho-2-dehydro-3-deoxy-D-gluconate|2-dehydro-3-deoxy-D-galactonate-6-phosphate|","-OPO3 : 1 | -CH2- : 2 | >CH- : 2 | -OH : 2 | >C=O : 1 | -COO : 1 | Origin : 1 | OCCO : 1" + "-269.49","[N+]C(CCCC(NC(=O)CCC(O)=O)C(O)=O)C([O-])=O", // 367,"N-succinyl-L-2,6-diaminoheptanedioate|",">CH- : 2 | -CH2- : 5 | -COO : 3 | >C=O : 1 | -NH3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-817.39","CCCC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 372,"3S-3-hydroxyhexanoyl-CoA|S-3-hydroxyhexanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 3 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-809.37","CCCC(=O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 373,"3-oxohexanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 4 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-758.54","CCCC=CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 374,"cis-hex-2-enoyl-CoA|trans-hex-2-enoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 8 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | =CH- : 2 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" + "-142.05","[H]C12CCC3([H])C4([H])CCC(O)(C(=O)CO)C4(C)CC(=O)C3([H])C1(C)CCC(=O)C2", // 376,"5alpha-pregnane-17alpha,21-diol-3,11,20-trione|5beta-pregnane-17alpha,21-diol-3,11,20-trione|","two fused rings >CH- : 4 | two fused rings >C< : 2 | ring -CH2- : 8 | ring >C< : 1 | -CH3 : 2 | ring >C=O : 2 | >C=O : 1 | -OH : 2 | -CH2- : 1 | Origin : 1" + +// only 1 heteroaromatic ring by jankowski +// "-61.24","OCC1OC(CC1O)n1cnc2c1nc[nH]c2=O", // 380,"2'-deoxyinosine|","ring -N< : 1 | two fused rings >C= : 2 | ring -CH< : 3 | ring =CH- : 2 | ring =N- : 2 | ring -O- : 1 | ring -CH2- : 1 | ring >C=O : 1 | -CH2- : 1 | -OH : 2 | amide : 1 | ring -NH- : 1 | Origin : 1 | OCCC : 1 | CCNC : 1 | heteroaromatic : 1" + +// only 1 amide by jankowski : WHO IS RIGHT ? +// --> are lactams not counted as amides ? +// "-120.89","[H]C12SC(C)(C)C(N1C(=O)C2NC(=O)C(N)c1ccc(O)cc1)C([O-])=O", // 382,"amoxicillin|","two fused rings -N< : 1 | two fused rings >CH- : 1 | ring -CH< : 2 | ring >C=O : 1 | ring -S- : 1 | ring >C< : 1 | -COO : 1 | -CH3 : 2 | >C=O : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >CH- : 1 | -NH2 : 1 | -OH : 1 | amide : 1 | -NH- : 1 | Origin : 1" + + "-345.38","C(C2(C(C(C(N1(C=CC(N)=NC1=O))O2)O)OP([O-])([O-])=O))O", // 383,"cytidine-3'-monophosphate|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -OPO3 : 1 | -CH2- : 1 | ring =C< : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-217.61","C1(CO)(O)OCC(O)C(O)C1(O)", // 392,"D-psicose|L-sorbose|D-tagatose|","ring >C< : 1 | ring -CH< : 3 | ring -O- : 1 | -CH2- : 1 | -OH : 5 | ring -CH2- : 1 | Origin : 1" + "-152.6","OCC(O)C(O)CO", // 402,"L-threitol|","-OH : 4 | -CH2- : 2 | >CH- : 2 | Origin : 1" + +// ERROR : problem about maximal ring size : should be upper bounded otherwise "-O-" is never matched +// "-950.88","OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC1C(O)C2O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O", // 415,"cyclomaltohexaose|","ring -CH< : 30 | -O- : 6 | ring -O- : 6 | -CH2- : 6 | -OH : 18 | Origin : 1" +// "-1267.84","OCC1OC2OC3C(CO)OC(OC4C(CO)OC(OC5C(CO)OC(OC6C(CO)OC(OC7C(CO)OC(OC8C(CO)OC(OC9C(CO)OC(OC1C(O)C2O)C(O)C9O)C(O)C8O)C(O)C7O)C(O)C6O)C(O)C5O)C(O)C4O)C(O)C3O", // 420,"cyclomaltooctaose|","ring -CH< : 40 | -O- : 8 | ring -O- : 8 | -CH2- : 8 | -OH : 24 | Origin : 1" +// "-532.92","OCC1OC(OC2C(O)C(CO)OC(OC3C(O)C(O)OC(CO)C3O)C2O)C(O)C(O)C1O", // 423,"laminaritriose|beta-laminaritriose|","-OH : 11 | ring -CH< : 10 | -O- : 2 | ring -O- : 2 | -CH2- : 3 | -CH=O : 1 | >CH- : 4 | Origin : 1" + + "-336.65","[N+]C(COP([O-])([O-])=O)C([O-])=O", // 436,"L-O-phosphoserine|",">CH- : 1 | -COO : 1 | -NH3 : 1 | -CH2- : 1 | -OPO3 : 1 | Origin : 1" + "-673.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 439,"ATP|atp|","ring =CH- : 2 | ring =N- : 3 | two fused rings >C= : 2 | ring =C< : 1 | -NH2 : 1 | ring -N< : 1 | ring -CH< : 4 | -OH : 2 | ring -O- : 1 | -OPO2- : 2 | -OPO3 : 1 | -CH2- : 1 | Origin : 1 | heteroaromatic : 2" + "-465.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OP([O-])([O-])=O)C(O)C1O", // 440,"ADP|adp|","ring =CH- : 2 | two fused rings >C= : 2 | ring =C< : 1 | -NH2 : 1 | ring =N- : 3 | ring -N< : 1 | ring -CH< : 4 | -OH : 2 | ring -O- : 1 | -CH2- : 1 | -OPO2- : 1 | -OPO3 : 1 | Origin : 1 | heteroaromatic : 2" + "-218.01","Nc1ncnc2n(cnc12)C1CC(O)C(COP([O-])([O-])=O)O1", // 453,"2'-deoxyadenosine-5'-monophosphate|dAMP|","ring =C< : 1 | ring =CH- : 2 | -NH2 : 1 | ring =N- : 3 | two fused rings >C= : 2 | ring -CH< : 3 | ring -CH2- : 1 | ring -O- : 1 | -CH2- : 1 | -OH : 1 | -OPO3 : 1 | ring -N< : 1 | Origin : 1 | heteroaromatic : 2" + "-367.85","Nc1ncnc2n(cnc12)C1OC(COP([O-])(=O)OS([O-])(=O)=O)C(O)C1O", // 475,"adenylyl-sulfate|aps|","ring =CH- : 2 | two fused rings >C= : 2 | ring =N- : 3 | ring =C< : 1 | -NH2 : 1 | ring -N< : 1 | ring -CH< : 4 | ring -O- : 1 | -OH : 2 | -CH2- : 1 | -OPO2- : 1 | -SO4 : 1 | Origin : 1 | heteroaromatic : 2" + "-214.49","OC1CC(O)(CC(=O)C1O)C([O-])=O", // 479,"3-dehydroquinate|5-dehydroquinate|","ring -CH2- : 2 | ring -CH< : 2 | -OH : 3 | ring >C=O : 1 | ring >C< : 1 | -COO : 1 | Origin : 1" + +// no heteroaromatic ring by jankowski +// "-825.37","CCCC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 481,"3R-3-hydroxyhexanoyl-CoA|","dbl sgl ring =N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 2 | -OH : 3 | ring =C< : 1 | -OPO3 : 1 | -CH2- : 9 | ring -NH- : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | CCCN : 1 | CCNC : 3" + + "-179.54","[H]C(O)(CO)C([H])(O)C([H])(O)C=O", // 488,"D-lyxose|","-OH : 4 | -CH=O : 1 | >CH- : 3 | -CH2- : 1 | Origin : 1" + "-589.26","OCC1OC(OC2OC(COP([O-])([O-])=O)C(O)C(O)C2O)C(O)C(O)C1O", // 493,"alpha,alpha-trehalose-6-phosphate|","ring -CH< : 10 | -CH2- : 2 | -OPO3 : 1 | -OH : 7 | ring -O- : 2 | -O- : 1 | Origin : 1" + "-820.63","CC(O)CC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 498,"3-hydroxybutanoyl-CoA|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 3 | ring =C< : 1 | -CH2- : 7 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 2 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + "-782.59","CCCC(=O)SCCNC(=O)CCNC(=O)C(O)C(C)(C)COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12", // 501,"butyryl-CoA|btcoa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 8 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 3 | >C=O : 3 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | heteroaromatic : 2" + +// no heteroaromatic ring by jankowski +// "-113.97","Nc1nc2NCC(CNc3ccc(cc3)C(=O)NC(CCC([O-])=O)C([O-])=O)Nc2c(=O)[nH]1", // 511,"5,6,7,8-tetrahydrofolate|thf|","-CH2- : 3 | -NH- : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | ring -CH2- : 1 | two fused rings >C= : 2 | ring >C=O : 1 | ring =C< : 1 | ring -NH- : 3 | ring =N- : 1 | ring -CH< : 1 | -NH2 : 1 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 1" +// "-93.65","Nc1nc2NCC3CN(CN3c2c(=O)[nH]1)c1ccc(cc1)C(=O)NC(CCC([O-])=O)C([O-])=O", // 513,"5,10-methylenetetrahydrofolate|","two fused rings -N< : 1 | two fused rings >C= : 2 | two fused rings >CH- : 1 | ring -CH2- : 3 | ring >C=O : 1 | ring -N< : 1 | ring -NH- : 2 | ring =N- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -CH2- : 2 | -COO : 2 | ring =C< : 1 | -NH2 : 1 | amide : 2 | -NH- : 1 | Origin : 1 | OCCC : 2 | CCNC : 1" +// "-144.77","[H]C(=O)N(CC1CNc2nc(N)[nH]c(=O)c2N1)c1ccc(cc1)C(=O)NC(CCC([O-])=O)C([O-])=O", // 514,"10-formyltetrahydrofolate|10fthf|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 1 | ring =N- : 1 | ring -CH< : 1 | ring -CH2- : 1 | ring =C< : 1 | -CH2- : 3 | -NH2 : 1 | aromatic ring =C< : 2 | -CH=O : 1 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 3 | -N< : 1 | -NH- : 1 | Origin : 1 | OCCC : 2 | CCNC : 1" +// "-106.95","[H]C(=N)N1C(CNc2ccc(cc2)C(=O)NC(CCC(O)=O)C(O)=O)CNc2nc(N)[nH]c(=O)c12", // 516,"5-formiminotetrahydrofolate|","two fused rings >C= : 2 | ring -N< : 1 | ring >C=O : 1 | ring -CH< : 1 | =CH- : 1 | ring -NH- : 2 | ring =N- : 1 | ring -CH2- : 1 | -CH2- : 3 | =NH : 1 | ring =C< : 1 | -NH- : 2 | -NH2 : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 1" +// "-109.12","Nc1nc2NCC(CNc3ccc(cc3)C(=O)NC(CCC(O)=O)C(O)=O)=Nc2c(=O)[nH]1", // 517,"7,8-dihydrofolate|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 2 | ring >C=O : 1 | ring -CH2- : 1 | ring =C< : 2 | -NH2 : 1 | -CH2- : 3 | -NH- : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | >C=O : 1 | >CH- : 1 | -COO : 2 | amide : 2 | Origin : 1 | OCCC : 2 | CCNC : 2" + +// no amide by jankowski : WHO IS RIGHT ? +// --> are lactams not counted as amides ? +// "-85.89","[H]C1(N)C(=O)N2C1([H])SC(C)(C)C2([H])C([O-])=O", // 521,"6-aminopenicillanate|","two fused rings -N< : 1 | two fused rings >CH- : 1 | ring -CH< : 2 | ring >C=O : 1 | ring -S- : 1 | ring >C< : 1 | -COO : 1 | -NH2 : 1 | -CH3 : 2 | Origin : 1" + + "-376.76","OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O", // 535,"cellobiose|beta-lactose|beta-maltose|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -CH2- : 2 | -OH : 8 | Origin : 1" + "-430.78","OCC1OC(OP([O-])([O-])=O)C(O)C(O)C1O", // 547,"glucose-1-phosphate|galactose-1-phosphate|mannose-1-phosphate|","ring -CH< : 5 | ring -O- : 1 | -OPO3 : 1 | -OH : 4 | -CH2- : 1 | Origin : 1" + "-764.06","CC(C)(COP([O-])(=O)OP([O-])(=O)OCC1OC(C(O)C1OP([O-])([O-])=O)n1cnc2c(N)ncnc12)C(O)C(=O)NCCC(=O)NCCSC(=O)C=C", // 560,"acrylyl-coa|","ring -N< : 1 | ring -CH< : 4 | two fused rings >C= : 2 | ring =CH- : 2 | ring -O- : 1 | ring =N- : 3 | -OH : 2 | ring =C< : 1 | -CH2- : 6 | -OPO3 : 1 | -NH2 : 1 | -OPO3- : 1 | -OPO2- : 1 | >C< : 1 | >CH- : 1 | -CH3 : 2 | >C=O : 3 | =CH- : 1 | =CH2 : 1 | amide : 2 | -NH- : 2 | -S- : 1 | thioester : 1 | Origin : 1 | OCCC : 1 | heteroaromatic : 2" + "-345.38","C(C2(C(C(C(N1(C(N=C(C=C1)N)=O))O2)O)O))OP([O-])([O-])=O", // 586,"cmp|","ring -CH< : 4 | ring -O- : 1 | ring >C=O : 1 | ring =CH- : 2 | -OH : 2 | ring =N- : 1 | -CH2- : 1 | ring =C< : 1 | -OPO3 : 1 | -NH2 : 1 | amide : 1 | ring -N< : 1 | Origin : 1 | OCNC : 1 | CCCN : 1" + "-16.93","CC(Cl)CCl", // 609,"1,2-dichloropropane|","-CH3 : 1 | -CH2- : 1 | primary -Cl : 1 | >CH- : 1 | secondary -Cl : 1 | Origin : 1 | BinaryVicinalCl : 1 | DistinctVicinalCl : 1" + +// wrong SMILES : no chlorines ... +// "-25.58","[H]C1(C(C(=O)N2CCCC2OC)C2(O)C(O)C1(Oc1cc(OC)cc(OC)c21)c1ccc(OC)cc1)c1ccccc1", // 674,"2,3,4,5-tetrachlorophenol|","aromatic ring =CH- : 1 | aromatic ring =C< : 5 | -OH : 1 | tertiary -Cl : 4 | Origin : 1 | BinaryVicinalCl : 3 | DistinctVicinalCl : 3" + + "-466.4","[N+]Cc1cc(COc2ccc(CCNC(=O)CCC(NC(=O)CCC(NC(=O)CCC(C(CCC(O)=O)C(O)=O)C(O)=O)C(O)=O)C(O)=O)cc2)co1", // 683,"MFR|methanofuran|","ring =C< : 2 | ring =CH- : 2 | -CH2- : 12 | -O- : 1 | ring -O- : 1 | aromatic ring =C< : 2 | -NH3 : 1 | aromatic ring =CH- : 4 | >C=O : 3 | >CH- : 4 | -COO : 5 | amide : 3 | -NH- : 3 | Origin : 1 | heteroaromatic : 1" + +// wrong SMILES : no -COO, no -OPO3- +// "-544.24","C1(NC2(N=C(N)NC(=O)C=2(NC1C(O)C(O)CO)))", // 685,"H4MPT|","two fused rings >C= : 2 | ring -NH- : 3 | ring >C=O : 1 | ring =N- : 1 | ring -CH< : 6 | ring =C< : 1 | >CH- : 5 | -NH2 : 1 | -NH- : 1 | -CH3 : 2 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | -OH : 5 | -O- : 1 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1" + +// no heteroaromatic ring by jankowski +// "-529.04","[H]C1(Nc2c(NC1C)nc(N)[nH]c2=O)C(C)Nc1ccc(CC(O)C(O)C(O)COC2OC(COP([O-])(=O)OC(CCC(O)=O)C(O)=O)C(O)C2O)cc1", // 687,"methenyl-H4MPT|","dbl sgl ring =N< : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | >CH- : 4 | -OH : 5 | -O- : 1 | ring -CH< : 6 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 1 | two fused rings -N< : 1 | ring >C=O : 1 | ring =C< : 1 | two fused rings >CH- : 1 | ring =CH- : 1 | -CH3 : 2 | -NH2 : 1 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 2" +// "-653.72","[H]C(CCC([O-])=O)(NC(=O)CCC([H])(NC(=O)C(C)OP([O-])(=O)OCC(O)C(O)C(O)CN1c2cc(O)ccc2Cc2c1[nH]c(=O)[nH]c2=O)C([O-])=O)C([O-])=O", // 689,"F420|","aromatic ring =CH- : 3 | aromatic ring =C< : 1 | aromatic ring fused to nonaromatic ring >C= : 2 | ring -N< : 1 | ring =CH- : 1 | two fused rings >C= : 2 | ring =N- : 1 | ring >C=O : 2 | -OH : 4 | -CH2- : 6 | >CH- : 6 | -OPO3- : 1 | >C=O : 2 | -CH3 : 1 | -COO : 3 | amide : 3 | ring -NH- : 1 | -NH- : 2 | Origin : 1 | OCCC : 1 | OCNC : 1 | CCCN : 1 | CCCC : 1" +// "-531.97","[H]C1(C(C)Nc2ccc(CC(O)C(O)C(O)COC3OC(COP([O-])(=O)OC(CCC(O)=O)C(O)=O)C(O)C3O)cc2)C(C)Nc2nc(N)[nH]c(=O)c2N1C", // 691,"CH3-H4MPT|","two fused rings >C= : 2 | ring -NH- : 2 | ring =N- : 1 | ring -N< : 1 | ring >C=O : 1 | ring -CH< : 6 | ring =C< : 1 | -CH3 : 3 | -NH2 : 1 | >CH- : 5 | -NH- : 1 | aromatic ring =C< : 2 | aromatic ring =CH- : 4 | -CH2- : 5 | -OH : 5 | -O- : 1 | ring -O- : 1 | -OPO3- : 1 | -COO : 2 | amide : 1 | Origin : 1 | OCCC : 1 | CCNC : 1" + + "-353.81","CC(OP([O-])([O-])=O)C(NC(=O)CCCCCCS)C([O-])=O", // 695,"CoB|H-S-CoB|coenzyme-B|",">C=O : 1 | -CH3 : 1 | >CH- : 2 | -OPO3 : 1 | -COO : 1 | -CH2- : 6 | -SH : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-467.89","CC(OP([O-])([O-])=O)C(NC(=O)CCCCCCSSCCS([O-])(=O)=O)C([O-])=O", // 696,"CoM-S-S-CoB|",">C=O : 1 | -CH3 : 1 | >CH- : 2 | -OPO3 : 1 | -COO : 1 | -CH2- : 8 | -S-S- : 1 | -SO3 : 1 | amide : 1 | -NH- : 1 | Origin : 1" + "-376.76","OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O", // 697,"O-alpha-D-glucopyranosyl-1->4-n|maltose|disaccharide|lactose|lcts|","ring -CH< : 10 | -O- : 1 | ring -O- : 2 | -CH2- : 2 | -OH : 8 | Origin : 1" + "-376.76","OCC1OC(OCC2OC(O)C(O)C(O)C2O)C(O)C(O)C1O", // 698,"allolactose|","ring -CH< : 10 | -CH2- : 2 | -OH : 8 | ring -O- : 2 | -O- : 1 | Origin : 1" + "-535.24","OCC1OC(OC2C(CO)OC(OC3C(CO)OC(O)C(O)C3O)C(O)C2O)C(O)C(O)C1O", // 708,"cellotriose|beta-cellotriose|","ring -CH< : 15 | -O- : 2 | ring -O- : 3 | -CH2- : 3 | -OH : 11 | Origin : 1" + "-377.65","OCC1OC(OC2C(CO)OC(O)(CO)C2O)C(O)C(O)C1O", // 709,"lactulose|beta-lactulose|","ring -O- : 2 | ring -CH< : 8 | -O- : 1 | -OH : 8 | ring >C< : 1 | -CH2- : 3 | Origin : 1" + + "-570","P1(O)(=O)OP(O)(=O)OP(O)(=O)O1", // "cyclic trimetaphosphate" +// "NOT HANDLED BY JANKOWSKI","OP(O)(=O)OP(O)(=O)OP(O)(=O)O", // "triphosphoric acid" + + "" // marks the end of the array +}; + +class DR_print : public MoleculeDecomposition::DecompositionReporter { +public: + /*! + * Reports a component that was matched and its according ID + * in the final match graph + * @param component the component that was matched + * @param matchCount the number of matches found + * @param machtID the ID of the component in the final match graph + */ + void + reportComponent( const MoleculeComponent & component, + const size_t matchCount, + const size_t matchID ) + { + std::cout <<" + " << matchCount <<" [" <SMILESparser::parseSMILES( SMILES )" < ret = SMILESparser::parseSMILES(SMILES[i]); + + if (ret.second < 0 ) + { + std::cout <<"\n Molecule GRAPH to be evaluated : " <MoleculeDecomposition::getEnergy( MOLECULE corrected ) :\n" < -#include - -#include "ggl/chem/MoleculeComponent.hh" -#include "ggl/chem/MoleculeComponent_GMLparser.hh" -#include "ggl/chem/SMILESparser.hh" -#include "ggl/chem/SMILESwriter.hh" -#include "ggl/chem/MoleculeUtil.hh" - -#include "sgm/Graph_boost.hh" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace chem; - -const std::string gml[] = { -"molcomp [" -" description \"{CONH2}\"" -" compIDs [ id 0 ]" -" node [ id 0 label \"C\" ]" -" node [ id 1 label \"O\" ]" -" node [ id 2 label \"N\" ]" -" node [ id 3 label \"H\" ]" -" node [ id 4 label \"H\" ]" -" edge [ source 0 target 1 label \"=\" ]" -" edge [ source 0 target 2 label \"-\" ]" -" edge [ source 2 target 3 label \"-\" ]" -" edge [ source 2 target 4 label \"-\" ]" -"]" -, -"molcomp [" -" description \"{Ribo-ADP}\"" -" compIDs [ id 0 ]" -" node [ id 0 label \"C\" ]" -" node [ id 1 label \"O\" ]" -" node [ id 2 label \"C\" ]" -" node [ id 3 label \"C\" ]" -" node [ id 4 label \"O\" ]" -" node [ id 5 label \"P\" ]" -" node [ id 6 label \"O\" ]" -" node [ id 7 label \"O\" ]" -" node [ id 8 label \"O\" ]" -" node [ id 9 label \"P\" ]" -" node [ id 10 label \"O\" ]" -" node [ id 11 label \"O\" ]" -" node [ id 12 label \"O\" ]" -" node [ id 13 label \"C\" ]" -" node [ id 14 label \"C\" ]" -" node [ id 15 label \"O\" ]" -" node [ id 16 label \"C\" ]" -" node [ id 17 label \"C\" ]" -" node [ id 18 label \"O\" ]" -" node [ id 19 label \"C\" ]" -" node [ id 20 label \"O\" ]" -" node [ id 21 label \"n\" ]" -" node [ id 22 label \"c\" ]" -" node [ id 23 label \"n\" ]" -" node [ id 24 label \"c\" ]" -" node [ id 25 label \"c\" ]" -" node [ id 26 label \"N\" ]" -" node [ id 27 label \"n\" ]" -" node [ id 28 label \"c\" ]" -" node [ id 29 label \"n\" ]" -" node [ id 30 label \"c\" ]" -" node [ id 31 label \"C\" ]" -" node [ id 32 label \"O\" ]" -" node [ id 33 label \"C\" ]" -" node [ id 34 label \"O\" ]" -" node [ id 35 label \"H\" ]" -" node [ id 36 label \"H\" ]" -" node [ id 37 label \"H\" ]" -" node [ id 38 label \"H\" ]" -" node [ id 39 label \"H\" ]" -" node [ id 40 label \"H\" ]" -" node [ id 41 label \"H\" ]" -" node [ id 42 label \"H\" ]" -" node [ id 43 label \"H\" ]" -" node [ id 44 label \"H\" ]" -" node [ id 45 label \"H\" ]" -" node [ id 46 label \"H\" ]" -" node [ id 47 label \"H\" ]" -" node [ id 48 label \"H\" ]" -" node [ id 49 label \"H\" ]" -" node [ id 50 label \"H\" ]" -" node [ id 51 label \"H\" ]" -" node [ id 52 label \"H\" ]" -" node [ id 53 label \"H\" ]" -" node [ id 54 label \"H\" ]" -" node [ id 55 label \"H\" ]" -" edge [ source 1 target 0 label \"-\" ]" -" edge [ source 2 target 1 label \"-\" ]" -" edge [ source 3 target 2 label \"-\" ]" -" edge [ source 4 target 3 label \"-\" ]" -" edge [ source 5 target 4 label \"-\" ]" -" edge [ source 6 target 5 label \"-\" ]" -" edge [ source 7 target 5 label \"=\" ]" -" edge [ source 8 target 5 label \"-\" ]" -" edge [ source 9 target 8 label \"-\" ]" -" edge [ source 10 target 9 label \"-\" ]" -" edge [ source 11 target 9 label \"=\" ]" -" edge [ source 12 target 9 label \"-\" ]" -" edge [ source 13 target 12 label \"-\" ]" -" edge [ source 14 target 13 label \"-\" ]" -" edge [ source 15 target 14 label \"-\" ]" -" edge [ source 16 target 15 label \"-\" ]" -" edge [ source 17 target 16 label \"-\" ]" -" edge [ source 18 target 17 label \"-\" ]" -" edge [ source 19 target 17 label \"-\" ]" -" edge [ source 19 target 14 label \"-\" ]" -" edge [ source 20 target 19 label \"-\" ]" -" edge [ source 21 target 16 label \"-\" ]" -" edge [ source 22 target 21 label \":\" ]" -" edge [ source 23 target 22 label \":\" ]" -" edge [ source 24 target 23 label \":\" ]" -" edge [ source 25 target 24 label \":\" ]" -" edge [ source 26 target 25 label \"-\" ]" -" edge [ source 27 target 25 label \":\" ]" -" edge [ source 28 target 27 label \":\" ]" -" edge [ source 29 target 28 label \":\" ]" -" edge [ source 30 target 29 label \":\" ]" -" edge [ source 30 target 24 label \":\" ]" -" edge [ source 30 target 21 label \":\" ]" -" edge [ source 31 target 2 label \"-\" ]" -" edge [ source 32 target 31 label \"-\" ]" -" edge [ source 33 target 31 label \"-\" ]" -" edge [ source 33 target 0 label \"-\" ]" -" edge [ source 34 target 33 label \"-\" ]" -" edge [ source 2 target 35 label \"-\" ]" -" edge [ source 3 target 36 label \"-\" ]" -" edge [ source 3 target 37 label \"-\" ]" -" edge [ source 6 target 38 label \"-\" ]" -" edge [ source 10 target 39 label \"-\" ]" -" edge [ source 13 target 40 label \"-\" ]" -" edge [ source 13 target 41 label \"-\" ]" -" edge [ source 14 target 42 label \"-\" ]" -" edge [ source 16 target 43 label \"-\" ]" -" edge [ source 17 target 44 label \"-\" ]" -" edge [ source 18 target 45 label \"-\" ]" -" edge [ source 19 target 46 label \"-\" ]" -" edge [ source 20 target 47 label \"-\" ]" -" edge [ source 22 target 48 label \"-\" ]" -" edge [ source 26 target 49 label \"-\" ]" -" edge [ source 26 target 50 label \"-\" ]" -" edge [ source 28 target 51 label \"-\" ]" -" edge [ source 31 target 52 label \"-\" ]" -" edge [ source 32 target 53 label \"-\" ]" -" edge [ source 33 target 54 label \"-\" ]" -" edge [ source 34 target 55 label \"-\" ]" -"]" - , - "" // marks the end of the array -}; - - - -const std::string SMILES[] = { - "[{CONH2}]c1ccc[n+](c1)[{Ribo-ADP}]", - "[{CONH2}]C1[CH2]C=CN(C=1)[{Ribo-ADP}]", - "" -}; - - -int main() { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::chem::MoleculeGroups \n" - <<"==============================================\n" - <MoleculeComponent_GML_grammar::parse( GML )" < - ret = MoleculeComponent_GMLparser::parseGML( gml[i] ); - - if (ret.second < 0 ) - { - // print parsed group - std::cout <<"\n parsed MoleculeComponent : '" < - mol = SMILESparser::parseSMILES( SMILES[i], groups ); - // exception handling - if (mol.second < 0 ) - { - // print parsed group - std::cout <<"\n parsed Molecule SMILES : " < +#include + +#include "ggl/chem/MoleculeComponent.hh" +#include "ggl/chem/MoleculeComponent_GMLparser.hh" +#include "ggl/chem/SMILESparser.hh" +#include "ggl/chem/SMILESwriter.hh" +#include "ggl/chem/MoleculeUtil.hh" + +#include "sgm/Graph_boost.hh" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace chem; + +const std::string gml[] = { +"molcomp [" +" description \"{CONH2}\"" +" compIDs [ id 0 ]" +" node [ id 0 label \"C\" ]" +" node [ id 1 label \"O\" ]" +" node [ id 2 label \"N\" ]" +" node [ id 3 label \"H\" ]" +" node [ id 4 label \"H\" ]" +" edge [ source 0 target 1 label \"=\" ]" +" edge [ source 0 target 2 label \"-\" ]" +" edge [ source 2 target 3 label \"-\" ]" +" edge [ source 2 target 4 label \"-\" ]" +"]" +, +"molcomp [" +" description \"{Ribo-ADP}\"" +" compIDs [ id 0 ]" +" node [ id 0 label \"C\" ]" +" node [ id 1 label \"O\" ]" +" node [ id 2 label \"C\" ]" +" node [ id 3 label \"C\" ]" +" node [ id 4 label \"O\" ]" +" node [ id 5 label \"P\" ]" +" node [ id 6 label \"O\" ]" +" node [ id 7 label \"O\" ]" +" node [ id 8 label \"O\" ]" +" node [ id 9 label \"P\" ]" +" node [ id 10 label \"O\" ]" +" node [ id 11 label \"O\" ]" +" node [ id 12 label \"O\" ]" +" node [ id 13 label \"C\" ]" +" node [ id 14 label \"C\" ]" +" node [ id 15 label \"O\" ]" +" node [ id 16 label \"C\" ]" +" node [ id 17 label \"C\" ]" +" node [ id 18 label \"O\" ]" +" node [ id 19 label \"C\" ]" +" node [ id 20 label \"O\" ]" +" node [ id 21 label \"n\" ]" +" node [ id 22 label \"c\" ]" +" node [ id 23 label \"n\" ]" +" node [ id 24 label \"c\" ]" +" node [ id 25 label \"c\" ]" +" node [ id 26 label \"N\" ]" +" node [ id 27 label \"n\" ]" +" node [ id 28 label \"c\" ]" +" node [ id 29 label \"n\" ]" +" node [ id 30 label \"c\" ]" +" node [ id 31 label \"C\" ]" +" node [ id 32 label \"O\" ]" +" node [ id 33 label \"C\" ]" +" node [ id 34 label \"O\" ]" +" node [ id 35 label \"H\" ]" +" node [ id 36 label \"H\" ]" +" node [ id 37 label \"H\" ]" +" node [ id 38 label \"H\" ]" +" node [ id 39 label \"H\" ]" +" node [ id 40 label \"H\" ]" +" node [ id 41 label \"H\" ]" +" node [ id 42 label \"H\" ]" +" node [ id 43 label \"H\" ]" +" node [ id 44 label \"H\" ]" +" node [ id 45 label \"H\" ]" +" node [ id 46 label \"H\" ]" +" node [ id 47 label \"H\" ]" +" node [ id 48 label \"H\" ]" +" node [ id 49 label \"H\" ]" +" node [ id 50 label \"H\" ]" +" node [ id 51 label \"H\" ]" +" node [ id 52 label \"H\" ]" +" node [ id 53 label \"H\" ]" +" node [ id 54 label \"H\" ]" +" node [ id 55 label \"H\" ]" +" edge [ source 1 target 0 label \"-\" ]" +" edge [ source 2 target 1 label \"-\" ]" +" edge [ source 3 target 2 label \"-\" ]" +" edge [ source 4 target 3 label \"-\" ]" +" edge [ source 5 target 4 label \"-\" ]" +" edge [ source 6 target 5 label \"-\" ]" +" edge [ source 7 target 5 label \"=\" ]" +" edge [ source 8 target 5 label \"-\" ]" +" edge [ source 9 target 8 label \"-\" ]" +" edge [ source 10 target 9 label \"-\" ]" +" edge [ source 11 target 9 label \"=\" ]" +" edge [ source 12 target 9 label \"-\" ]" +" edge [ source 13 target 12 label \"-\" ]" +" edge [ source 14 target 13 label \"-\" ]" +" edge [ source 15 target 14 label \"-\" ]" +" edge [ source 16 target 15 label \"-\" ]" +" edge [ source 17 target 16 label \"-\" ]" +" edge [ source 18 target 17 label \"-\" ]" +" edge [ source 19 target 17 label \"-\" ]" +" edge [ source 19 target 14 label \"-\" ]" +" edge [ source 20 target 19 label \"-\" ]" +" edge [ source 21 target 16 label \"-\" ]" +" edge [ source 22 target 21 label \":\" ]" +" edge [ source 23 target 22 label \":\" ]" +" edge [ source 24 target 23 label \":\" ]" +" edge [ source 25 target 24 label \":\" ]" +" edge [ source 26 target 25 label \"-\" ]" +" edge [ source 27 target 25 label \":\" ]" +" edge [ source 28 target 27 label \":\" ]" +" edge [ source 29 target 28 label \":\" ]" +" edge [ source 30 target 29 label \":\" ]" +" edge [ source 30 target 24 label \":\" ]" +" edge [ source 30 target 21 label \":\" ]" +" edge [ source 31 target 2 label \"-\" ]" +" edge [ source 32 target 31 label \"-\" ]" +" edge [ source 33 target 31 label \"-\" ]" +" edge [ source 33 target 0 label \"-\" ]" +" edge [ source 34 target 33 label \"-\" ]" +" edge [ source 2 target 35 label \"-\" ]" +" edge [ source 3 target 36 label \"-\" ]" +" edge [ source 3 target 37 label \"-\" ]" +" edge [ source 6 target 38 label \"-\" ]" +" edge [ source 10 target 39 label \"-\" ]" +" edge [ source 13 target 40 label \"-\" ]" +" edge [ source 13 target 41 label \"-\" ]" +" edge [ source 14 target 42 label \"-\" ]" +" edge [ source 16 target 43 label \"-\" ]" +" edge [ source 17 target 44 label \"-\" ]" +" edge [ source 18 target 45 label \"-\" ]" +" edge [ source 19 target 46 label \"-\" ]" +" edge [ source 20 target 47 label \"-\" ]" +" edge [ source 22 target 48 label \"-\" ]" +" edge [ source 26 target 49 label \"-\" ]" +" edge [ source 26 target 50 label \"-\" ]" +" edge [ source 28 target 51 label \"-\" ]" +" edge [ source 31 target 52 label \"-\" ]" +" edge [ source 32 target 53 label \"-\" ]" +" edge [ source 33 target 54 label \"-\" ]" +" edge [ source 34 target 55 label \"-\" ]" +"]" + , + "" // marks the end of the array +}; + + + +const std::string SMILES[] = { + "[{CONH2}]c1ccc[n+](c1)[{Ribo-ADP}]", + "[{CONH2}]C1[CH2]C=CN(C=1)[{Ribo-ADP}]", + "" +}; + + +int main() { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::chem::MoleculeGroups \n" + <<"==============================================\n" + <MoleculeComponent_GML_grammar::parse( GML )" < + ret = MoleculeComponent_GMLparser::parseGML( gml[i] ); + + if (ret.second < 0 ) + { + // print parsed group + std::cout <<"\n parsed MoleculeComponent : '" < + mol = SMILESparser::parseSMILES( SMILES[i], groups ); + // exception handling + if (mol.second < 0 ) + { + // print parsed group + std::cout <<"\n parsed Molecule SMILES : " < -#include -#include - -#include "ggl/chem/SMILESwriter.hh" -#include "ggl/chem/SMILESparser.hh" - -#include - -using namespace ggl::chem; - -void -molWeightTest (void) { - - std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with - std::vector< double > lowerBoundWeightsWithHs; // list of weights the molecules should have at least, to pass the test - std::vector< double > lowerBoundWeightsWithoutHs; - - smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); - lowerBoundWeightsWithHs.push_back(180.0); - lowerBoundWeightsWithoutHs.push_back(165.0); - - smilesInput.push_back("[H]C(=O)[H]"); - lowerBoundWeightsWithHs.push_back(30.0); - lowerBoundWeightsWithoutHs.push_back(27.0); - - smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); - lowerBoundWeightsWithHs.push_back(180.0); - lowerBoundWeightsWithoutHs.push_back(165.0); - - for (size_t i = 0; i < smilesInput.size(); i++) - { - std::string smi = smilesInput[i]; - ggl::chem::Molecule molecule = SMILESparser::parseSMILES(smi).first; - - std::cout << "\ncheck '" << smi << "' from Molecule:" << "\n"; - - MoleculeOB obmol2(molecule); - std::cout << " weight(): "; std::cout.flush(); - double weight = obmol2.getMolWeight(); - std::cout << (weight > lowerBoundWeightsWithHs[i] ? "true" : "false") << "\n"; - std::cout << " weight(true): "; std::cout.flush(); - weight = obmol2.getMolWeight(true); - std::cout << (weight > lowerBoundWeightsWithHs[i] ? "true" : "false") << "\n"; - std::cout << " weight(false): "; std::cout.flush(); - weight = obmol2.getMolWeight(false); - std::cout << (weight > lowerBoundWeightsWithoutHs[i] ? "true" : "false"); - } - - std::cout << std::endl; -} - -void -molEnergyTest (void) { - - std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with - std::vector< double > lowerBoundEnergyWithHs; // list of weights the molecules should have at least, to pass the test - - smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); - lowerBoundEnergyWithHs.push_back(1000.0); - - smilesInput.push_back("[H]C(=O)[H]"); - lowerBoundEnergyWithHs.push_back(0.0); - - smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); - lowerBoundEnergyWithHs.push_back(1000.0); - - for (size_t i = 0; i < smilesInput.size(); i++) - { - std::string smi = smilesInput[i]; - ggl::chem::Molecule molecule = SMILESparser::parseSMILES(smi).first; - - std::cout << "\ncheck '" << smi << "' from Molecule:" << "\n"; - - MoleculeOB obmol2(molecule); - std::cout << " energy(): "; std::cout.flush(); - double energy = obmol2.getMolEnergy(); - std::cout << (energy > lowerBoundEnergyWithHs[i] ? "true" : "false"); - } - - std::cout << std::endl; -} - - -void -convertTest (void) { - - std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with - std::vector< double > lowerBoundEnergyWithHs; // list of weights the molecules should have at least, to pass the test - - smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); - smilesInput.push_back("[H]C(=O)[H]"); - smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); - - for (size_t i=0; i +#include +#include + +#include "ggl/chem/SMILESwriter.hh" +#include "ggl/chem/SMILESparser.hh" + +#include + +using namespace ggl::chem; + +void +molWeightTest (void) { + + std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with + std::vector< double > lowerBoundWeightsWithHs; // list of weights the molecules should have at least, to pass the test + std::vector< double > lowerBoundWeightsWithoutHs; + + smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); + lowerBoundWeightsWithHs.push_back(180.0); + lowerBoundWeightsWithoutHs.push_back(165.0); + + smilesInput.push_back("[H]C(=O)[H]"); + lowerBoundWeightsWithHs.push_back(30.0); + lowerBoundWeightsWithoutHs.push_back(27.0); + + smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); + lowerBoundWeightsWithHs.push_back(180.0); + lowerBoundWeightsWithoutHs.push_back(165.0); + + for (size_t i = 0; i < smilesInput.size(); i++) + { + std::string smi = smilesInput[i]; + ggl::chem::Molecule molecule = SMILESparser::parseSMILES(smi).first; + + std::cout << "\ncheck '" << smi << "' from Molecule:" << "\n"; + + MoleculeOB obmol2(molecule); + std::cout << " weight(): "; std::cout.flush(); + double weight = obmol2.getMolWeight(); + std::cout << (weight > lowerBoundWeightsWithHs[i] ? "true" : "false") << "\n"; + std::cout << " weight(true): "; std::cout.flush(); + weight = obmol2.getMolWeight(true); + std::cout << (weight > lowerBoundWeightsWithHs[i] ? "true" : "false") << "\n"; + std::cout << " weight(false): "; std::cout.flush(); + weight = obmol2.getMolWeight(false); + std::cout << (weight > lowerBoundWeightsWithoutHs[i] ? "true" : "false"); + } + + std::cout << std::endl; +} + +void +molEnergyTest (void) { + + std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with + std::vector< double > lowerBoundEnergyWithHs; // list of weights the molecules should have at least, to pass the test + + smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); + lowerBoundEnergyWithHs.push_back(1000.0); + + smilesInput.push_back("[H]C(=O)[H]"); + lowerBoundEnergyWithHs.push_back(0.0); + + smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); + lowerBoundEnergyWithHs.push_back(1000.0); + + for (size_t i = 0; i < smilesInput.size(); i++) + { + std::string smi = smilesInput[i]; + ggl::chem::Molecule molecule = SMILESparser::parseSMILES(smi).first; + + std::cout << "\ncheck '" << smi << "' from Molecule:" << "\n"; + + MoleculeOB obmol2(molecule); + std::cout << " energy(): "; std::cout.flush(); + double energy = obmol2.getMolEnergy(); + std::cout << (energy > lowerBoundEnergyWithHs[i] ? "true" : "false"); + } + + std::cout << std::endl; +} + + +void +convertTest (void) { + + std::vector< std::string > smilesInput; // SMILES to test the getMolWeight() method with + std::vector< double > lowerBoundEnergyWithHs; // list of weights the molecules should have at least, to pass the test + + smilesInput.push_back("OCC1OC(O)C(O)C(O)C1O"); + smilesInput.push_back("[H]C(=O)[H]"); + smilesInput.push_back("[OH][CH3][CH2](O)[CH2](O)[CH2](O)[CH2](O)[CH2]O"); + + for (size_t i=0; i -#include - -#include -#include -#include - -void -labelTest (void) { - - using namespace ggl::chem; - - std::vector< std::string > validAtomLabel; - - // add all supported atom label - const MoleculeUtil::AtomDataMap & lm = MoleculeUtil::getAtomData(); - for ( MoleculeUtil::AtomDataMap::const_iterator i=lm.begin(); i!=lm.end(); i++) { - validAtomLabel.push_back(i->first); - } - // add special label - - // H - validAtomLabel.push_back("CH"); - validAtomLabel.push_back("CH2"); - // charge - validAtomLabel.push_back("H+"); - validAtomLabel.push_back("O-2"); - validAtomLabel.push_back("O-10"); - validAtomLabel.push_back("OH-"); - validAtomLabel.push_back("OH-2"); - validAtomLabel.push_back("CH3-"); - validAtomLabel.push_back("CH2-2"); - // class - validAtomLabel.push_back("H:1"); - validAtomLabel.push_back("O-:2"); - validAtomLabel.push_back("O-2:2"); - validAtomLabel.push_back("OH:21"); - validAtomLabel.push_back("OH2:213"); - validAtomLabel.push_back("OH-:21"); - validAtomLabel.push_back("CH3-:2"); - validAtomLabel.push_back("CH2-2:12"); - - std::cout <<"\n check SYNTACTICALLY VALID atom label :\n\n"; - for (size_t i=0; i< validAtomLabel.size(); i++) { - std::cout <<" check '"<isAromatic)==1?"true":"false"); - } - std::cout < invalidAtomLabel; - - // white spaces - invalidAtomLabel.push_back(""); - invalidAtomLabel.push_back(" "); - invalidAtomLabel.push_back(" H"); - invalidAtomLabel.push_back("H "); - invalidAtomLabel.push_back("C a"); - invalidAtomLabel.push_back("[C ]"); - invalidAtomLabel.push_back("[C] "); - invalidAtomLabel.push_back(" [C]"); - invalidAtomLabel.push_back(" [ C]"); - invalidAtomLabel.push_back(" [ C ]"); - // SMILES brackets left - invalidAtomLabel.push_back("[C]"); - invalidAtomLabel.push_back("[CH]"); - invalidAtomLabel.push_back("[C+]"); - invalidAtomLabel.push_back("[CH+]"); - invalidAtomLabel.push_back("[C:3]"); - invalidAtomLabel.push_back("[CH:3]"); - invalidAtomLabel.push_back("[C+:3]"); - invalidAtomLabel.push_back("[CH+:3]"); - invalidAtomLabel.push_back("[C"); - invalidAtomLabel.push_back("C]"); - // protons - invalidAtomLabel.push_back("HH"); - invalidAtomLabel.push_back("H2"); - invalidAtomLabel.push_back("CHH"); - invalidAtomLabel.push_back("CH12"); - // charge - invalidAtomLabel.push_back("C+H"); - invalidAtomLabel.push_back("C-2H"); - invalidAtomLabel.push_back("C-2H2"); - invalidAtomLabel.push_back("C-2+"); - invalidAtomLabel.push_back("C+-"); - invalidAtomLabel.push_back("C+123"); - // class - invalidAtomLabel.push_back("H:"); - invalidAtomLabel.push_back("O:-"); - invalidAtomLabel.push_back("O:2-"); - invalidAtomLabel.push_back("O:2-2"); - invalidAtomLabel.push_back("O:21H"); - invalidAtomLabel.push_back("O:21H2"); - invalidAtomLabel.push_back("OH:21-"); - invalidAtomLabel.push_back("O:21H-"); - invalidAtomLabel.push_back("C:2H3-"); - invalidAtomLabel.push_back("CH3:2-"); - invalidAtomLabel.push_back("C:12H2-2"); - invalidAtomLabel.push_back("CH2:12-2"); - // strange things - invalidAtomLabel.push_back("CC"); - invalidAtomLabel.push_back("CHC"); - invalidAtomLabel.push_back("CH2C"); - invalidAtomLabel.push_back("C+C"); - invalidAtomLabel.push_back("C+2C"); - invalidAtomLabel.push_back("CH+2C"); - invalidAtomLabel.push_back("CH2+2C"); - invalidAtomLabel.push_back("C:2C"); - invalidAtomLabel.push_back("CH:2C"); - invalidAtomLabel.push_back("CH2:2C"); - invalidAtomLabel.push_back("CH2+:2C"); - invalidAtomLabel.push_back("CH2+2:2C"); - - - std::cout <<"\n check SYNTACTICALLY INVALID atom label :\n\n"; - for (size_t i=0; i< invalidAtomLabel.size(); i++) { - std::cout <<" check '"< molecules; - molecules.push_back("[H+]"); - molecules.push_back("HH"); - molecules.push_back("[HH]"); - molecules.push_back("O"); - molecules.push_back("[OH-]"); - molecules.push_back("[O-]"); - molecules.push_back("[O+]"); - molecules.push_back("[OH3+]"); - molecules.push_back("O=C1C=CC(=O)C=C1"); - molecules.push_back("CC[H:1]"); - // coordinative bonds - molecules.push_back("C^C"); -// molecules.push_back("[Fe+2](^O)^O"); - - size_t consistencyCode = 0; - for (size_t i=0; i parse = SMILESparser::parseSMILES( molecules.at(i) ); - std::cout <<" parsing result : " <(parse.first) <(parse.first) <(parse.first) < +#include + +#include +#include +#include + +void +labelTest (void) { + + using namespace ggl::chem; + + std::vector< std::string > validAtomLabel; + + // add all supported atom label + const MoleculeUtil::AtomDataMap & lm = MoleculeUtil::getAtomData(); + for ( MoleculeUtil::AtomDataMap::const_iterator i=lm.begin(); i!=lm.end(); i++) { + validAtomLabel.push_back(i->first); + } + // add special label + + // H + validAtomLabel.push_back("CH"); + validAtomLabel.push_back("CH2"); + // charge + validAtomLabel.push_back("H+"); + validAtomLabel.push_back("O-2"); + validAtomLabel.push_back("O-10"); + validAtomLabel.push_back("OH-"); + validAtomLabel.push_back("OH-2"); + validAtomLabel.push_back("CH3-"); + validAtomLabel.push_back("CH2-2"); + // class + validAtomLabel.push_back("H:1"); + validAtomLabel.push_back("O-:2"); + validAtomLabel.push_back("O-2:2"); + validAtomLabel.push_back("OH:21"); + validAtomLabel.push_back("OH2:213"); + validAtomLabel.push_back("OH-:21"); + validAtomLabel.push_back("CH3-:2"); + validAtomLabel.push_back("CH2-2:12"); + + std::cout <<"\n check SYNTACTICALLY VALID atom label :\n\n"; + for (size_t i=0; i< validAtomLabel.size(); i++) { + std::cout <<" check '"<isAromatic)==1?"true":"false"); + } + std::cout < invalidAtomLabel; + + // white spaces + invalidAtomLabel.push_back(""); + invalidAtomLabel.push_back(" "); + invalidAtomLabel.push_back(" H"); + invalidAtomLabel.push_back("H "); + invalidAtomLabel.push_back("C a"); + invalidAtomLabel.push_back("[C ]"); + invalidAtomLabel.push_back("[C] "); + invalidAtomLabel.push_back(" [C]"); + invalidAtomLabel.push_back(" [ C]"); + invalidAtomLabel.push_back(" [ C ]"); + // SMILES brackets left + invalidAtomLabel.push_back("[C]"); + invalidAtomLabel.push_back("[CH]"); + invalidAtomLabel.push_back("[C+]"); + invalidAtomLabel.push_back("[CH+]"); + invalidAtomLabel.push_back("[C:3]"); + invalidAtomLabel.push_back("[CH:3]"); + invalidAtomLabel.push_back("[C+:3]"); + invalidAtomLabel.push_back("[CH+:3]"); + invalidAtomLabel.push_back("[C"); + invalidAtomLabel.push_back("C]"); + // protons + invalidAtomLabel.push_back("HH"); + invalidAtomLabel.push_back("H2"); + invalidAtomLabel.push_back("CHH"); + invalidAtomLabel.push_back("CH12"); + // charge + invalidAtomLabel.push_back("C+H"); + invalidAtomLabel.push_back("C-2H"); + invalidAtomLabel.push_back("C-2H2"); + invalidAtomLabel.push_back("C-2+"); + invalidAtomLabel.push_back("C+-"); + invalidAtomLabel.push_back("C+123"); + // class + invalidAtomLabel.push_back("H:"); + invalidAtomLabel.push_back("O:-"); + invalidAtomLabel.push_back("O:2-"); + invalidAtomLabel.push_back("O:2-2"); + invalidAtomLabel.push_back("O:21H"); + invalidAtomLabel.push_back("O:21H2"); + invalidAtomLabel.push_back("OH:21-"); + invalidAtomLabel.push_back("O:21H-"); + invalidAtomLabel.push_back("C:2H3-"); + invalidAtomLabel.push_back("CH3:2-"); + invalidAtomLabel.push_back("C:12H2-2"); + invalidAtomLabel.push_back("CH2:12-2"); + // strange things + invalidAtomLabel.push_back("CC"); + invalidAtomLabel.push_back("CHC"); + invalidAtomLabel.push_back("CH2C"); + invalidAtomLabel.push_back("C+C"); + invalidAtomLabel.push_back("C+2C"); + invalidAtomLabel.push_back("CH+2C"); + invalidAtomLabel.push_back("CH2+2C"); + invalidAtomLabel.push_back("C:2C"); + invalidAtomLabel.push_back("CH:2C"); + invalidAtomLabel.push_back("CH2:2C"); + invalidAtomLabel.push_back("CH2+:2C"); + invalidAtomLabel.push_back("CH2+2:2C"); + + + std::cout <<"\n check SYNTACTICALLY INVALID atom label :\n\n"; + for (size_t i=0; i< invalidAtomLabel.size(); i++) { + std::cout <<" check '"< molecules; + molecules.push_back("[H+]"); + molecules.push_back("HH"); + molecules.push_back("[HH]"); + molecules.push_back("O"); + molecules.push_back("[OH-]"); + molecules.push_back("[O-]"); + molecules.push_back("[O+]"); + molecules.push_back("[OH3+]"); + molecules.push_back("O=C1C=CC(=O)C=C1"); + molecules.push_back("CC[H:1]"); + // coordinative bonds + molecules.push_back("C^C"); +// molecules.push_back("[Fe+2](^O)^O"); + + size_t consistencyCode = 0; + for (size_t i=0; i parse = SMILESparser::parseSMILES( molecules.at(i) ); + std::cout <<" parsing result : " <(parse.first) <(parse.first) <(parse.first) < -#include - -#include "ggl/chem/SMILESparser.hh" -#include "ggl/chem/SMILESwriter.hh" -#include "ggl/chem/MoleculeUtil.hh" -#include "ggl/chem/EC_MoleculeDecomposition.hh" -#include "ggl/chem/RRC_ArrheniusLaw.hh" - -#include "sgm/Graph_boost.hh" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace ggl::chem; - - -const std::string SMILES[] = { - -// "ENERGY","SMILES", // "ENTRY","NAMES","GROUP_DECOMPOSITION" - - "-480.93","OP([O-])(=O)OP([O-])([O-])=O", // 8,"diphosphate|pyrophosphate|ppi|","pyrophosphate : 1" - "-18.97","[H]N([H])[H]", // 9,"ammonia|nh4|","NH4 : 1" - "-112.69","CC(=O)C([O-])=O", // 15,"pyruvate|pyr|",">C=O : 1 | -COO : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" - "-188.9","[O-]C(=O)CCC(=O)C([O-])=O", // 17,"alpha-ketoglutarate|akg|",">C=O : 1 | -CH2- : 2 | -COO : 2 | Origin : 1 | OCCO : 1" - "-32.05","[H]OO[H]", // 18,"hydrogen peroxide|","H2O2 : 1" - "-190.52","OC(=O)CC(=O)C([O-])=O", // 20,"oxaloacetate|oaa|",">C=O : 1 | -CH2- : 1 | -COO : 2 | Origin : 1 | OCCO : 1" - "-87.73","[N+]CC([O-])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" - "-87.73","[NH3+]CC([O-1])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" - "-162.96","[O-]C(=O)CCC([O-])=O", // 23,"succinate|succ|","-COO : 2 | -CH2- : 2 | Origin : 1" - - "" // marks the end of the array -}; - -std::string getSMILES(const std::string & smiles, EnergyCalculation & energyCalc, double& energyAdd ); - -int main() { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::chem::RRC_ArrheniusLaw \n" - <<"==============================================\n" - < +#include + +#include "ggl/chem/SMILESparser.hh" +#include "ggl/chem/SMILESwriter.hh" +#include "ggl/chem/MoleculeUtil.hh" +#include "ggl/chem/EC_MoleculeDecomposition.hh" +#include "ggl/chem/RRC_ArrheniusLaw.hh" + +#include "sgm/Graph_boost.hh" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace ggl::chem; + + +const std::string SMILES[] = { + +// "ENERGY","SMILES", // "ENTRY","NAMES","GROUP_DECOMPOSITION" + + "-480.93","OP([O-])(=O)OP([O-])([O-])=O", // 8,"diphosphate|pyrophosphate|ppi|","pyrophosphate : 1" + "-18.97","[H]N([H])[H]", // 9,"ammonia|nh4|","NH4 : 1" + "-112.69","CC(=O)C([O-])=O", // 15,"pyruvate|pyr|",">C=O : 1 | -COO : 1 | -CH3 : 1 | Origin : 1 | OCCO : 1" + "-188.9","[O-]C(=O)CCC(=O)C([O-])=O", // 17,"alpha-ketoglutarate|akg|",">C=O : 1 | -CH2- : 2 | -COO : 2 | Origin : 1 | OCCO : 1" + "-32.05","[H]OO[H]", // 18,"hydrogen peroxide|","H2O2 : 1" + "-190.52","OC(=O)CC(=O)C([O-])=O", // 20,"oxaloacetate|oaa|",">C=O : 1 | -CH2- : 1 | -COO : 2 | Origin : 1 | OCCO : 1" + "-87.73","[N+]CC([O-])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" + "-87.73","[NH3+]CC([O-1])=O", // 21,"glycine|gly|","-COO : 1 | -CH2- : 1 | -NH3 : 1 | Origin : 1" + "-162.96","[O-]C(=O)CCC([O-])=O", // 23,"succinate|succ|","-COO : 2 | -CH2- : 2 | Origin : 1" + + "" // marks the end of the array +}; + +std::string getSMILES(const std::string & smiles, EnergyCalculation & energyCalc, double& energyAdd ); + +int main() { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::chem::RRC_ArrheniusLaw \n" + <<"==============================================\n" + < -#include - -#include "ggl/Graph.hh" -#include - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/SMILES_grammar.hh" - -#include "dataTargetGraph_1.icc" - -#include "utilPrintGraph_Interface.icc" - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::chem::SMILES_grammar \n" - <<"==============================================\n" - < SMILES; - - SMILES.push_back( "CC(C)C(=O)O" ); - SMILES.push_back( "n1ccccc1" ); - SMILES.push_back( "[nH]1cccc1" ); - SMILES.push_back( "[CH3][CH]=[CH][CH3]" ); - - // all the following 18 SMILES encode the same molecule - SMILES.push_back( "C=12CC1C2" ); - SMILES.push_back( "C=12CC1C-2" ); - SMILES.push_back( "C=1-2CC1C2" ); - SMILES.push_back( "C=1-2CC1C-2" ); - SMILES.push_back( "C12CC=1C2" ); - SMILES.push_back( "C12CC=1C-2" ); - SMILES.push_back( "C1-2CC=1C2" ); - SMILES.push_back( "C1-2CC=1C-2" ); - SMILES.push_back( "C=1-2CC=1C-2" ); - SMILES.push_back( "C1=2CC2C1" ); - SMILES.push_back( "C-1=2CC2C1" ); - SMILES.push_back( "C1=2CC2C-1" ); - SMILES.push_back( "C-1=2CC2C-1" ); - SMILES.push_back( "C12CC=2C1" ); - SMILES.push_back( "C-12CC=2C1" ); - SMILES.push_back( "C12CC=2C-1" ); - SMILES.push_back( "C-12CC=2C-1" ); - SMILES.push_back( "C-1=2CC=2C-1" ); - SMILES.push_back( "O[As]" ); - SMILES.push_back( "[H][C]12CCC3=Cc4oncc4C[C]3(C)[C]1([H])CC[C]1(C)[C]2([H])CC[C]1(O)C#C" ); - SMILES.push_back( "CC(O)C(O)C1CNc2nc(N)[nH]c(=O)c2N1" ); - SMILES.push_back( "N#CSCc1ccccc1" ); - SMILES.push_back( "CN(C)c1ccc2nc3ccc(cc3[s+]c2c1)N(C)C" ); - SMILES.push_back( "C1=CC=[N](C=C1)[Ag++]([N]1=CC=CC=C1)([N]1=CC=CC=C1)[N]1=CC=CC=C1" ); - - SMILES.push_back( "c1ccccc1c2ccccc2" ); - SMILES.push_back( "c1ccccc1-c2ccccc2" ); - SMILES.push_back( "c1ccc(cc1)-c2ccccc2" ); - - SMILES.push_back( "c1cc[se]c1" ); - - SMILES.push_back( "[c:13]1cc[se]c1C[Br:5]" ); - - // with coordination bonds - SMILES.push_back( "C^C" ); - SMILES.push_back( "[Fe+2](^O)^O" ); - - // special ring closure case (with leading bond) - SMILES.push_back( "C(C%10CC=%10)=C" ); - - - - for (size_t i=0; i info; - ggl::chem::SMILES_grammar smiles_grammar(toFill); - - - try { - // parse smiles string into graph - info = NS_BOOSTSPIRIT::parse(SMILES[i].c_str(), smiles_grammar); - - // check if parsing was successful - if (info.full) { - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(toFill); - print(toPrint); - std::cout < SMILES Parser failed !!!\n" - << "stoped at: \"" << info.stop << "\"" <<"\n" - << "\"" << SMILES[i] << "\"" <<"\n" - << std::setw(1+info.length) << " " << "^ error" - <<"\n" - << std::endl; - } - - std::cout <<" --> call SMILES_grammar::parse(..) "< result - = ggl::chem::SMILES_grammar::parseSMILES(SMILES[i]); - if (result.second == -1) { - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(result.first); - print(toPrint); - std::cout < SMILES Parser failed !!!\n" - << "stoped at: \"" << SMILES[i][result.second] << "\"" <<"\n" - << "\"" << SMILES[i] << "\"" <<"\n" - << std::setw(1+result.second) << " " << "^ error" - <<"\n" - << std::endl; - } - } catch (std::exception &ex) { - std::cout <<" EXCEPTION RAISED for parsing SMILES '" - << SMILES[i] - <<"' :\n" - << ex.what(); - } - - } - - std::cout <<"\n" - <<"=============== TEST END ===================\n" - <<"==============================================\n" - < +#include + +#include "ggl/Graph.hh" +#include + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/SMILES_grammar.hh" + +#include "dataTargetGraph_1.icc" + +#include "utilPrintGraph_Interface.icc" + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::chem::SMILES_grammar \n" + <<"==============================================\n" + < SMILES; + + SMILES.push_back( "CC(C)C(=O)O" ); + SMILES.push_back( "n1ccccc1" ); + SMILES.push_back( "[nH]1cccc1" ); + SMILES.push_back( "[CH3][CH]=[CH][CH3]" ); + + // all the following 18 SMILES encode the same molecule + SMILES.push_back( "C=12CC1C2" ); + SMILES.push_back( "C=12CC1C-2" ); + SMILES.push_back( "C=1-2CC1C2" ); + SMILES.push_back( "C=1-2CC1C-2" ); + SMILES.push_back( "C12CC=1C2" ); + SMILES.push_back( "C12CC=1C-2" ); + SMILES.push_back( "C1-2CC=1C2" ); + SMILES.push_back( "C1-2CC=1C-2" ); + SMILES.push_back( "C=1-2CC=1C-2" ); + SMILES.push_back( "C1=2CC2C1" ); + SMILES.push_back( "C-1=2CC2C1" ); + SMILES.push_back( "C1=2CC2C-1" ); + SMILES.push_back( "C-1=2CC2C-1" ); + SMILES.push_back( "C12CC=2C1" ); + SMILES.push_back( "C-12CC=2C1" ); + SMILES.push_back( "C12CC=2C-1" ); + SMILES.push_back( "C-12CC=2C-1" ); + SMILES.push_back( "C-1=2CC=2C-1" ); + SMILES.push_back( "O[As]" ); + SMILES.push_back( "[H][C]12CCC3=Cc4oncc4C[C]3(C)[C]1([H])CC[C]1(C)[C]2([H])CC[C]1(O)C#C" ); + SMILES.push_back( "CC(O)C(O)C1CNc2nc(N)[nH]c(=O)c2N1" ); + SMILES.push_back( "N#CSCc1ccccc1" ); + SMILES.push_back( "CN(C)c1ccc2nc3ccc(cc3[s+]c2c1)N(C)C" ); + SMILES.push_back( "C1=CC=[N](C=C1)[Ag++]([N]1=CC=CC=C1)([N]1=CC=CC=C1)[N]1=CC=CC=C1" ); + + SMILES.push_back( "c1ccccc1c2ccccc2" ); + SMILES.push_back( "c1ccccc1-c2ccccc2" ); + SMILES.push_back( "c1ccc(cc1)-c2ccccc2" ); + + SMILES.push_back( "c1cc[se]c1" ); + + SMILES.push_back( "[c:13]1cc[se]c1C[Br:5]" ); + + // with coordination bonds + SMILES.push_back( "C^C" ); + SMILES.push_back( "[Fe+2](^O)^O" ); + + // special ring closure case (with leading bond) + SMILES.push_back( "C(C%10CC=%10)=C" ); + + + + for (size_t i=0; i info; + ggl::chem::SMILES_grammar smiles_grammar(toFill); + + + try { + // parse smiles string into graph + info = NS_BOOSTSPIRIT::parse(SMILES[i].c_str(), smiles_grammar); + + // check if parsing was successful + if (info.full) { + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(toFill); + print(toPrint); + std::cout < SMILES Parser failed !!!\n" + << "stoped at: \"" << info.stop << "\"" <<"\n" + << "\"" << SMILES[i] << "\"" <<"\n" + << std::setw(1+info.length) << " " << "^ error" + <<"\n" + << std::endl; + } + + std::cout <<" --> call SMILES_grammar::parse(..) "< result + = ggl::chem::SMILES_grammar::parseSMILES(SMILES[i]); + if (result.second == -1) { + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(result.first); + print(toPrint); + std::cout < SMILES Parser failed !!!\n" + << "stoped at: \"" << SMILES[i][result.second] << "\"" <<"\n" + << "\"" << SMILES[i] << "\"" <<"\n" + << std::setw(1+result.second) << " " << "^ error" + <<"\n" + << std::endl; + } + } catch (std::exception &ex) { + std::cout <<" EXCEPTION RAISED for parsing SMILES '" + << SMILES[i] + <<"' :\n" + << ex.what(); + } + + } + + std::cout <<"\n" + <<"=============== TEST END ===================\n" + <<"==============================================\n" + < -#include - -#include "ggl/Graph.hh" -#include - -#include "ggl/Rule_GML_writer.hh" - -#include "ggl/chem/Molecule.hh" -#include "ggl/chem/SMILESparser.hh" - -#include "dataTargetGraph_1.icc" - -//#include "utilPrintGraph_Interface.icc" -#include "utilPrintRule.icc" - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" ggl::chem::SMILESparser \n" - <<"==============================================\n" - < singleSMILES; - singleSMILES.push_back( "COc1cccc(c1)C#N" ); - singleSMILES.push_back( "COc(cc1)ccc1C#N" ); - singleSMILES.push_back( "c1ccccc1c2ccccc2" ); - - for (size_t i=0; i toFill = ggl::chem::SMILESparser::parseSMILES(singleSMILES.at(i)); - if (toFill.second == -1) { - - std::cout <<" ==> singleSMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < multiSMILES; - multiSMILES.push_back( "CC.O.[CH4]" ); - - for (size_t i=0; i toFill = ggl::chem::SMILESparser::parseMultiSMILES(multiSMILES.at(i)); - - std::cout <<" ==> multiSMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < &>(toFill) )); - std::cout < reactionSMILES; - reactionSMILES.push_back( "[C:13][C-2:2].[O:3]>>[O:3]=[C:2][C:13]" ); - - for (size_t i=0; i reactionSMILES Parser succeeded\n" - <<" ==> create rule :\n" - < +#include + +#include "ggl/Graph.hh" +#include + +#include "ggl/Rule_GML_writer.hh" + +#include "ggl/chem/Molecule.hh" +#include "ggl/chem/SMILESparser.hh" + +#include "dataTargetGraph_1.icc" + +//#include "utilPrintGraph_Interface.icc" +#include "utilPrintRule.icc" + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" ggl::chem::SMILESparser \n" + <<"==============================================\n" + < singleSMILES; + singleSMILES.push_back( "COc1cccc(c1)C#N" ); + singleSMILES.push_back( "COc(cc1)ccc1C#N" ); + singleSMILES.push_back( "c1ccccc1c2ccccc2" ); + + for (size_t i=0; i toFill = ggl::chem::SMILESparser::parseSMILES(singleSMILES.at(i)); + if (toFill.second == -1) { + + std::cout <<" ==> singleSMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < multiSMILES; + multiSMILES.push_back( "CC.O.[CH4]" ); + + for (size_t i=0; i toFill = ggl::chem::SMILESparser::parseMultiSMILES(multiSMILES.at(i)); + + std::cout <<" ==> multiSMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < &>(toFill) )); + std::cout < reactionSMILES; + reactionSMILES.push_back( "[C:13][C-2:2].[O:3]>>[O:3]=[C:2][C:13]" ); + + for (size_t i=0; i reactionSMILES Parser succeeded\n" + <<" ==> create rule :\n" + < - - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl::chem; - -#include -#include - -/** - * creates a node shuffled copy of the given molecule according to the index map. - */ -Molecule getShuffle( const Molecule & mol, const std::vector indexMap ) { - assert(boost::num_vertices(mol) == indexMap.size()); - - boost::property_map< Molecule, PropNodeLabel>::const_type - mNodeLabel = (boost::get( PropNodeLabel(), mol )); - boost::property_map< Molecule, PropEdgeLabel>::const_type - mEdgeLabel = (boost::get( PropEdgeLabel(), mol )); - boost::property_map< Molecule, PropNodeIndex>::const_type - mNodeIndex = (boost::get( PropNodeIndex(), mol )); - - Molecule ret; - boost::property_map< Molecule, PropNodeLabel>::type - rNodeLabel = (boost::get( PropNodeLabel(), ret )); - boost::property_map< Molecule, PropEdgeLabel>::type - rEdgeLabel = (boost::get( PropEdgeLabel(), ret )); - boost::property_map< Molecule, PropNodeIndex>::const_type - rNodeIndex = (boost::get( PropNodeIndex(), ret )); - - // get reverse mapping - const std::vector& mol2ret = indexMap; - std::vector ret2mol(mol2ret.size(),0); - for (size_t i=0; i SMILES; - - // basics - SMILES.push_back("[H+]"); - SMILES.push_back("HH"); - SMILES.push_back("[HH]"); - SMILES.push_back("[H][H]"); - SMILES.push_back("O"); - SMILES.push_back("[OH-]"); - SMILES.push_back("[O-]"); - SMILES.push_back("[O+]"); - SMILES.push_back("[OH3+]"); - - - SMILES.push_back( "CC(C)C(=O)O" ); - SMILES.push_back( "n1ccccc1" ); - - SMILES.push_back( "[nH]1cccc1" ); - SMILES.push_back( "Hn1cccc1" ); - - SMILES.push_back( "CC(C)(N)Cc1ccccc1" ); - - SMILES.push_back( "C(OP([O-])(=O)[O-])C1(OC(O)CC1(O))" ); - - // equal - SMILES.push_back( "Cn1cnc2n(C)c(=O)n(C)c(=O)c12" ); - SMILES.push_back( "Cn1cnc2c1c(=O)n(C)c(=O)n2C" ); - - // equal - SMILES.push_back( "CCN(CC)C(=O)" ); - SMILES.push_back( "CCN(C=O)CC" ); - - // equal - SMILES.push_back( "COc1cccc(C#N)c1" ); - SMILES.push_back( "COc(c1)cccc1C#N" ); - SMILES.push_back( "COc1cccc(CN)c1" ); - - // equal - SMILES.push_back( "COc(cc1)ccc1C#N" ); - SMILES.push_back( "COc1ccc(CN)cc1" ); - - // equal - SMILES.push_back( "c1ccccc1-c2ccccc2" ); - SMILES.push_back( "c1ccc(cc1)-c2ccccc2" ); - - // with coordination bonds - SMILES.push_back( "C^C" ); - SMILES.push_back( "[Fe+2](^O)^O" ); - SMILES.push_back( "c1cc(O2)c([O-]^[Fe+2]^2)cc1" ); - - for (size_t i=0; i call SMILESparser::parse(..) "< result - = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); - if (result.second == -1) { - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(result.first); - print(toPrint); - std::cout < SMILES Parser failed !!!\n" - << "stopped at: \"" << SMILES[i][result.second] << "\"" <<"\n" - << "\"" << SMILES[i] << "\"" <<"\n" - << std::setw(1+result.second) << " " << "^ error" - <<"\n" - << std::endl; - // go to next - continue; - } - - - std::cout <<" --> call newSMILES = SMILESwriter::getSMILES(..) = "; std::cout.flush(); - std::string newSMILES = ggl::chem::SMILESwriter::getSMILES(result.first); - std::cout <<"'" < call MoleculeUtil::fillProtons(..) "< call newSMILES = SMILESwriter::getSMILES( filled, ignoreProtons=false ) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); - std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( filled, ignoreProtons=true ) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); - std::cout <<"'" < call MoleculeUtil::compressHnodes( compMol ) "< call newSMILES = SMILESwriter::getSMILES( compMol, ignoreProtons=false) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); - std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( compMol, ignoreProtons=true ) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); - std::cout <<"'" < call MoleculeUtil::removeProtons(..) "< call newSMILES = SMILESwriter::getSMILES( remMol, ignoreProtons=false ) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); - std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( remMol, ignoreProtons=true ) = "; std::cout.flush(); - newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); - std::cout <<"'" < call SMILESparser::parse(..) "< result - = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); - if (result.second != -1) { - std::cout << " ==> SMILES Parser failed !!!\n" - << "stopped at: \"" << SMILES[i][result.second] << "\"" <<"\n" - << "\"" << SMILES[i] << "\"" <<"\n" - << std::setw(1+result.second) << " " << "^ error" - <<"\n" - << std::endl; - // go to next - continue; - } - - size_t numNonProtons = boost::num_vertices(result.first); - ggl::chem::MoleculeUtil::fillProtons( result.first ); - - std::set permutations; - - std::vector indexMap(boost::num_vertices(result.first),0); - for(size_t i=0; i rotMap = indexMap; - std::rotate_copy( indexMap.begin(), indexMap.begin()+first, indexMap.begin()+numNonProtons, rotMap.begin()); - Molecule permutation = getShuffle( result.first, rotMap ); -// -// do { -// Molecule permutation = getShuffle( result.first, indexMap ); - std::string permSMILES = ggl::chem::SMILESwriter::getSMILES( permutation ); - if ( permutations.find(permSMILES) == permutations.end()) { - std::cout <<" permutation number "< + + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl::chem; + +#include +#include + +/** + * creates a node shuffled copy of the given molecule according to the index map. + */ +Molecule getShuffle( const Molecule & mol, const std::vector indexMap ) { + assert(boost::num_vertices(mol) == indexMap.size()); + + boost::property_map< Molecule, PropNodeLabel>::const_type + mNodeLabel = (boost::get( PropNodeLabel(), mol )); + boost::property_map< Molecule, PropEdgeLabel>::const_type + mEdgeLabel = (boost::get( PropEdgeLabel(), mol )); + boost::property_map< Molecule, PropNodeIndex>::const_type + mNodeIndex = (boost::get( PropNodeIndex(), mol )); + + Molecule ret; + boost::property_map< Molecule, PropNodeLabel>::type + rNodeLabel = (boost::get( PropNodeLabel(), ret )); + boost::property_map< Molecule, PropEdgeLabel>::type + rEdgeLabel = (boost::get( PropEdgeLabel(), ret )); + boost::property_map< Molecule, PropNodeIndex>::const_type + rNodeIndex = (boost::get( PropNodeIndex(), ret )); + + // get reverse mapping + const std::vector& mol2ret = indexMap; + std::vector ret2mol(mol2ret.size(),0); + for (size_t i=0; i SMILES; + + // basics + SMILES.push_back("[H+]"); + SMILES.push_back("HH"); + SMILES.push_back("[HH]"); + SMILES.push_back("[H][H]"); + SMILES.push_back("O"); + SMILES.push_back("[OH-]"); + SMILES.push_back("[O-]"); + SMILES.push_back("[O+]"); + SMILES.push_back("[OH3+]"); + + + SMILES.push_back( "CC(C)C(=O)O" ); + SMILES.push_back( "n1ccccc1" ); + + SMILES.push_back( "[nH]1cccc1" ); + SMILES.push_back( "Hn1cccc1" ); + + SMILES.push_back( "CC(C)(N)Cc1ccccc1" ); + + SMILES.push_back( "C(OP([O-])(=O)[O-])C1(OC(O)CC1(O))" ); + + // equal + SMILES.push_back( "Cn1cnc2n(C)c(=O)n(C)c(=O)c12" ); + SMILES.push_back( "Cn1cnc2c1c(=O)n(C)c(=O)n2C" ); + + // equal + SMILES.push_back( "CCN(CC)C(=O)" ); + SMILES.push_back( "CCN(C=O)CC" ); + + // equal + SMILES.push_back( "COc1cccc(C#N)c1" ); + SMILES.push_back( "COc(c1)cccc1C#N" ); + SMILES.push_back( "COc1cccc(CN)c1" ); + + // equal + SMILES.push_back( "COc(cc1)ccc1C#N" ); + SMILES.push_back( "COc1ccc(CN)cc1" ); + + // equal + SMILES.push_back( "c1ccccc1-c2ccccc2" ); + SMILES.push_back( "c1ccc(cc1)-c2ccccc2" ); + + // with coordination bonds + SMILES.push_back( "C^C" ); + SMILES.push_back( "[Fe+2](^O)^O" ); + SMILES.push_back( "c1cc(O2)c([O-]^[Fe+2]^2)cc1" ); + + for (size_t i=0; i call SMILESparser::parse(..) "< result + = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); + if (result.second == -1) { + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(result.first); + print(toPrint); + std::cout < SMILES Parser failed !!!\n" + << "stopped at: \"" << SMILES[i][result.second] << "\"" <<"\n" + << "\"" << SMILES[i] << "\"" <<"\n" + << std::setw(1+result.second) << " " << "^ error" + <<"\n" + << std::endl; + // go to next + continue; + } + + + std::cout <<" --> call newSMILES = SMILESwriter::getSMILES(..) = "; std::cout.flush(); + std::string newSMILES = ggl::chem::SMILESwriter::getSMILES(result.first); + std::cout <<"'" < call MoleculeUtil::fillProtons(..) "< call newSMILES = SMILESwriter::getSMILES( filled, ignoreProtons=false ) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); + std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( filled, ignoreProtons=true ) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); + std::cout <<"'" < call MoleculeUtil::compressHnodes( compMol ) "< call newSMILES = SMILESwriter::getSMILES( compMol, ignoreProtons=false) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); + std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( compMol, ignoreProtons=true ) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); + std::cout <<"'" < call MoleculeUtil::removeProtons(..) "< call newSMILES = SMILESwriter::getSMILES( remMol, ignoreProtons=false ) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, false ); + std::cout <<"'" < call newSMILES = SMILESwriter::getSMILES( remMol, ignoreProtons=true ) = "; std::cout.flush(); + newSMILES = ggl::chem::SMILESwriter::getSMILES( result.first, true ); + std::cout <<"'" < call SMILESparser::parse(..) "< result + = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); + if (result.second != -1) { + std::cout << " ==> SMILES Parser failed !!!\n" + << "stopped at: \"" << SMILES[i][result.second] << "\"" <<"\n" + << "\"" << SMILES[i] << "\"" <<"\n" + << std::setw(1+result.second) << " " << "^ error" + <<"\n" + << std::endl; + // go to next + continue; + } + + size_t numNonProtons = boost::num_vertices(result.first); + ggl::chem::MoleculeUtil::fillProtons( result.first ); + + std::set permutations; + + std::vector indexMap(boost::num_vertices(result.first),0); + for(size_t i=0; i rotMap = indexMap; + std::rotate_copy( indexMap.begin(), indexMap.begin()+first, indexMap.begin()+numNonProtons, rotMap.begin()); + Molecule permutation = getShuffle( result.first, rotMap ); +// +// do { +// Molecule permutation = getShuffle( result.first, indexMap ); + std::string permSMILES = ggl::chem::SMILESwriter::getSMILES( permutation ); + if ( permutations.find(permSMILES) == permutations.end()) { + std::cout <<" permutation number "< - - -#include "utilPrintGraph_Interface.icc" - -#include - -int main() { - - std::vector SMILES; - - SMILES.push_back( "CC(C)C(=O)O" ); - SMILES.push_back( "N1CCCCC1" ); - SMILES.push_back( "C1NCCCC1" ); - SMILES.push_back( "C1CNCCC1" ); - SMILES.push_back( "C1CCNCC1" ); - SMILES.push_back( "C1CCCNC1" ); - SMILES.push_back( "C1CCCCN1" ); - SMILES.push_back( "[NH]1CCCC1" ); - - - for (size_t i=0; i call SMILESparser::parse(..) "< result - = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); - if (result.second == -1) { - std::cout <<" ==> SMILES Parser succeeded\n" - <<" ==> resulting graph :\n" - < toPrint(result.first); - print(toPrint); - std::cout < SMILES Parser failed !!!\n" - << "stoped at: \"" << SMILES[i][result.second] << "\"" <<"\n" - << "\"" << SMILES[i] << "\"" <<"\n" - << std::setw(1+result.second) << " " << "^ error" - <<"\n" - << std::endl; - // go to next - continue; - } - - std::cout <<" --> call newSMILES = SMILESwriterOB::getSMILES(..) "< + + +#include "utilPrintGraph_Interface.icc" + +#include + +int main() { + + std::vector SMILES; + + SMILES.push_back( "CC(C)C(=O)O" ); + SMILES.push_back( "N1CCCCC1" ); + SMILES.push_back( "C1NCCCC1" ); + SMILES.push_back( "C1CNCCC1" ); + SMILES.push_back( "C1CCNCC1" ); + SMILES.push_back( "C1CCCNC1" ); + SMILES.push_back( "C1CCCCN1" ); + SMILES.push_back( "[NH]1CCCC1" ); + + + for (size_t i=0; i call SMILESparser::parse(..) "< result + = ggl::chem::SMILESparser::parseSMILES(SMILES[i]); + if (result.second == -1) { + std::cout <<" ==> SMILES Parser succeeded\n" + <<" ==> resulting graph :\n" + < toPrint(result.first); + print(toPrint); + std::cout < SMILES Parser failed !!!\n" + << "stoped at: \"" << SMILES[i][result.second] << "\"" <<"\n" + << "\"" << SMILES[i] << "\"" <<"\n" + << std::setw(1+result.second) << " " << "^ error" + <<"\n" + << std::endl; + // go to next + continue; + } + + std::cout <<" --> call newSMILES = SMILESwriterOB::getSMILES(..) "< - -#include "sgm/Graph_boost.hh" -#include "sgm/MR_stream.hh" -#include "sgm/GM_vf2.hh" - -#include "dataSGMgraphs_1.icc" -#include "dataSGMgraphs_2.icc" - -#include "utilPrintGraph_Interface.icc" - - typedef sgm::Graph_boost< MyGraph - , boost::vertex_name_t - , boost::edge_name_t - , boost::vertex_index_t - > GB; - - void - performTest ( const MyGraph& pattern, - const MyGraph& target, - const std::string wildcard = std::string("") ) - { - - GB pattern_(pattern); - sgm::Pattern patternGraph( pattern_ ); - if (wildcard.size() > 0) { - patternGraph = sgm::Pattern( pattern_, wildcard ); - } - GB targetGraph(target); - - std::cout <<"\n--> Pattern graph :\n" < Target graph :\n" < constructing sgm::GM_vf2()\n" < ONE pattern and ONE target\n" < create sgm::MR_stream\n" <findMatches( patternGraph, targetGraph, mr, UINT_MAX ); - - std::cout <<"\n found " < TWO pattern and ONE target\n" < patternGraphs; - patternGraphs.push_back(&patternGraph); - patternGraphs.push_back(&patternGraph); - std::vector outputs; - outputs.push_back(&mr); - outputs.push_back(&mr); - - if (wildcard.size() == 0) { - std::cout <<"\n find ALL matches with NO_WILDCARD :\n" <findMatches( patternGraphs, targetGraph, outputs, UINT_MAX ); - - std::cout <<"\n found " <findMatches( patternGraphs, targetGraph, outputs, 1 ); - - std::cout <<"\n found " < GB; - - std::string patternString; - std::string targetString; - - // example 1 - { - std::cout <<"\n == PATTERN ==\n" < + +#include "sgm/Graph_boost.hh" +#include "sgm/MR_stream.hh" +#include "sgm/GM_vf2.hh" + +#include "dataSGMgraphs_1.icc" +#include "dataSGMgraphs_2.icc" + +#include "utilPrintGraph_Interface.icc" + + typedef sgm::Graph_boost< MyGraph + , boost::vertex_name_t + , boost::edge_name_t + , boost::vertex_index_t + > GB; + + void + performTest ( const MyGraph& pattern, + const MyGraph& target, + const std::string wildcard = std::string("") ) + { + + GB pattern_(pattern); + sgm::Pattern patternGraph( pattern_ ); + if (wildcard.size() > 0) { + patternGraph = sgm::Pattern( pattern_, wildcard ); + } + GB targetGraph(target); + + std::cout <<"\n--> Pattern graph :\n" < Target graph :\n" < constructing sgm::GM_vf2()\n" < ONE pattern and ONE target\n" < create sgm::MR_stream\n" <findMatches( patternGraph, targetGraph, mr, UINT_MAX ); + + std::cout <<"\n found " < TWO pattern and ONE target\n" < patternGraphs; + patternGraphs.push_back(&patternGraph); + patternGraphs.push_back(&patternGraph); + std::vector outputs; + outputs.push_back(&mr); + outputs.push_back(&mr); + + if (wildcard.size() == 0) { + std::cout <<"\n find ALL matches with NO_WILDCARD :\n" <findMatches( patternGraphs, targetGraph, outputs, UINT_MAX ); + + std::cout <<"\n found " <findMatches( patternGraphs, targetGraph, outputs, 1 ); + + std::cout <<"\n found " < GB; + + std::string patternString; + std::string targetString; + + // example 1 + { + std::cout <<"\n == PATTERN ==\n" < -#include - -#include "ggl/Graph.hh" -#include "ggl/Graph_GML_writer.hh" -#include "ggl/Graph_GMLparser.hh" - -#include "sgm/Graph_boost.hh" -#include "sgm/GraphScaffold.hh" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace sgm; - -const std::string gml[] = { - "graph [ \n" - " node [ id 0 label \"a\" ]\n" - " node [ id 1 label \"b\" ]\n" - " node [ id 2 label \"c\" ]\n" - " node [ id 3 label \"d\" ]\n" - " edge [ source 1 target 0 label \"-\" ]\n" - " edge [ source 2 target 1 label \"-\" ]\n" - " edge [ source 3 target 1 label \"-\" ]\n" - "]\n" - , - "graph [ \n" - " node [ id 0 label \"a\" ]\n" - " node [ id 1 label \"b\" ]\n" - " node [ id 2 label \"c\" ]\n" - " node [ id 3 label \"d\" ]\n" - " node [ id 4 label \"e\" ]\n" - " node [ id 5 label \"f\" ]\n" - " node [ id 6 label \"g\" ]\n" - " node [ id 7 label \"h\" ]\n" - " node [ id 8 label \"i\" ]\n" - " node [ id 9 label \"j\" ]\n" - " node [ id 10 label \"k\" ]\n" - " node [ id 11 label \"l\" ]\n" - " edge [ source 1 target 0 label \"-\" ]\n" - " edge [ source 2 target 1 label \"-\" ]\n" - " edge [ source 3 target 2 label \"-\" ]\n" - " edge [ source 3 target 0 label \"-\" ]\n" - " edge [ source 4 target 3 label \"-\" ]\n" - " edge [ source 5 target 4 label \"-\" ]\n" - " edge [ source 6 target 5 label \"-\" ]\n" - " edge [ source 7 target 6 label \"-\" ]\n" - " edge [ source 8 target 7 label \"-\" ]\n" - " edge [ source 9 target 8 label \"-\" ]\n" - " edge [ source 9 target 6 label \"-\" ]\n" - " edge [ source 9 target 10 label \"-\" ]\n" - " edge [ source 9 target 11 label \"-\" ]\n" - " edge [ source 11 target 11 label \"-\" ]\n" - "]\n" - , - "" -}; - - /*! - * RingReporter that just counts the number of reported rings. - */ -class RR_Count : public sgm::RingReporter { -public: - size_t ringCount; - //! construction - RR_Count() : RingReporter(), ringCount(0) { reset(); } - //! destruction - virtual ~RR_Count(){} - - void - reset() {ringCount = 0;}; - - void - reportRing( const Graph_Interface& graph, const RingList & ringList ) - { - ringCount++; -// std::ostream& out = std::cout; -// out <<" * reported ring : "; -// for (RingList::const_iterator it=ringList.begin(); it!=ringList.end(); it++) { -// out <<*(it) <<" "; -// } -// out <Graph_GMLparser::parseGraph( GML )" < ret = ggl::Graph_GMLparser::parseGraph( graphString ); - - if (ret.second >= 0 ) { - std::cout <<"\n PARSING ERROR : at input position " < gi(ret.first); - std::cout <<"\n result graph : " <GraphScaffold::getScaffoldAnnotation( graph )" < +#include + +#include "ggl/Graph.hh" +#include "ggl/Graph_GML_writer.hh" +#include "ggl/Graph_GMLparser.hh" + +#include "sgm/Graph_boost.hh" +#include "sgm/GraphScaffold.hh" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace sgm; + +const std::string gml[] = { + "graph [ \n" + " node [ id 0 label \"a\" ]\n" + " node [ id 1 label \"b\" ]\n" + " node [ id 2 label \"c\" ]\n" + " node [ id 3 label \"d\" ]\n" + " edge [ source 1 target 0 label \"-\" ]\n" + " edge [ source 2 target 1 label \"-\" ]\n" + " edge [ source 3 target 1 label \"-\" ]\n" + "]\n" + , + "graph [ \n" + " node [ id 0 label \"a\" ]\n" + " node [ id 1 label \"b\" ]\n" + " node [ id 2 label \"c\" ]\n" + " node [ id 3 label \"d\" ]\n" + " node [ id 4 label \"e\" ]\n" + " node [ id 5 label \"f\" ]\n" + " node [ id 6 label \"g\" ]\n" + " node [ id 7 label \"h\" ]\n" + " node [ id 8 label \"i\" ]\n" + " node [ id 9 label \"j\" ]\n" + " node [ id 10 label \"k\" ]\n" + " node [ id 11 label \"l\" ]\n" + " edge [ source 1 target 0 label \"-\" ]\n" + " edge [ source 2 target 1 label \"-\" ]\n" + " edge [ source 3 target 2 label \"-\" ]\n" + " edge [ source 3 target 0 label \"-\" ]\n" + " edge [ source 4 target 3 label \"-\" ]\n" + " edge [ source 5 target 4 label \"-\" ]\n" + " edge [ source 6 target 5 label \"-\" ]\n" + " edge [ source 7 target 6 label \"-\" ]\n" + " edge [ source 8 target 7 label \"-\" ]\n" + " edge [ source 9 target 8 label \"-\" ]\n" + " edge [ source 9 target 6 label \"-\" ]\n" + " edge [ source 9 target 10 label \"-\" ]\n" + " edge [ source 9 target 11 label \"-\" ]\n" + " edge [ source 11 target 11 label \"-\" ]\n" + "]\n" + , + "" +}; + + /*! + * RingReporter that just counts the number of reported rings. + */ +class RR_Count : public sgm::RingReporter { +public: + size_t ringCount; + //! construction + RR_Count() : RingReporter(), ringCount(0) { reset(); } + //! destruction + virtual ~RR_Count(){} + + void + reset() {ringCount = 0;}; + + void + reportRing( const Graph_Interface& graph, const RingList & ringList ) + { + ringCount++; +// std::ostream& out = std::cout; +// out <<" * reported ring : "; +// for (RingList::const_iterator it=ringList.begin(); it!=ringList.end(); it++) { +// out <<*(it) <<" "; +// } +// out <Graph_GMLparser::parseGraph( GML )" < ret = ggl::Graph_GMLparser::parseGraph( graphString ); + + if (ret.second >= 0 ) { + std::cout <<"\n PARSING ERROR : at input position " < gi(ret.first); + std::cout <<"\n result graph : " <GraphScaffold::getScaffoldAnnotation( graph )" < - -#include "sgm/Graph_boost.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - - - void - printIteration( const sgm::Graph_Interface& g ) - { - for (size_t i=0; i "; - for (sgm::Graph_Interface::OutEdge_iterator e = g.getOutEdgesBegin(i); - e != g.getOutEdgesEnd(i); ++e) - { - std::cout <<" | " <<(*e).getToIndex() <<" (" <<(*e).getEdgeLabel() <<")"; - } - std::cout <<" |\n"; - } - - } - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::Graph_boost \n" - <<"==============================================\n" - < GB; - - std::string patternString; - std::string targetString; - - // example 1 - { - std::cout <<"\n == PATTERN ==\n" < create sgm::Graph_boost \n" < create sgm::Graph_boost \n" < comparison : (pattern == pattern) = "; - std::cout.flush(); - std::cout <<(pg==pg?"true":"false") < comparison : (pattern != pattern) = "; - std::cout.flush(); - std::cout <<(pg!=pg?"true":"false") < comparison : (pattern == target) = "; - std::cout.flush(); - std::cout <<(pg==tg?"true":"false") < comparison : (pattern != target) = "; - std::cout.flush(); - std::cout <<(pg!=tg?"true":"false") < create sgm::Graph_boost \n" < + +#include "sgm/Graph_boost.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + + + void + printIteration( const sgm::Graph_Interface& g ) + { + for (size_t i=0; i "; + for (sgm::Graph_Interface::OutEdge_iterator e = g.getOutEdgesBegin(i); + e != g.getOutEdgesEnd(i); ++e) + { + std::cout <<" | " <<(*e).getToIndex() <<" (" <<(*e).getEdgeLabel() <<")"; + } + std::cout <<" |\n"; + } + + } + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::Graph_boost \n" + <<"==============================================\n" + < GB; + + std::string patternString; + std::string targetString; + + // example 1 + { + std::cout <<"\n == PATTERN ==\n" < create sgm::Graph_boost \n" < create sgm::Graph_boost \n" < comparison : (pattern == pattern) = "; + std::cout.flush(); + std::cout <<(pg==pg?"true":"false") < comparison : (pattern != pattern) = "; + std::cout.flush(); + std::cout <<(pg!=pg?"true":"false") < comparison : (pattern == target) = "; + std::cout.flush(); + std::cout <<(pg==tg?"true":"false") < comparison : (pattern != target) = "; + std::cout.flush(); + std::cout <<(pg!=tg?"true":"false") < create sgm::Graph_boost \n" < - -#include "sgm/Graph_boostV_p.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::Graph_boostV_p \n" - <<"==============================================\n" - < GBV; - - std::string graphString; - - // example 1 - { - std::cout <<"\n == GRAPH ==\n" < graphs; - - graphs.push_back( getPattern_1( graphString ) ); - std::cout < graphP(graphs.size(), NULL); - for (size_t i=0; i create sgm::Graph_boostV_p g \n" < connectedComponents( g ) = "; std::cout.flush(); - std::cout < component labeling :" < + +#include "sgm/Graph_boostV_p.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::Graph_boostV_p \n" + <<"==============================================\n" + < GBV; + + std::string graphString; + + // example 1 + { + std::cout <<"\n == GRAPH ==\n" < graphs; + + graphs.push_back( getPattern_1( graphString ) ); + std::cout < graphP(graphs.size(), NULL); + for (size_t i=0; i create sgm::Graph_boostV_p g \n" < connectedComponents( g ) = "; std::cout.flush(); + std::cout < component labeling :" < - -#include "sgm/Graph_boost.hh" -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/MC_Edge.hh" -#include "sgm/Pattern.hh" - -#include "dataSGMgraphs_1.icc" -#include "dataSGMgraphs_2.icc" -#include "dataSGMgraphs_3.icc" - -#include "utilPrintGraph_Interface.icc" - - - typedef sgm::Graph_boost< MyGraph - , boost::vertex_name_t - , boost::edge_name_t - , boost::vertex_index_t - > GB; - -void test_MC_NoEdge () { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::MC_NoEdge \n" - <<"==============================================\n" - <::type - nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); - - - // node 0 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - // node 1 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - // node 2 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; - edgeLabel[e] = wildcard; - } - - std::cout <<"\n == PATTERN ==}\n" <::type - nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); - - - // node 0 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - // node 1 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; - edgeLabel[e] = wildcard; - } - - std::cout <<"\n == PATTERN ==}\n" < + +#include "sgm/Graph_boost.hh" +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/MC_Edge.hh" +#include "sgm/Pattern.hh" + +#include "dataSGMgraphs_1.icc" +#include "dataSGMgraphs_2.icc" +#include "dataSGMgraphs_3.icc" + +#include "utilPrintGraph_Interface.icc" + + + typedef sgm::Graph_boost< MyGraph + , boost::vertex_name_t + , boost::edge_name_t + , boost::vertex_index_t + > GB; + +void test_MC_NoEdge () { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::MC_NoEdge \n" + <<"==============================================\n" + <::type + nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); + + + // node 0 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + // node 1 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + // node 2 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; + edgeLabel[e] = wildcard; + } + + std::cout <<"\n == PATTERN ==}\n" <::type + nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); + + + // node 0 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + // node 1 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; + edgeLabel[e] = wildcard; + } + + std::cout <<"\n == PATTERN ==}\n" < - -#include "sgm/Graph_boost.hh" -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" -#include "sgm/MC_Node.hh" -#include "sgm/Pattern.hh" - -#include "dataSGMgraphs_1.icc" -#include "dataSGMgraphs_2.icc" -#include "dataSGMgraphs_3.icc" - -#include "utilPrintGraph_Interface.icc" - - - typedef sgm::Graph_boost< MyGraph - , boost::vertex_name_t - , boost::edge_name_t - , boost::vertex_index_t - > GB; - - - -void test_MC_NodeLabel ( const bool allowedLabels ) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::MC_NodeLabel \n" - <<"==============================================\n" - <::type - nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); - - - // node 0 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - // node 1 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = "C"; - - // edge 0 - 1 - e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; - edgeLabel[e] = wildcard; - } - - std::cout <<"\n == PATTERN ==}\n" <::type - nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); - - - // node 0 - v = boost::add_vertex(patternGraph); - nodeLabel[v] = wildcard; - } - - std::cout <<"\n == PATTERN ==}\n" <::type - nodeLabel = boost::get( boost::vertex_name_t(), targetGraph ); - boost::property_map< MyGraph, boost::vertex_index_t >::type - nodeIndex = boost::get( boost::vertex_index_t(), targetGraph ); - // get level property class - boost::property_map< MyGraph, boost::edge_name_t >::type - edgeLabel = boost::get( boost::edge_name_t(), targetGraph ); - - size_t from = 0, to = 0; - - // node 0 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 0 - 0 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - - // node 1 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 1 - 1 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - - // node 2 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 2 - 2 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - // node 3 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - to = nodeIndex[v]; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - - // node 2 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 2 - 2 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - // node 3 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "N"; - to = nodeIndex[v]; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - - // node 2 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 2 - 2 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - // node 3 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - to = nodeIndex[v]; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - - // node 2 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "C"; - from = nodeIndex[v]; - to = nodeIndex[v]; - // edge 2 - 2 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - // node 3 - v = boost::add_vertex(targetGraph); - nodeLabel[v] = "N"; - to = nodeIndex[v]; - // edge 2 - 3 - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-1-"; - e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; - edgeLabel[e] = "-2-"; - - - } - - test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 0 ); - test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 1 ); - test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 2 ); - test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 3 ); - test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 4 ); - - return 0; -} - - + +#include + +#include "sgm/Graph_boost.hh" +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" +#include "sgm/MC_Node.hh" +#include "sgm/Pattern.hh" + +#include "dataSGMgraphs_1.icc" +#include "dataSGMgraphs_2.icc" +#include "dataSGMgraphs_3.icc" + +#include "utilPrintGraph_Interface.icc" + + + typedef sgm::Graph_boost< MyGraph + , boost::vertex_name_t + , boost::edge_name_t + , boost::vertex_index_t + > GB; + + + +void test_MC_NodeLabel ( const bool allowedLabels ) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::MC_NodeLabel \n" + <<"==============================================\n" + <::type + nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), patternGraph ); + + + // node 0 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + // node 1 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = "C"; + + // edge 0 - 1 + e = boost::add_edge(boost::vertex(0,patternGraph), boost::vertex(1,patternGraph), patternGraph).first; + edgeLabel[e] = wildcard; + } + + std::cout <<"\n == PATTERN ==}\n" <::type + nodeLabel = boost::get( boost::vertex_name_t(), patternGraph ); + + + // node 0 + v = boost::add_vertex(patternGraph); + nodeLabel[v] = wildcard; + } + + std::cout <<"\n == PATTERN ==}\n" <::type + nodeLabel = boost::get( boost::vertex_name_t(), targetGraph ); + boost::property_map< MyGraph, boost::vertex_index_t >::type + nodeIndex = boost::get( boost::vertex_index_t(), targetGraph ); + // get level property class + boost::property_map< MyGraph, boost::edge_name_t >::type + edgeLabel = boost::get( boost::edge_name_t(), targetGraph ); + + size_t from = 0, to = 0; + + // node 0 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 0 - 0 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + + // node 1 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 1 - 1 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + + // node 2 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 2 - 2 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + // node 3 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + to = nodeIndex[v]; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + + // node 2 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 2 - 2 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + // node 3 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "N"; + to = nodeIndex[v]; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + + // node 2 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 2 - 2 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + // node 3 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + to = nodeIndex[v]; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + + // node 2 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "C"; + from = nodeIndex[v]; + to = nodeIndex[v]; + // edge 2 - 2 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + // node 3 + v = boost::add_vertex(targetGraph); + nodeLabel[v] = "N"; + to = nodeIndex[v]; + // edge 2 - 3 + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-1-"; + e = boost::add_edge(boost::vertex(from,targetGraph), boost::vertex(to,targetGraph), targetGraph).first; + edgeLabel[e] = "-2-"; + + + } + + test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 0 ); + test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 1 ); + test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 2 ); + test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 3 ); + test_MC_NodeAdjacency( targetGraph, sgm::MC_NodeAdjacency::MC_EQ, 4 ); + + return 0; +} + + diff --git a/tests/testsgm_MR_Counting.cc b/tests/testsgm_MR_Counting.cc index 2e6eb0c..81b64b5 100644 --- a/tests/testsgm_MR_Counting.cc +++ b/tests/testsgm_MR_Counting.cc @@ -1,75 +1,75 @@ - - -#include - -#include "sgm/MR_Counting.hh" -#include "sgm/Graph_boost.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::MR_Counting \n" - <<"==============================================\n" - < create sgm::MR_Counting mr\n" < GB; - - // create graphs - std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.getHits() = " < mr.resetHits(..)" < mr.getHits() = " < mr.reportHit(..)" < mr.getHits() = " < + +#include "sgm/MR_Counting.hh" +#include "sgm/Graph_boost.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::MR_Counting \n" + <<"==============================================\n" + < create sgm::MR_Counting mr\n" < GB; + + // create graphs + std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.getHits() = " < mr.resetHits(..)" < mr.getHits() = " < mr.reportHit(..)" < mr.getHits() = " < - -#include "sgm/MR_Storing.hh" -#include "sgm/Graph_boost.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::MR_Storing \n" - <<"==============================================\n" - < create sgm::MR_Storing::Storage storage" < create sgm::MR_Storing(storage) mr\n" < GB; - - // create graphs - std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.reportHit(..)" < storage content:" < + +#include "sgm/MR_Storing.hh" +#include "sgm/Graph_boost.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::MR_Storing \n" + <<"==============================================\n" + < create sgm::MR_Storing::Storage storage" < create sgm::MR_Storing(storage) mr\n" < GB; + + // create graphs + std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.reportHit(..)" < storage content:" < - -#include "sgm/MR_stream.hh" -#include "sgm/Graph_boost.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::MR_stream \n" - <<"==============================================\n" - < create sgm::MR_stream(std::cout) mr\n" < GB; - - // create graphs - std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.resetHits(..)" < mr.reportHit(..)" < + +#include "sgm/MR_stream.hh" +#include "sgm/Graph_boost.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::MR_stream \n" + <<"==============================================\n" + < create sgm::MR_stream(std::cout) mr\n" < GB; + + // create graphs + std::cout <<"--> create dummy graphs \n" < create dummy match :\n" < mr.reportHit(..)" < mr.reportHit(..)" < mr.resetHits(..)" < mr.reportHit(..)" < -#include - -#include "ggl/Graph.hh" -#include "ggl/Graph_GML_writer.hh" -#include "ggl/Graph_GMLparser.hh" - -#include "sgm/Graph_boost.hh" -#include "sgm/RP_Hanser96.hh" - -#include "dataTargetGraph_1.icc" -#include "dataTargetGraph_2.icc" -#include "dataTargetGraph_3.icc" - -#include "utilPrintGraph_Interface.icc" - -using namespace ggl; -using namespace sgm; - -const std::string gml[] = { - "graph [ \n" - " node [ id 0 label \"a\" ]\n" - " node [ id 1 label \"b\" ]\n" - " node [ id 2 label \"c\" ]\n" - " node [ id 3 label \"d\" ]\n" - " node [ id 4 label \"e\" ]\n" - " node [ id 5 label \"f\" ]\n" - " node [ id 6 label \"g\" ]\n" - " node [ id 7 label \"h\" ]\n" - " edge [ source 0 target 1 label \"-\" ]\n" - " edge [ source 0 target 2 label \"-\" ]\n" - " edge [ source 0 target 7 label \"-\" ]\n" - " edge [ source 1 target 2 label \"-\" ]\n" - " edge [ source 1 target 3 label \"-\" ]\n" - " edge [ source 3 target 4 label \"-\" ]\n" - " edge [ source 3 target 5 label \"-\" ]\n" - " edge [ source 3 target 6 label \"-\" ]\n" - "]\n" - , - "graph [ \n" - " node [ id 0 label \"a\" ]\n" - " node [ id 1 label \"b\" ]\n" - " node [ id 2 label \"c\" ]\n" - " node [ id 3 label \"d\" ]\n" - " node [ id 4 label \"e\" ]\n" - " node [ id 5 label \"f\" ]\n" - " node [ id 6 label \"g\" ]\n" - " node [ id 7 label \"h\" ]\n" - " node [ id 8 label \"i\" ]\n" - " edge [ source 0 target 3 label \"-\" ]\n" - " edge [ source 0 target 6 label \"-\" ]\n" - " edge [ source 0 target 4 label \"-\" ]\n" - " edge [ source 1 target 4 label \"-\" ]\n" - " edge [ source 1 target 5 label \"-\" ]\n" - " edge [ source 1 target 7 label \"-\" ]\n" - " edge [ source 2 target 3 label \"-\" ]\n" - " edge [ source 2 target 5 label \"-\" ]\n" - " edge [ source 2 target 8 label \"-\" ]\n" - " edge [ source 3 target 6 label \"-\" ]\n" - " edge [ source 3 target 8 label \"-\" ]\n" - " edge [ source 4 target 6 label \"-\" ]\n" - " edge [ source 4 target 7 label \"-\" ]\n" - " edge [ source 5 target 7 label \"-\" ]\n" - " edge [ source 5 target 8 label \"-\" ]\n" - " edge [ source 6 target 7 label \"-\" ]\n" - " edge [ source 6 target 8 label \"-\" ]\n" - " edge [ source 7 target 8 label \"-\" ]\n" - "]\n" - , - "graph [ \n" - " node [ id 0 label \"a\" ]\n" - " node [ id 1 label \"b\" ]\n" - " node [ id 2 label \"c\" ]\n" - " node [ id 3 label \"d\" ]\n" - " node [ id 4 label \"e\" ]\n" - " node [ id 5 label \"f\" ]\n" - " node [ id 6 label \"g\" ]\n" - " node [ id 7 label \"h\" ]\n" - " node [ id 8 label \"i\" ]\n" - " node [ id 9 label \"j\" ]\n" - " node [ id 10 label \"k\" ]\n" - " node [ id 11 label \"l\" ]\n" - " node [ id 12 label \"m\" ]\n" - " node [ id 13 label \"n\" ]\n" - " node [ id 14 label \"o\" ]\n" - " node [ id 15 label \"p\" ]\n" - " node [ id 16 label \"q\" ]\n" - " edge [ source 0 target 1 label \"-\" ]\n" - " edge [ source 0 target 5 label \"-\" ]\n" - " edge [ source 1 target 2 label \"-\" ]\n" - " edge [ source 2 target 3 label \"-\" ]\n" - " edge [ source 2 target 6 label \"-\" ]\n" - " edge [ source 3 target 4 label \"-\" ]\n" - " edge [ source 3 target 9 label \"-\" ]\n" - " edge [ source 4 target 5 label \"-\" ]\n" - " edge [ source 6 target 7 label \"-\" ]\n" - " edge [ source 6 target 10 label \"-\" ]\n" - " edge [ source 7 target 8 label \"-\" ]\n" - " edge [ source 7 target 13 label \"-\" ]\n" - " edge [ source 8 target 9 label \"-\" ]\n" - " edge [ source 10 target 11 label \"-\" ]\n" - " edge [ source 11 target 12 label \"-\" ]\n" - " edge [ source 12 target 13 label \"-\" ]\n" - " edge [ source 12 target 14 label \"-\" ]\n" - " edge [ source 13 target 16 label \"-\" ]\n" - " edge [ source 14 target 15 label \"-\" ]\n" - " edge [ source 15 target 16 label \"-\" ]\n" - "]\n" - , - "graph [\n" - " node [ id 1 label \"1\" ] \n" - " node [ id 2 label \"2\" ] \n" - " node [ id 3 label \"3\" ] \n" - " node [ id 4 label \"4\" ] \n" - " node [ id 5 label \"5\" ] \n" - " node [ id 6 label \"6\" ] \n" - " node [ id 7 label \"7\" ] \n" - " node [ id 8 label \"8\" ] \n" - " edge [ source 1 target 2 label \"-\" ] \n" - " edge [ source 1 target 3 label \"-\" ] \n" - " edge [ source 1 target 5 label \"-\" ] \n" - " edge [ source 2 target 4 label \"-\" ] \n" - " edge [ source 2 target 6 label \"-\" ] \n" - " edge [ source 3 target 4 label \"-\" ] \n" - " edge [ source 3 target 7 label \"-\" ] \n" - " edge [ source 4 target 8 label \"-\" ] \n" - " edge [ source 5 target 6 label \"-\" ] \n" - " edge [ source 5 target 7 label \"-\" ] \n" - " edge [ source 6 target 8 label \"-\" ] \n" - " edge [ source 7 target 8 label \"-\" ]\n" - "]\n" - , - "" -}; - - /*! - * RingReporter that just counts the number of reported rings. - */ -class RR_Count : public sgm::RingReporter { -public: - size_t ringCount; - //! construction - RR_Count() : RingReporter(), ringCount(0) { reset(); } - //! destruction - virtual ~RR_Count(){} - - void - reset() {ringCount = 0;}; - - void - reportRing( const Graph_Interface& graph, const RingList & ringList ) - { - ringCount++; -// std::ostream& out = std::cout; -// out <<" * reported ring : "; -// for (RingList::const_iterator it=ringList.begin(); it!=ringList.end(); it++) { -// out <<*(it) <<" "; -// } -// out <Graph_GMLparser::parseGraph( GML )" < ret = ggl::Graph_GMLparser::parseGraph( graphString ); - - if (ret.second >= 0 ) { - std::cout <<"\n PARSING ERROR : at input position " < gi(ret.first); - std::cout <<"\n result graph : " <0; --maxRingSize) { - // set up reporter - RR_Count reporter; - reporter.reset(); - - std::cout <<"\n-->RP_Hanser96::findRings( graph, RR_Count, "< +#include + +#include "ggl/Graph.hh" +#include "ggl/Graph_GML_writer.hh" +#include "ggl/Graph_GMLparser.hh" + +#include "sgm/Graph_boost.hh" +#include "sgm/RP_Hanser96.hh" + +#include "dataTargetGraph_1.icc" +#include "dataTargetGraph_2.icc" +#include "dataTargetGraph_3.icc" + +#include "utilPrintGraph_Interface.icc" + +using namespace ggl; +using namespace sgm; + +const std::string gml[] = { + "graph [ \n" + " node [ id 0 label \"a\" ]\n" + " node [ id 1 label \"b\" ]\n" + " node [ id 2 label \"c\" ]\n" + " node [ id 3 label \"d\" ]\n" + " node [ id 4 label \"e\" ]\n" + " node [ id 5 label \"f\" ]\n" + " node [ id 6 label \"g\" ]\n" + " node [ id 7 label \"h\" ]\n" + " edge [ source 0 target 1 label \"-\" ]\n" + " edge [ source 0 target 2 label \"-\" ]\n" + " edge [ source 0 target 7 label \"-\" ]\n" + " edge [ source 1 target 2 label \"-\" ]\n" + " edge [ source 1 target 3 label \"-\" ]\n" + " edge [ source 3 target 4 label \"-\" ]\n" + " edge [ source 3 target 5 label \"-\" ]\n" + " edge [ source 3 target 6 label \"-\" ]\n" + "]\n" + , + "graph [ \n" + " node [ id 0 label \"a\" ]\n" + " node [ id 1 label \"b\" ]\n" + " node [ id 2 label \"c\" ]\n" + " node [ id 3 label \"d\" ]\n" + " node [ id 4 label \"e\" ]\n" + " node [ id 5 label \"f\" ]\n" + " node [ id 6 label \"g\" ]\n" + " node [ id 7 label \"h\" ]\n" + " node [ id 8 label \"i\" ]\n" + " edge [ source 0 target 3 label \"-\" ]\n" + " edge [ source 0 target 6 label \"-\" ]\n" + " edge [ source 0 target 4 label \"-\" ]\n" + " edge [ source 1 target 4 label \"-\" ]\n" + " edge [ source 1 target 5 label \"-\" ]\n" + " edge [ source 1 target 7 label \"-\" ]\n" + " edge [ source 2 target 3 label \"-\" ]\n" + " edge [ source 2 target 5 label \"-\" ]\n" + " edge [ source 2 target 8 label \"-\" ]\n" + " edge [ source 3 target 6 label \"-\" ]\n" + " edge [ source 3 target 8 label \"-\" ]\n" + " edge [ source 4 target 6 label \"-\" ]\n" + " edge [ source 4 target 7 label \"-\" ]\n" + " edge [ source 5 target 7 label \"-\" ]\n" + " edge [ source 5 target 8 label \"-\" ]\n" + " edge [ source 6 target 7 label \"-\" ]\n" + " edge [ source 6 target 8 label \"-\" ]\n" + " edge [ source 7 target 8 label \"-\" ]\n" + "]\n" + , + "graph [ \n" + " node [ id 0 label \"a\" ]\n" + " node [ id 1 label \"b\" ]\n" + " node [ id 2 label \"c\" ]\n" + " node [ id 3 label \"d\" ]\n" + " node [ id 4 label \"e\" ]\n" + " node [ id 5 label \"f\" ]\n" + " node [ id 6 label \"g\" ]\n" + " node [ id 7 label \"h\" ]\n" + " node [ id 8 label \"i\" ]\n" + " node [ id 9 label \"j\" ]\n" + " node [ id 10 label \"k\" ]\n" + " node [ id 11 label \"l\" ]\n" + " node [ id 12 label \"m\" ]\n" + " node [ id 13 label \"n\" ]\n" + " node [ id 14 label \"o\" ]\n" + " node [ id 15 label \"p\" ]\n" + " node [ id 16 label \"q\" ]\n" + " edge [ source 0 target 1 label \"-\" ]\n" + " edge [ source 0 target 5 label \"-\" ]\n" + " edge [ source 1 target 2 label \"-\" ]\n" + " edge [ source 2 target 3 label \"-\" ]\n" + " edge [ source 2 target 6 label \"-\" ]\n" + " edge [ source 3 target 4 label \"-\" ]\n" + " edge [ source 3 target 9 label \"-\" ]\n" + " edge [ source 4 target 5 label \"-\" ]\n" + " edge [ source 6 target 7 label \"-\" ]\n" + " edge [ source 6 target 10 label \"-\" ]\n" + " edge [ source 7 target 8 label \"-\" ]\n" + " edge [ source 7 target 13 label \"-\" ]\n" + " edge [ source 8 target 9 label \"-\" ]\n" + " edge [ source 10 target 11 label \"-\" ]\n" + " edge [ source 11 target 12 label \"-\" ]\n" + " edge [ source 12 target 13 label \"-\" ]\n" + " edge [ source 12 target 14 label \"-\" ]\n" + " edge [ source 13 target 16 label \"-\" ]\n" + " edge [ source 14 target 15 label \"-\" ]\n" + " edge [ source 15 target 16 label \"-\" ]\n" + "]\n" + , + "graph [\n" + " node [ id 1 label \"1\" ] \n" + " node [ id 2 label \"2\" ] \n" + " node [ id 3 label \"3\" ] \n" + " node [ id 4 label \"4\" ] \n" + " node [ id 5 label \"5\" ] \n" + " node [ id 6 label \"6\" ] \n" + " node [ id 7 label \"7\" ] \n" + " node [ id 8 label \"8\" ] \n" + " edge [ source 1 target 2 label \"-\" ] \n" + " edge [ source 1 target 3 label \"-\" ] \n" + " edge [ source 1 target 5 label \"-\" ] \n" + " edge [ source 2 target 4 label \"-\" ] \n" + " edge [ source 2 target 6 label \"-\" ] \n" + " edge [ source 3 target 4 label \"-\" ] \n" + " edge [ source 3 target 7 label \"-\" ] \n" + " edge [ source 4 target 8 label \"-\" ] \n" + " edge [ source 5 target 6 label \"-\" ] \n" + " edge [ source 5 target 7 label \"-\" ] \n" + " edge [ source 6 target 8 label \"-\" ] \n" + " edge [ source 7 target 8 label \"-\" ]\n" + "]\n" + , + "" +}; + + /*! + * RingReporter that just counts the number of reported rings. + */ +class RR_Count : public sgm::RingReporter { +public: + size_t ringCount; + //! construction + RR_Count() : RingReporter(), ringCount(0) { reset(); } + //! destruction + virtual ~RR_Count(){} + + void + reset() {ringCount = 0;}; + + void + reportRing( const Graph_Interface& graph, const RingList & ringList ) + { + ringCount++; +// std::ostream& out = std::cout; +// out <<" * reported ring : "; +// for (RingList::const_iterator it=ringList.begin(); it!=ringList.end(); it++) { +// out <<*(it) <<" "; +// } +// out <Graph_GMLparser::parseGraph( GML )" < ret = ggl::Graph_GMLparser::parseGraph( graphString ); + + if (ret.second >= 0 ) { + std::cout <<"\n PARSING ERROR : at input position " < gi(ret.first); + std::cout <<"\n result graph : " <0; --maxRingSize) { + // set up reporter + RR_Count reporter; + reporter.reset(); + + std::cout <<"\n-->RP_Hanser96::findRings( graph, RR_Count, "< - -#include "sgm/Graph_boost.hh" -#include "sgm/MR_stream.hh" -#include "sgm/SGM_vf2.hh" - -#include "dataSGMgraphs_1.icc" -#include "dataSGMgraphs_2.icc" -#include "dataSGMgraphs_3.icc" - -#include "utilPrintGraph_Interface.icc" - - typedef sgm::Graph_boost< MyGraph - , boost::vertex_name_t - , boost::edge_name_t - , boost::vertex_index_t - > GB; - - void - performTest ( const MyGraph& pattern, - const MyGraph& target, - const std::string wildcard = std::string("") ) - { - - GB pattern_(pattern); - sgm::Pattern patternGraph( pattern_ ); - if (wildcard.size() > 0) { - patternGraph = sgm::Pattern( pattern_, wildcard ); - } - - GB targetGraph(target); - - std::cout <<"\n--> Pattern graph:\n" < Target graph:\n" < ONE pattern and ONE target\n" < create sgm::MR_stream\n" <findMatches( patternGraph, targetGraph, mr, UINT_MAX ); - - std::cout <<"\n found " < TWO pattern and ONE target\n" < patternGraphs; - patternGraphs.push_back(&patternGraph); - patternGraphs.push_back(&patternGraph); - std::vector outputs; - outputs.push_back(&mr); - outputs.push_back(&mr); - - if (wildcard.size() == 0) { - std::cout <<"\n find ALL matches with NO_WILDCARD :\n" <findMatches( patternGraphs, targetGraph, outputs, UINT_MAX ); - - std::cout <<"\n found " <findMatches( patternGraphs, targetGraph, outputs, 1 ); - - std::cout <<"\n found " < GB; - - std::string patternString; - std::string targetString; - - // example 1 - { - std::cout <<"\n == PATTERN ==\n" < + +#include "sgm/Graph_boost.hh" +#include "sgm/MR_stream.hh" +#include "sgm/SGM_vf2.hh" + +#include "dataSGMgraphs_1.icc" +#include "dataSGMgraphs_2.icc" +#include "dataSGMgraphs_3.icc" + +#include "utilPrintGraph_Interface.icc" + + typedef sgm::Graph_boost< MyGraph + , boost::vertex_name_t + , boost::edge_name_t + , boost::vertex_index_t + > GB; + + void + performTest ( const MyGraph& pattern, + const MyGraph& target, + const std::string wildcard = std::string("") ) + { + + GB pattern_(pattern); + sgm::Pattern patternGraph( pattern_ ); + if (wildcard.size() > 0) { + patternGraph = sgm::Pattern( pattern_, wildcard ); + } + + GB targetGraph(target); + + std::cout <<"\n--> Pattern graph:\n" < Target graph:\n" < ONE pattern and ONE target\n" < create sgm::MR_stream\n" <findMatches( patternGraph, targetGraph, mr, UINT_MAX ); + + std::cout <<"\n found " < TWO pattern and ONE target\n" < patternGraphs; + patternGraphs.push_back(&patternGraph); + patternGraphs.push_back(&patternGraph); + std::vector outputs; + outputs.push_back(&mr); + outputs.push_back(&mr); + + if (wildcard.size() == 0) { + std::cout <<"\n find ALL matches with NO_WILDCARD :\n" <findMatches( patternGraphs, targetGraph, outputs, UINT_MAX ); + + std::cout <<"\n found " <findMatches( patternGraphs, targetGraph, outputs, 1 ); + + std::cout <<"\n found " < GB; + + std::string patternString; + std::string targetString; + + // example 1 + { + std::cout <<"\n == PATTERN ==\n" < -#include -#include -#include - -#include "sgm/SubGraph.hh" -#include "sgm/Graph_boost.hh" - -#include "dataSGMgraphs_1.icc" - -#include "utilPrintGraph_Interface.icc" - - -int main(int argc, char** argv) { - - std::cout <<"\n" - <<"============== BEGIN TEST ==================\n" - <<"==============================================\n" - <<" sgm::SubGraph \n" - <<"==============================================\n" - < GB; - - std::string patternString; - std::string targetString; - - // example 1 - { - ////////////////////////////////////////////////////////////////////// - - std::cout <<"\n == PATTERN ==\n" < create sgm::Graph_boost pg \n" < node subset pn : "; - sgm::SubGraph::NodeList pn; - pn.insert(pn.end(), 3); - pn.insert(pn.end(), 0); - pn.insert(pn.end(), 2); - - std::copy( pn.begin(), - pn.end(), - std::ostream_iterator(std::cout, ", ")); - std::cout < create sgm::SubGraph( pg, pn)" < create sgm::Graph_boost tg \n" < node subset tn : "; - sgm::SubGraph::NodeList tn; - tn.insert(tn.end(), 3); - tn.insert(tn.end(), 0); - tn.insert(tn.end(), 2); - tn.insert(tn.end(), 5); - tn.insert(tn.end(), 7); - tn.insert(tn.end(), 9); - - std::copy( tn.begin(), - tn.end(), - std::ostream_iterator(std::cout, ", ")); - std::cout < create sgm::SubGraph( tg, tn)" < +#include +#include +#include + +#include "sgm/SubGraph.hh" +#include "sgm/Graph_boost.hh" + +#include "dataSGMgraphs_1.icc" + +#include "utilPrintGraph_Interface.icc" + + +int main(int argc, char** argv) { + + std::cout <<"\n" + <<"============== BEGIN TEST ==================\n" + <<"==============================================\n" + <<" sgm::SubGraph \n" + <<"==============================================\n" + < GB; + + std::string patternString; + std::string targetString; + + // example 1 + { + ////////////////////////////////////////////////////////////////////// + + std::cout <<"\n == PATTERN ==\n" < create sgm::Graph_boost pg \n" < node subset pn : "; + sgm::SubGraph::NodeList pn; + pn.insert(pn.end(), 3); + pn.insert(pn.end(), 0); + pn.insert(pn.end(), 2); + + std::copy( pn.begin(), + pn.end(), + std::ostream_iterator(std::cout, ", ")); + std::cout < create sgm::SubGraph( pg, pn)" < create sgm::Graph_boost tg \n" < node subset tn : "; + sgm::SubGraph::NodeList tn; + tn.insert(tn.end(), 3); + tn.insert(tn.end(), 0); + tn.insert(tn.end(), 2); + tn.insert(tn.end(), 5); + tn.insert(tn.end(), 7); + tn.insert(tn.end(), 9); + + std::copy( tn.begin(), + tn.end(), + std::ostream_iterator(std::cout, ", ")); + std::cout < create sgm::SubGraph( tg, tn)" < -#include -#include - - -#include "../src/bin/biu/Timer.hh" - - -int main(int argc, char **argv) { - - - return 0; -} - + +#include +#include +#include + + +#include "../src/bin/biu/Timer.hh" + + +int main(int argc, char **argv) { + + + return 0; +} + diff --git a/tests/toyChem/NADH.smi b/tests/toyChem/NADH.smi index 780a063..4faa19d 100644 --- a/tests/toyChem/NADH.smi +++ b/tests/toyChem/NADH.smi @@ -1,2 +1,2 @@ -[{CONH2}]c1ccc[n+](c1)[{Ribo-ADP}] -[{CONH2}]C1[CH2]C=CN(C=1)[{Ribo-ADP}] +[{CONH2}]c1ccc[n+](c1)[{Ribo-ADP}] +[{CONH2}]C1[CH2]C=CN(C=1)[{Ribo-ADP}] diff --git a/tests/toyChem/formose-process.rule b/tests/toyChem/formose-process.rule index 84a8175..6456a65 100644 --- a/tests/toyChem/formose-process.rule +++ b/tests/toyChem/formose-process.rule @@ -1,95 +1,95 @@ -rule [ - ruleID "Aldol Condensation (forward)" - context [ - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "O" ] - node [ id 4 label "H" ] - node [ id 5 label "O" ] - node [ id 6 label "C" ] - ] - left [ - edge [ source 1 target 2 label "=" ] - edge [ source 2 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 5 target 6 label "=" ] - constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] - constrainAdj [ id 6 op = count 1 nodeLabels [ label "O" ] ] - ] - right [ - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "=" ] - edge [ source 5 target 6 label "-" ] - edge [ source 4 target 5 label "-" ] - edge [ source 6 target 1 label "-" ] - ] -] - -rule [ - ruleID "Aldol Condensation (backward)" - context [ - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "O" ] - node [ id 4 label "H" ] - node [ id 5 label "O" ] - node [ id 6 label "C" ] - ] - right [ - edge [ source 1 target 2 label "=" ] - edge [ source 2 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - edge [ source 5 target 6 label "=" ] - ] - left [ - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "=" ] - edge [ source 5 target 6 label "-" ] - edge [ source 4 target 5 label "-" ] - edge [ source 6 target 1 label "-" ] - constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] - constrainAdj [ id 6 op = count 1 nodeLabels [ label "O" ] ] - ] -] - -rule [ - ruleID "Keto-Enol Isomerization (forward)" - context [ - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "O" ] - node [ id 4 label "H" ] - ] - left [ - edge [ source 1 target 4 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "=" ] - constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] - ] - right [ - edge [ source 1 target 2 label "=" ] - edge [ source 2 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - ] -] - -rule [ - ruleID "Keto-Enol Isomerization (backward)" - context [ - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "O" ] - node [ id 4 label "H" ] - ] - right [ - edge [ source 1 target 4 label "-" ] - edge [ source 1 target 2 label "-" ] - edge [ source 2 target 3 label "=" ] - ] - left [ - edge [ source 1 target 2 label "=" ] - edge [ source 2 target 3 label "-" ] - edge [ source 3 target 4 label "-" ] - constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] - ] -] +rule [ + ruleID "Aldol Condensation (forward)" + context [ + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "O" ] + node [ id 4 label "H" ] + node [ id 5 label "O" ] + node [ id 6 label "C" ] + ] + left [ + edge [ source 1 target 2 label "=" ] + edge [ source 2 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 5 target 6 label "=" ] + constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] + constrainAdj [ id 6 op = count 1 nodeLabels [ label "O" ] ] + ] + right [ + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "=" ] + edge [ source 5 target 6 label "-" ] + edge [ source 4 target 5 label "-" ] + edge [ source 6 target 1 label "-" ] + ] +] + +rule [ + ruleID "Aldol Condensation (backward)" + context [ + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "O" ] + node [ id 4 label "H" ] + node [ id 5 label "O" ] + node [ id 6 label "C" ] + ] + right [ + edge [ source 1 target 2 label "=" ] + edge [ source 2 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + edge [ source 5 target 6 label "=" ] + ] + left [ + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "=" ] + edge [ source 5 target 6 label "-" ] + edge [ source 4 target 5 label "-" ] + edge [ source 6 target 1 label "-" ] + constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] + constrainAdj [ id 6 op = count 1 nodeLabels [ label "O" ] ] + ] +] + +rule [ + ruleID "Keto-Enol Isomerization (forward)" + context [ + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "O" ] + node [ id 4 label "H" ] + ] + left [ + edge [ source 1 target 4 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "=" ] + constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] + ] + right [ + edge [ source 1 target 2 label "=" ] + edge [ source 2 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + ] +] + +rule [ + ruleID "Keto-Enol Isomerization (backward)" + context [ + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "O" ] + node [ id 4 label "H" ] + ] + right [ + edge [ source 1 target 4 label "-" ] + edge [ source 1 target 2 label "-" ] + edge [ source 2 target 3 label "=" ] + ] + left [ + edge [ source 1 target 2 label "=" ] + edge [ source 2 target 3 label "-" ] + edge [ source 3 target 4 label "-" ] + constrainAdj [ id 2 op = count 1 nodeLabels [ label "O" ] ] + ] +] diff --git a/tests/toyChem/formose-process.smi b/tests/toyChem/formose-process.smi index cf1ed43..7cb6062 100644 --- a/tests/toyChem/formose-process.smi +++ b/tests/toyChem/formose-process.smi @@ -1,2 +1,2 @@ -C=O -OCC=O +C=O +OCC=O diff --git a/tests/toyChem/groups.gml b/tests/toyChem/groups.gml index 8a58980..306bbec 100644 --- a/tests/toyChem/groups.gml +++ b/tests/toyChem/groups.gml @@ -1,134 +1,134 @@ -molcomp [ - description "{CONH2}" - compIDs [ id 0 ] - node [ id 0 label "C" ] - node [ id 1 label "O" ] - node [ id 2 label "N" ] - node [ id 3 label "H" ] - node [ id 4 label "H" ] - edge [ source 0 target 1 label "=" ] - edge [ source 0 target 2 label "-" ] - edge [ source 2 target 3 label "-" ] - edge [ source 2 target 4 label "-" ] -] - -molcomp [ - description "{Ribo-ADP}" - compIDs [ id 0 ] - node [ id 0 label "C" ] - node [ id 1 label "O" ] - node [ id 2 label "C" ] - node [ id 3 label "C" ] - node [ id 4 label "O" ] - node [ id 5 label "P" ] - node [ id 6 label "O" ] - node [ id 7 label "O" ] - node [ id 8 label "O" ] - node [ id 9 label "P" ] - node [ id 10 label "O" ] - node [ id 11 label "O" ] - node [ id 12 label "O" ] - node [ id 13 label "C" ] - node [ id 14 label "C" ] - node [ id 15 label "O" ] - node [ id 16 label "C" ] - node [ id 17 label "C" ] - node [ id 18 label "O" ] - node [ id 19 label "C" ] - node [ id 20 label "O" ] - node [ id 21 label "n" ] - node [ id 22 label "c" ] - node [ id 23 label "n" ] - node [ id 24 label "c" ] - node [ id 25 label "c" ] - node [ id 26 label "N" ] - node [ id 27 label "n" ] - node [ id 28 label "c" ] - node [ id 29 label "n" ] - node [ id 30 label "c" ] - node [ id 31 label "C" ] - node [ id 32 label "O" ] - node [ id 33 label "C" ] - node [ id 34 label "O" ] - node [ id 35 label "H" ] - node [ id 36 label "H" ] - node [ id 37 label "H" ] - node [ id 38 label "H" ] - node [ id 39 label "H" ] - node [ id 40 label "H" ] - node [ id 41 label "H" ] - node [ id 42 label "H" ] - node [ id 43 label "H" ] - node [ id 44 label "H" ] - node [ id 45 label "H" ] - node [ id 46 label "H" ] - node [ id 47 label "H" ] - node [ id 48 label "H" ] - node [ id 49 label "H" ] - node [ id 50 label "H" ] - node [ id 51 label "H" ] - node [ id 52 label "H" ] - node [ id 53 label "H" ] - node [ id 54 label "H" ] - node [ id 55 label "H" ] - edge [ source 1 target 0 label "-" ] - edge [ source 2 target 1 label "-" ] - edge [ source 3 target 2 label "-" ] - edge [ source 4 target 3 label "-" ] - edge [ source 5 target 4 label "-" ] - edge [ source 6 target 5 label "-" ] - edge [ source 7 target 5 label "=" ] - edge [ source 8 target 5 label "-" ] - edge [ source 9 target 8 label "-" ] - edge [ source 10 target 9 label "-" ] - edge [ source 11 target 9 label "=" ] - edge [ source 12 target 9 label "-" ] - edge [ source 13 target 12 label "-" ] - edge [ source 14 target 13 label "-" ] - edge [ source 15 target 14 label "-" ] - edge [ source 16 target 15 label "-" ] - edge [ source 17 target 16 label "-" ] - edge [ source 18 target 17 label "-" ] - edge [ source 19 target 17 label "-" ] - edge [ source 19 target 14 label "-" ] - edge [ source 20 target 19 label "-" ] - edge [ source 21 target 16 label "-" ] - edge [ source 22 target 21 label ":" ] - edge [ source 23 target 22 label ":" ] - edge [ source 24 target 23 label ":" ] - edge [ source 25 target 24 label ":" ] - edge [ source 26 target 25 label "-" ] - edge [ source 27 target 25 label ":" ] - edge [ source 28 target 27 label ":" ] - edge [ source 29 target 28 label ":" ] - edge [ source 30 target 29 label ":" ] - edge [ source 30 target 24 label ":" ] - edge [ source 30 target 21 label ":" ] - edge [ source 31 target 2 label "-" ] - edge [ source 32 target 31 label "-" ] - edge [ source 33 target 31 label "-" ] - edge [ source 33 target 0 label "-" ] - edge [ source 34 target 33 label "-" ] - edge [ source 2 target 35 label "-" ] - edge [ source 3 target 36 label "-" ] - edge [ source 3 target 37 label "-" ] - edge [ source 6 target 38 label "-" ] - edge [ source 10 target 39 label "-" ] - edge [ source 13 target 40 label "-" ] - edge [ source 13 target 41 label "-" ] - edge [ source 14 target 42 label "-" ] - edge [ source 16 target 43 label "-" ] - edge [ source 17 target 44 label "-" ] - edge [ source 18 target 45 label "-" ] - edge [ source 19 target 46 label "-" ] - edge [ source 20 target 47 label "-" ] - edge [ source 22 target 48 label "-" ] - edge [ source 26 target 49 label "-" ] - edge [ source 26 target 50 label "-" ] - edge [ source 28 target 51 label "-" ] - edge [ source 31 target 52 label "-" ] - edge [ source 32 target 53 label "-" ] - edge [ source 33 target 54 label "-" ] - edge [ source 34 target 55 label "-" ] -] - +molcomp [ + description "{CONH2}" + compIDs [ id 0 ] + node [ id 0 label "C" ] + node [ id 1 label "O" ] + node [ id 2 label "N" ] + node [ id 3 label "H" ] + node [ id 4 label "H" ] + edge [ source 0 target 1 label "=" ] + edge [ source 0 target 2 label "-" ] + edge [ source 2 target 3 label "-" ] + edge [ source 2 target 4 label "-" ] +] + +molcomp [ + description "{Ribo-ADP}" + compIDs [ id 0 ] + node [ id 0 label "C" ] + node [ id 1 label "O" ] + node [ id 2 label "C" ] + node [ id 3 label "C" ] + node [ id 4 label "O" ] + node [ id 5 label "P" ] + node [ id 6 label "O" ] + node [ id 7 label "O" ] + node [ id 8 label "O" ] + node [ id 9 label "P" ] + node [ id 10 label "O" ] + node [ id 11 label "O" ] + node [ id 12 label "O" ] + node [ id 13 label "C" ] + node [ id 14 label "C" ] + node [ id 15 label "O" ] + node [ id 16 label "C" ] + node [ id 17 label "C" ] + node [ id 18 label "O" ] + node [ id 19 label "C" ] + node [ id 20 label "O" ] + node [ id 21 label "n" ] + node [ id 22 label "c" ] + node [ id 23 label "n" ] + node [ id 24 label "c" ] + node [ id 25 label "c" ] + node [ id 26 label "N" ] + node [ id 27 label "n" ] + node [ id 28 label "c" ] + node [ id 29 label "n" ] + node [ id 30 label "c" ] + node [ id 31 label "C" ] + node [ id 32 label "O" ] + node [ id 33 label "C" ] + node [ id 34 label "O" ] + node [ id 35 label "H" ] + node [ id 36 label "H" ] + node [ id 37 label "H" ] + node [ id 38 label "H" ] + node [ id 39 label "H" ] + node [ id 40 label "H" ] + node [ id 41 label "H" ] + node [ id 42 label "H" ] + node [ id 43 label "H" ] + node [ id 44 label "H" ] + node [ id 45 label "H" ] + node [ id 46 label "H" ] + node [ id 47 label "H" ] + node [ id 48 label "H" ] + node [ id 49 label "H" ] + node [ id 50 label "H" ] + node [ id 51 label "H" ] + node [ id 52 label "H" ] + node [ id 53 label "H" ] + node [ id 54 label "H" ] + node [ id 55 label "H" ] + edge [ source 1 target 0 label "-" ] + edge [ source 2 target 1 label "-" ] + edge [ source 3 target 2 label "-" ] + edge [ source 4 target 3 label "-" ] + edge [ source 5 target 4 label "-" ] + edge [ source 6 target 5 label "-" ] + edge [ source 7 target 5 label "=" ] + edge [ source 8 target 5 label "-" ] + edge [ source 9 target 8 label "-" ] + edge [ source 10 target 9 label "-" ] + edge [ source 11 target 9 label "=" ] + edge [ source 12 target 9 label "-" ] + edge [ source 13 target 12 label "-" ] + edge [ source 14 target 13 label "-" ] + edge [ source 15 target 14 label "-" ] + edge [ source 16 target 15 label "-" ] + edge [ source 17 target 16 label "-" ] + edge [ source 18 target 17 label "-" ] + edge [ source 19 target 17 label "-" ] + edge [ source 19 target 14 label "-" ] + edge [ source 20 target 19 label "-" ] + edge [ source 21 target 16 label "-" ] + edge [ source 22 target 21 label ":" ] + edge [ source 23 target 22 label ":" ] + edge [ source 24 target 23 label ":" ] + edge [ source 25 target 24 label ":" ] + edge [ source 26 target 25 label "-" ] + edge [ source 27 target 25 label ":" ] + edge [ source 28 target 27 label ":" ] + edge [ source 29 target 28 label ":" ] + edge [ source 30 target 29 label ":" ] + edge [ source 30 target 24 label ":" ] + edge [ source 30 target 21 label ":" ] + edge [ source 31 target 2 label "-" ] + edge [ source 32 target 31 label "-" ] + edge [ source 33 target 31 label "-" ] + edge [ source 33 target 0 label "-" ] + edge [ source 34 target 33 label "-" ] + edge [ source 2 target 35 label "-" ] + edge [ source 3 target 36 label "-" ] + edge [ source 3 target 37 label "-" ] + edge [ source 6 target 38 label "-" ] + edge [ source 10 target 39 label "-" ] + edge [ source 13 target 40 label "-" ] + edge [ source 13 target 41 label "-" ] + edge [ source 14 target 42 label "-" ] + edge [ source 16 target 43 label "-" ] + edge [ source 17 target 44 label "-" ] + edge [ source 18 target 45 label "-" ] + edge [ source 19 target 46 label "-" ] + edge [ source 20 target 47 label "-" ] + edge [ source 22 target 48 label "-" ] + edge [ source 26 target 49 label "-" ] + edge [ source 26 target 50 label "-" ] + edge [ source 28 target 51 label "-" ] + edge [ source 31 target 52 label "-" ] + edge [ source 32 target 53 label "-" ] + edge [ source 33 target 54 label "-" ] + edge [ source 34 target 55 label "-" ] +] + diff --git a/tests/toyChem/lactat-dehydrogenase.gml b/tests/toyChem/lactat-dehydrogenase.gml index 477c23f..1107c60 100644 --- a/tests/toyChem/lactat-dehydrogenase.gml +++ b/tests/toyChem/lactat-dehydrogenase.gml @@ -1,70 +1,70 @@ -rule [ - ruleID "Lactat-Dehydrogenase" - left [ -# NAD+ with aromatic ring - node [ id 0 label "n+" ] - node [ id 1 label "c" ] - node [ id 2 label "c" ] - node [ id 3 label "c" ] - node [ id 4 label "c" ] - node [ id 5 label "c" ] - edge [ source 1 target 0 label ":" ] - edge [ source 2 target 1 label ":" ] - edge [ source 3 target 2 label ":" ] - edge [ source 4 target 3 label ":" ] - edge [ source 5 target 4 label ":" ] - edge [ source 5 target 0 label ":" ] -# lactat specifics - edge [ source 24 target 23 label "-" ] - edge [ source 24 target 27 label "-" ] - node [ id 30 label "H" ] edge [ source 23 target 30 label "-" ] - ] - context [ -# NAD rest - node [ id 8 label "{CONH2}" ] edge [ source 4 target 8 label "-" ] - node [ id 7 label "H" ] edge [ source 1 target 7 label "-" ] - node [ id 10 label "H" ] edge [ source 2 target 10 label "-" ] - node [ id 11 label "H" ] edge [ source 3 target 11 label "-" ] - node [ id 12 label "H" ] edge [ source 5 target 12 label "-" ] - node [ id 13 label "{Ribo-ADP}" ] edge [ source 0 target 13 label "-" ] -# lactat/pyruvat common - node [ id 20 label "C" ] - node [ id 21 label "O" ] - node [ id 22 label "O-" ] - node [ id 23 label "C" ] - node [ id 24 label "O" ] - node [ id 25 label "C" ] - node [ id 26 label "H" ] - node [ id 27 label "H" ] - node [ id 28 label "H" ] - node [ id 29 label "H" ] - edge [ source 21 target 20 label "=" ] - edge [ source 22 target 20 label "-" ] - edge [ source 23 target 20 label "-" ] - edge [ source 25 target 23 label "-" ] - edge [ source 25 target 28 label "-" ] - edge [ source 25 target 29 label "-" ] - edge [ source 25 target 26 label "-" ] - ] - right [ -# NADH with non-aromatic ring - node [ id 0 label "N" ] - node [ id 1 label "C" ] - node [ id 2 label "C" ] - node [ id 3 label "C" ] - node [ id 4 label "C" ] - node [ id 5 label "C" ] - edge [ source 1 target 0 label "-" ] - edge [ source 2 target 1 label "=" ] - edge [ source 3 target 2 label "-" ] - edge [ source 4 target 3 label "-" ] - edge [ source 5 target 4 label "=" ] - edge [ source 5 target 0 label "-" ] -# new NADH proton bond - edge [ source 3 target 27 label "-" ] -# pyruvate specifics - edge [ source 24 target 23 label "=" ] -# freed proton - node [ id 30 label "H+" ] - ] -] +rule [ + ruleID "Lactat-Dehydrogenase" + left [ +# NAD+ with aromatic ring + node [ id 0 label "n+" ] + node [ id 1 label "c" ] + node [ id 2 label "c" ] + node [ id 3 label "c" ] + node [ id 4 label "c" ] + node [ id 5 label "c" ] + edge [ source 1 target 0 label ":" ] + edge [ source 2 target 1 label ":" ] + edge [ source 3 target 2 label ":" ] + edge [ source 4 target 3 label ":" ] + edge [ source 5 target 4 label ":" ] + edge [ source 5 target 0 label ":" ] +# lactat specifics + edge [ source 24 target 23 label "-" ] + edge [ source 24 target 27 label "-" ] + node [ id 30 label "H" ] edge [ source 23 target 30 label "-" ] + ] + context [ +# NAD rest + node [ id 8 label "{CONH2}" ] edge [ source 4 target 8 label "-" ] + node [ id 7 label "H" ] edge [ source 1 target 7 label "-" ] + node [ id 10 label "H" ] edge [ source 2 target 10 label "-" ] + node [ id 11 label "H" ] edge [ source 3 target 11 label "-" ] + node [ id 12 label "H" ] edge [ source 5 target 12 label "-" ] + node [ id 13 label "{Ribo-ADP}" ] edge [ source 0 target 13 label "-" ] +# lactat/pyruvat common + node [ id 20 label "C" ] + node [ id 21 label "O" ] + node [ id 22 label "O-" ] + node [ id 23 label "C" ] + node [ id 24 label "O" ] + node [ id 25 label "C" ] + node [ id 26 label "H" ] + node [ id 27 label "H" ] + node [ id 28 label "H" ] + node [ id 29 label "H" ] + edge [ source 21 target 20 label "=" ] + edge [ source 22 target 20 label "-" ] + edge [ source 23 target 20 label "-" ] + edge [ source 25 target 23 label "-" ] + edge [ source 25 target 28 label "-" ] + edge [ source 25 target 29 label "-" ] + edge [ source 25 target 26 label "-" ] + ] + right [ +# NADH with non-aromatic ring + node [ id 0 label "N" ] + node [ id 1 label "C" ] + node [ id 2 label "C" ] + node [ id 3 label "C" ] + node [ id 4 label "C" ] + node [ id 5 label "C" ] + edge [ source 1 target 0 label "-" ] + edge [ source 2 target 1 label "=" ] + edge [ source 3 target 2 label "-" ] + edge [ source 4 target 3 label "-" ] + edge [ source 5 target 4 label "=" ] + edge [ source 5 target 0 label "-" ] +# new NADH proton bond + edge [ source 3 target 27 label "-" ] +# pyruvate specifics + edge [ source 24 target 23 label "=" ] +# freed proton + node [ id 30 label "H+" ] + ] +] diff --git a/tests/toyChem/purine.smi b/tests/toyChem/purine.smi index f0bc19c..65fd846 100644 --- a/tests/toyChem/purine.smi +++ b/tests/toyChem/purine.smi @@ -1,32 +1,32 @@ -# purine in different versions -c1c2c(nc[nH]2)ncn1 -[NH]1[CH]=Nc2n[cH]n[cH]c12 -[NH]1[CH]=NC2N=[CH]N=[CH]C1=2 -[NH]1[CH]=NC2=N[CH]=N[CH]=C12 - -# adenine -c1[nH]c2c(ncnc2n1)N -c1[nH]c2C(=NC=Nc2n1)N -C1[NH]C2C(=NC=NC=2N=1)N -C1[NH]C2=C(N=CN=C2N=1)N -n1c(c2c(nc1)nc[nH]2)N - -# guanine -c1[nH]c2c(n1)c(=O)[nH]c(n2)N -C1[NH]c2c(N=1)c(=O)[nH]c(n2)N -c1[nH]c2c(n1)C(=O)[NH]C(=N2)N -C1[NH]C2=C(N=1)C(=O)[NH]C(=N2)N - -# adenosine -[NH2]c1n[cH]nc2n(C3OC(CO)C(O)C3O)[cH]nc12 -Nc1ncnc2n(cnc12)[CH]1O[CH](CO)[CH](O)[CH]1O -n2c1c(ncnc1n(c2)[CH]3O[CH]([CH](O)C3(O))CO)N - -# guanosine -c1nc2c(=O)[nH]c(nc2n1C3C(C(C(O3)CO)O)O)N -c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N -c1nc2c(n1[CH]3C(O)[CH]([CH](O3)CO)O)nc([nH]c2=O)N -[NH2]c1nc2c(n[cH]n2[CH]3[CH](O)[CH]([OH])[CH]([CH2][OH])O3)c(=O)[nH]1 - - - +# purine in different versions +c1c2c(nc[nH]2)ncn1 +[NH]1[CH]=Nc2n[cH]n[cH]c12 +[NH]1[CH]=NC2N=[CH]N=[CH]C1=2 +[NH]1[CH]=NC2=N[CH]=N[CH]=C12 + +# adenine +c1[nH]c2c(ncnc2n1)N +c1[nH]c2C(=NC=Nc2n1)N +C1[NH]C2C(=NC=NC=2N=1)N +C1[NH]C2=C(N=CN=C2N=1)N +n1c(c2c(nc1)nc[nH]2)N + +# guanine +c1[nH]c2c(n1)c(=O)[nH]c(n2)N +C1[NH]c2c(N=1)c(=O)[nH]c(n2)N +c1[nH]c2c(n1)C(=O)[NH]C(=N2)N +C1[NH]C2=C(N=1)C(=O)[NH]C(=N2)N + +# adenosine +[NH2]c1n[cH]nc2n(C3OC(CO)C(O)C3O)[cH]nc12 +Nc1ncnc2n(cnc12)[CH]1O[CH](CO)[CH](O)[CH]1O +n2c1c(ncnc1n(c2)[CH]3O[CH]([CH](O)C3(O))CO)N + +# guanosine +c1nc2c(=O)[nH]c(nc2n1C3C(C(C(O3)CO)O)O)N +c1nc2c(=O)[nH]c(nc2n1[CH]3[CH]([CH]([CH](O3)CO)O)O)N +c1nc2c(n1[CH]3C(O)[CH]([CH](O3)CO)O)nc([nH]c2=O)N +[NH2]c1nc2c(n[cH]n2[CH]3[CH](O)[CH]([OH])[CH]([CH2][OH])O3)c(=O)[nH]1 + + + diff --git a/tests/utilPrintGraph_Interface.icc b/tests/utilPrintGraph_Interface.icc index 9029ece..5976096 100644 --- a/tests/utilPrintGraph_Interface.icc +++ b/tests/utilPrintGraph_Interface.icc @@ -1,22 +1,22 @@ - -#include -#include - -#include "sgm/Graph_Interface.hh" - - void - print( const sgm::Graph_Interface& g ) - { - for (size_t i=0; i "; - for (sgm::Graph_Interface::OutEdge_iterator e = g.getOutEdgesBegin(i); - e != g.getOutEdgesEnd(i); ++e ) - { - std::cout <<" | " <getToIndex() <<" (" <getEdgeLabel() <<")"; - } - std::cout <<" |\n"; - } - - } - - + +#include +#include + +#include "sgm/Graph_Interface.hh" + + void + print( const sgm::Graph_Interface& g ) + { + for (size_t i=0; i "; + for (sgm::Graph_Interface::OutEdge_iterator e = g.getOutEdgesBegin(i); + e != g.getOutEdgesEnd(i); ++e ) + { + std::cout <<" | " <getToIndex() <<" (" <getEdgeLabel() <<")"; + } + std::cout <<" |\n"; + } + + } + + diff --git a/tests/utilPrintRule.icc b/tests/utilPrintRule.icc index ea11ae6..ad1cd4c 100644 --- a/tests/utilPrintRule.icc +++ b/tests/utilPrintRule.icc @@ -1,86 +1,86 @@ -#ifndef UTILPRINTRULE_ICC_ -#define UTILPRINTRULE_ICC_ - - -#include -#include - -#include "ggl/Rule.hh" -#include "ggl/RuleGraph.hh" - -#include "utilPrintGraph_Interface.icc" - - void - printRule ( const ggl::Rule& r ) { - - std::cout <<"\n Rule ID : '" <first <<" : "; -// std::copy( i->second.begin(), -// i->second.end(), -// std::ostream_iterator(std::cout, ", ")); -// std::cout <first <<" : "; -// std::copy( i->second.begin(), -// i->second.end(), -// std::ostream_iterator(std::cout, ", ")); -// std::cout <first <<" : "; -// std::copy( i->second.begin(), -// i->second.end(), -// std::ostream_iterator(std::cout, ", ")); -// std::cout < +#include + +#include "ggl/Rule.hh" +#include "ggl/RuleGraph.hh" + +#include "utilPrintGraph_Interface.icc" + + void + printRule ( const ggl::Rule& r ) { + + std::cout <<"\n Rule ID : '" <first <<" : "; +// std::copy( i->second.begin(), +// i->second.end(), +// std::ostream_iterator(std::cout, ", ")); +// std::cout <first <<" : "; +// std::copy( i->second.begin(), +// i->second.end(), +// std::ostream_iterator(std::cout, ", ")); +// std::cout <first <<" : "; +// std::copy( i->second.begin(), +// i->second.end(), +// std::ostream_iterator(std::cout, ", ")); +// std::cout <