Biopython is excellent for extracting particular models from a PDB file. As Dimitri suggests, you can then pass the result into your processing script. It is quite straightforward to write the relevant PDB model to a string in PDB format and parse with RDKit’s PDB reader, for example.
Dave On Wed, 29 May 2019 at 21:13, Dimitri Maziuk via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > On 5/29/19 8:19 AM, Illimar Hugo Rekand 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. > > Pre-process the PDB file to cut out the model you want. In the files > annotated by PDB it should be the first model and I belive tehre is a > REMARK something-or-other "best model in this ensemble". > > However this fails for multiple conformers in one file, there is at > least one in PDB. > > (It's been a while since I did this so I don't remember the remark > number, nor the multi-conormer entry id off the top of my head.) > -- > Dimitri Maziuk > Programmer/sysadmin > BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > -- David Cosgrove Freelance computational chemistry and chemoinformatics developer http://cozchemix.co.uk
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss