determine in code the pdb atom name of an OBAtom

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

determine in code the pdb atom name of an OBAtom

John Baxter
Hello, openbabel-discuss!

For a project I need to be able to tell which atom of a protein residue is the carbon alpha atom (" CA " in a PDB file). I can't figure out how to query an OBAtom for this data; is there a way to do this?

Thank you very much.
-John Baxter
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: determine in code the pdb atom name of an OBAtom

Stefano Forli
Hi John,
you didn't specify which language you're using, but in Python you can get it with
something like this:
=================
import pybel
ob = pybel.ob
import sys

mol = pybel.readfile('mol2', sys.argv[1]).next()
obmol = mol.OBMol

for res in ob.OBResidueIter(obmol):
      for atom in ob.OBResidueAtomIter(res):
          atName = res.GetAtomID(atom)
          print "Atom name:", atName # i.e., CA
=================

Every once in a while this question pops in the mailing list. Does any of the main
developers think that there would be some use for a dedicated function at the atom
level?Maybe mapping the same residue function to the OBAtom object?, something like:
  OBAtom::GetAtomID()

S



On 02/24/2017 02:14 PM, John Baxter wrote:

> Hello, openbabel-discuss!
>
> For a project I need to be able to tell which atom of a protein residue is the carbon alpha atom (" CA " in a PDB file). I can't figure out how to query an OBAtom for this data; is there a way to do this?
>
> Thank you very much.
> -John Baxter
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>

--

  Stefano Forli, PhD

  Assistant Professor of ISCB
  Molecular Graphics Laboratory

  Dept. of Integrative Structural
  and Computational Biology, MB-112A
  The Scripps Research Institute
  10550  North Torrey Pines Road
  La Jolla,  CA 92037-1000,  USA.

     tel: +1 (858)784-2055
     fax: +1 (858)784-2860
     email: [hidden email]
     http://www.scripps.edu/~forli/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: determine in code the pdb atom name of an OBAtom

Stefano Forli
In reply to this post by John Baxter
Hi John,
you didn't specify which language you're using, but in Python you can get it with
something like this:
=================
import pybel
ob = pybel.ob
import sys

mol = pybel.readfile('mol2', sys.argv[1]).next()
obmol = mol.OBMol

for res in ob.OBResidueIter(obmol):
      for atom in ob.OBResidueAtomIter(res):
          atName = res.GetAtomID(atom)
          print "Atom name:", atName # i.e., CA
=================

Every once in a while this question pops in the mailing list. Does any of the main
developers think that there would be some use for a dedicated function at the atom
level?Maybe mapping the same residue function to the OBAtom object?, something like:
  OBAtom::GetAtomID()

S



On 02/24/2017 02:14 PM, John Baxter wrote:

> Hello, openbabel-discuss!
>
> For a project I need to be able to tell which atom of a protein residue is the carbon alpha atom (" CA " in a PDB file). I can't figure out how to query an OBAtom for this data; is there a way to do this?
>
> Thank you very much.
> -John Baxter
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>

--

  Stefano Forli, PhD

  Assistant Professor of ISCB
  Molecular Graphics Laboratory

  Dept. of Integrative Structural
  and Computational Biology, MB-112A
  The Scripps Research Institute
  10550  North Torrey Pines Road
  La Jolla,  CA 92037-1000,  USA.

     tel: +1 (858)784-2055
     fax: +1 (858)784-2860
     email: [hidden email]
     http://www.scripps.edu/~forli/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: determine in code the pdb atom name of an OBAtom

John Baxter
In reply to this post by Stefano Forli
Thank you! That answers my question. I agree that an OBAtom::GetAtomID() would be a useful addition. -JB
________________________________________
From: Stefano Forli <[hidden email]>
Sent: Friday, February 24, 2017 4:22:42 PM
To: [hidden email]
Subject: Re: [Open Babel] determine in code the pdb atom name of an OBAtom

Hi John,
you didn't specify which language you're using, but in Python you can get it with
something like this:
=================
import pybel
ob = pybel.ob
import sys

mol = pybel.readfile('mol2', sys.argv[1]).next()
obmol = mol.OBMol

for res in ob.OBResidueIter(obmol):
      for atom in ob.OBResidueAtomIter(res):
          atName = res.GetAtomID(atom)
          print "Atom name:", atName # i.e., CA
=================

Every once in a while this question pops in the mailing list. Does any of the main
developers think that there would be some use for a dedicated function at the atom
level?Maybe mapping the same residue function to the OBAtom object?, something like:
  OBAtom::GetAtomID()

S



On 02/24/2017 02:14 PM, John Baxter wrote:

> Hello, openbabel-discuss!
>
> For a project I need to be able to tell which atom of a protein residue is the carbon alpha atom (" CA " in a PDB file). I can't figure out how to query an OBAtom for this data; is there a way to do this?
>
> Thank you very much.
> -John Baxter
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>

--

  Stefano Forli, PhD

  Assistant Professor of ISCB
  Molecular Graphics Laboratory

  Dept. of Integrative Structural
  and Computational Biology, MB-112A
  The Scripps Research Institute
  10550  North Torrey Pines Road
  La Jolla,  CA 92037-1000,  USA.

     tel: +1 (858)784-2055
     fax: +1 (858)784-2860
     email: [hidden email]
     http://www.scripps.edu/~forli/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Loading...