Re: [Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-28 Thread Paul Emsley
> PDB files have no bond information, This is not true. The chemistry is specified in the Chemical Component Dictionary using the residue identifier (so it's a reference to a chemical description, it's not embedded). https://www.wwpdb.org/data/ccd https://github.com/pdbeurope/ccdutils

Re: [Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-27 Thread Francois Berenger
On 27/09/2021 19:22, Lewis Martin wrote: Very interesting - thank you Francois! PDB re-do does the trick: import requests from rdkit import Chem def getPDB(code): out = requests.get(f'https://pdb-redo.eu/db/{code}/{code}_final.pdb') return out.content pdb_string = getPDB('3udn')

Re: [Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-27 Thread Maciek Wójcikowski
Hi Lewis, You can try to use PreparePDBMol in oddt https://github.com/oddt/oddt/blob/master/oddt/toolkits/extras/rdkit/fixer.py#L623-L669 that we used in PLEC model training and PDBFixer didn't worked for us either. Note that as soon as you have correct bonding you can disable automatic bonding

Re: [Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-27 Thread Lewis Martin
Very interesting - thank you Francois! PDB re-do does the trick: *import requestsfrom rdkit import Chemdef getPDB(code):out = requests.get(f'https://pdb-redo.eu/db/{code}/{code}_final.pdb ')return out.contentpdb_string =

Re: [Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-27 Thread Francois Berenger
Hi Lewis, Just an idea: you might try to load your PDB in UCSF Chimera, then save it as a mol2 or sdf file. Then, try to read this sdf file from rdkit. Another idea: try to get your pdb file through the pdbredo service. https://pdb-redo.eu/ They might have fixed a few things; maybe this PDB

[Rdkit-discuss] Parsing a PDB file with atoms that are too close, causing bad bond

2021-09-26 Thread Lewis Martin
Hi RDKit, While parsing proteins from the PBD with RDKit, I've come across situations where the distance-based bond determination leads to 'incorrect' bonds between atoms that are erroneously too close together. PDB files have no bond information, so it's not really 'incorrect' (rather the model