On 05/07/2013 17:54, Brett T. Hannigan wrote: > I have a database of molecules in pdb files. I'd like to go through > each molecule and see if it has certain substructures, and if they do > identify which atoms are part of that substructure. So it's easy enough > to read the pdb file in, convert it to SMILES representation, and then > do a SMARTS query to look for my substructures. However, if the SMARTS > query reports that the substructure is present in the molecule, I'm not > sure how to identify the atoms in the pdb file which make up the match. > Any ideas?
If you just want to visualize this and the substructures can represented by SMILES, put them in a file, and try obabel *.pdb -O out.svg -s substructs.smi green Only those molecules containing at least one substructure are displayed and the matched atoms are displayed colored green. If additional colors are specified in the command, each substructure can have its own color. For more details obabel -L ops s To do more you will need to use OBSmartsPattern in C++, python, etc. http://openbabel.org/api/2.3/classOpenBabel_1_1OBSmartsPattern.shtml Chris ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss