public void Dump(string smarts) { SMARTSParser parser = new SMARTSParser(new StringReader(smarts)); ASTStart start = parser.Start(); SmartsDumpVisitor visitor = new SmartsDumpVisitor(); visitor.Visit(start, null); }
public void Visit(string smarts) { SMARTSParser parser = new SMARTSParser(new StringReader(smarts)); ASTStart start = parser.Start(); SmartsQueryVisitor visitor = new SmartsQueryVisitor(ChemObjectBuilder.Instance); visitor.Visit(start, null); }
public object Visit(ASTStart node, object data) { System.Console.Out.WriteLine(IndentString() + node); ++indent; data = node.ChildrenAccept(this, data); --indent; return(data); }
static void Main() { #region 1 SMARTSParser parser = new SMARTSParser(new StringReader("C*C")); ASTStart ast = parser.Start(); SmartsQueryVisitor visitor = new SmartsQueryVisitor(); QueryAtomContainer query = (QueryAtomContainer)visitor.Visit(ast, null); #endregion }
void Main() { UniversalIsomorphismTester universalIsomorphismTester = null; #region 1 SmilesParser sp = new SmilesParser(); IAtomContainer atomContainer = sp.ParseSmiles("CC(=O)OC(=O)C"); QueryAtomContainer query = SMARTSParser.Parse("C*C"); bool queryMatch = universalIsomorphismTester.IsSubgraph(atomContainer, query); #endregion #region 2 SMARTSParser parser = new SMARTSParser(new StringReader("C*C")); ASTStart start = parser.Start(); #endregion }
public object Visit(ASTStart node, object data) { return(node.JjtGetChild(0).JjtAccept(this, data)); }