samirelanduk / atomium

Python macromolecular parsing (with .pdb/.cif/.mmtf parsing and production)
https://atomium.bio
MIT License
102 stars 19 forks source link

Getting the Residue to which an Atom belongs #36

Closed mnahinkhan closed 2 years ago

mnahinkhan commented 2 years ago

The Overview Docs show an example of how to get a Structure to which an Atom belongs:

>>> pdb1.model.atom(97).structure
<Residue ASN (A.23)>

Unfortunately it seems Atom objects have no attribute "structure". Indeed, I cannot find a reference to such an attribute within the source code.

Was this a feature that was removed? Are there other supported ways in which I might be able to get the residue to which an Atom belongs?

Thank you very much!

samirelanduk commented 2 years ago

Ah, sorry - it’s het. This will return the residue or ligand it is part of.

I’m about three quarters through the new 2.0 release, so all of this will be rationalised in that.

mnahinkhan commented 2 years ago

Thank you very much!

And thank you for the project, it's been of great help! :)