Hello, I have a protein structure in a .pdb file. In my program (using the C++ API), I load it (with obConversion.ReadFile) in a OBMol. What I am trying to do next, is to get data from the residues and the atom types of the pdb file. For example, let's say I have this line in my file:
ATOM 4 CD PRO A 1 20.835 45.525 -5.625 1.00 0.00 C I am looking for a function which will tell me that atom 4 is a CD atom from a proline. Perhaps something like: for (unsigned int j=1; j<=obMol.NumAtoms() ; j++ ) { OpenBabel::OBAtom *atom; atom = obMol.GetAtom(j); atom->GetAminoAcid(); atom->GetTypeFromPDB(); ... } (To give more details, I am implementing a scoring function for protein-ligand interactions in a program. This function has its own atom types depending on the residues and the types of atom. I am trying to code (e.g.) "if this atom is a CD atom from a proline, then its type is XXX". I can do it without Open Babel, but for different reasons it would make the program cleaner to use it). Thanks for your help Nicolas ------------------------------------------------------------------------------ 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