Hi Illimar,

When reading a PDB file that has multiple models, the RDKit PDB Parser
creates a separate conformer for each model, it shouldn't be creating
additional atoms.

Here's a little demo:

>>> from rdkit import Chem
>>> import rdkit
>>> print(rdkit.__version__)
2019.03.2
>>> !grep -c '^ATOM ' ./5zsw.pdb
27740
>>> mol = Chem.MolFromPDBFile('./5zsw.pdb',removeHs=False)
>>> mol.GetNumAtoms(),mol.GetNumConformers()
(1387, 20)


Are you seeing something different when you read in a multi-model PDB file?

-greg



On Wed, May 29, 2019 at 8:27 PM Illimar Hugo Rekand <illimar.rek...@uib.no>
wrote:

> Hey, RDKitters!
>
>
> I am currently trying to figure out how to only read in the first model of
> a pdb-file. I've designed a script that performs calculations on a per-atom
> basis, and this is very slow when it tries to account for multiple models,
> for example with a NMR-structure.
>
>
> my code is structured something like this:
>
>
> prot = Chem.MolFromPDBFile(prot_cofac, sanitize = False)
>
>
> for atom in prot.GetAtoms():
>
>     property = atom.GetProp("property)
>
>     etc.
>
>
> Hope to hear from you soon
>
>
> Illimar Rekand
> Ph.D. candidate,
> Brenk-lab, Haug-lab
> Department of Biomedicine
> Department of Chemistry
> University of Bergen
>
>
>
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to