Closed ljmartin closed 2 years ago
PDB files don't contain any information about bond order. RDKit can load a PDB file directly, and it will attempt to infer bond order. But be aware that it doesn't always get everything right! You can also use Open Babel to load a PDB file and infer bond orders, but it too makes mistakes. I recently encountered this exact problem, and I didn't come up with any entirely satisfactory general solution.
Thanks @peastman. I asked a similar question on the rdkit mailing list, and Maceij from ODDT pointed out he tried something similar, and ended up writing an rdkit tool to assign bond orders (assuming correct connectivity) using templates: https://github.com/oddt/oddt/blob/master/oddt/toolkits/extras/rdkit/fixer.py#L623-L669 . That gets most of the way there. Cheers
That's good to know about. Thanks!
Hi, Is it possible to access bond orders from a protein structure via a pdb file, as interpreted by pdbfixer? Do topology objects from a pdb file (without any other input files) infer bond order at all?
Here's a minimal example of what I'm missing:
This prints
None
for every bond.The end goal here is to use
pdbfixer
to read a PDB, generate atom and bonding information, and then port the bonding information into an RDKitRWMol
object. RDKit assumes single bonds when creating a molecule bond-by-bond, but it can of course make double bonds - if I knew when to specify them, that is!Thanks lew