[Biojava-l] Access chain letter and residue number from Atom object
Jose Duarte
jose.duarte at rcsb.org
Fri May 12 14:12:35 UTC 2017
All you need is to get the group (residue) and then the chain:
atom.getGroup().getChain().getChainID(); // gives you the author chain id
(biojava 4+)
In biojava 5 (currently in development, but some alpha versions have been
released) it would be slightly different:
atom.getGroup().getChain().getName(); // for the author chain id
atom.getGroup().getChain().getId(); // for the asym_id (internal chain
identifier in mmcif files)
For the residue number you can do:
atom.getGroup().getResidueNumber();
Hope that helps
Jose
On Fri, May 12, 2017 at 3:07 AM, Enrico Morelli <morelli at cerm.unifi.it>
wrote:
> Dear,
>
> I'm using BioJava for a project. After some filtering operations I've
> an Atom list, but I've to know the chain and the residue number for
> each atom.
>
> My PDB has the following format:
>
> HETATM 1661 MG MG A 580 69.222 44.815 33.339 1.00
> 61.74 MG
>
> Through an Atom object seems that should not possible to access to the
> chain (A) and residue number (580). There is a way to do that?
>
> Thanks
>
> --
> -------------------------------------------------------------
> Enrico Morelli
> System Administrator | Programmer | Web Developer
>
> CERM - Polo Scientifico
> Via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY
> phone: +39 055 457 4269
> fax: +39 055 457 4927
> -------------------------------------------------------------
> _______________________________________________
> Biojava-l mailing list - Biojava-l at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biojava-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-l/attachments/20170512/45052f02/attachment.html>
More information about the Biojava-l
mailing list