This is a test version of Biostars. For the public version, visit https://www.biostars.org.
In Biopython-PDB, please teach me about all atoms distance

Hello, Nice people.

I want to get all atoms distance in a PDB file by biopython

especially,

all atoms in all protein residue - all atoms in all water(HOH)

And, I want to take <2.5A

But, I don't know these methods

Please teach me.

p=PDBParser() s=p.get_structure('ID','file')

next.....?

need all atoms in all residue

need all atoms in all HOH

assembly

1 answer

In order to get all atoms in a residue, you can either:

use the unfold_entities function inside of the Selection module in Bio.PDB. If you want all of the atoms in a residue, this means that you use the target level "A" and the entity list is the the name of your residue.

or

Use the .get_list() instance method on your residue.

Hope this helps !

Log in to answer this question.