Dear OpenBabel community: I'm faced with a problem of selecting atoms by SMARTS patterns that include charge descriptor "+/-" such as '[O-][N+](=O)C'. The pattern matching does not work properly unless the molecular structure is given in the smile format. To localize the problem I have tested different smarts with "obgrep" application by searching in Nitromethane.mol2 structure. The mol2-format is used because it provides atomic charge information. (Mol and hin-formats were also tested and resulted in the same problem.) All patterns with charge descriptor result in no matches in Nitromethane (canonical smile C[N+](=O)[O-]): 'C[N+](=O)[O-]' 'C-[N+]([O-])=O' 'C-[N]([O-])=O' '[O-][N+](=O)C' 'O[N+](=O)C' are failed. The only successful patterns are that which have no charge descriptors. For example, the command: obgrep -imol2 'C-[N]([O])=O' Nitromethane.mol2 has a match and outputs the structure:
@<TRIPOS>MOLECULE Nitromethane.hin 7 6 0 0 0 SMALL GASTEIGER @<TRIPOS>ATOM 1 O 1.4119 0.9932 -0.0000 O.2 1 LIG11 -0.5820 2 O 1.3830 -1.0017 -0.0000 O.2 1 LIG11 0.0340 3 N 0.7869 0.0029 -0.0000 N.pl3 1 LIG11 0.0348 4 C -0.6030 0.0054 0.0000 C.3 1 LIG11 0.1981 5 H -0.9794 -0.5079 0.8877 H 1 LIG11 0.1050 6 H -0.9794 -0.5079 -0.8877 H 1 LIG11 0.1050 7 H -1.0199 1.0160 0.0000 H 1 LIG11 0.1050 @<TRIPOS>BOND 1 1 3 1 2 2 3 2 3 3 4 1 4 4 5 1 5 4 6 1 6 4 7 1 Does OBabel support smarts charge-descriptors for matching 3D structures? Or what I am I doing wrong? (In my tests matching works only for smi-files). Thank you, Igor ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss