From: mohan r. <moh...@gm...> - 2010-03-22 12:38:56
|
hi all: could any one tell me how to get the coordinates for a specific atom in a particular amino acid using pymol commands.... is their a commant with can list the coordinates for each aminoacid in a protein molecule?? \ kindly clarify, thanking you in advance. - mohan |
From: Tsjerk W. <ts...@gm...> - 2010-03-22 13:04:08
|
Hi Mohan, You can use iterate_state, which would be the pymol approach: coords = {} iterate_state 1,n. ca,coords[i]=(x,y,z) Or you can take a lower level approach; the python one: for i in cmd.get_model('n. ca').atom: print i.coord cmd.get_model builds you a ChemPy model from a given selection. The .atom property is the list of atoms. If you want to know what else is possible you might want to have a look at the properties/attributes/methods defined: for i in dir(cmd.get_model('n. ca').atom[0]): print i Hope it helps, Tsjerk Of course neither way would restrict you to plotting... On Mon, Mar 22, 2010 at 1:38 PM, mohan raj <moh...@gm...> wrote: > hi all: > > could any one tell me how to get the coordinates for a specific atom in > a particular amino acid using pymol commands.... > > is their a commant with can list the coordinates for each aminoacid in > a protein molecule?? \ > > kindly clarify, thanking you in advance. > > > - mohan > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group Groningen Institute for Biomolecular Research and Biotechnology University of Groningen The Netherlands |
From: Jason V. <jas...@sc...> - 2010-03-22 13:36:14
|
In newer PyMOLs this is as simple as: print cmd.get_atom_coords(oneAtom) where 'oneAtom' is an object or selection of one atom in PyMOL. For example, load $TUT/1hpv.pdb print cmd.get_atom_coords("A/30/CA"); -- Jason On Mon, Mar 22, 2010 at 9:04 AM, Tsjerk Wassenaar <ts...@gm...> wrote: > Hi Mohan, > > You can use iterate_state, which would be the pymol approach: > > coords = {} > iterate_state 1,n. ca,coords[i]=(x,y,z) > > Or you can take a lower level approach; the python one: > > for i in cmd.get_model('n. ca').atom: > print i.coord > > cmd.get_model builds you a ChemPy model from a given selection. The > .atom property is the list of atoms. If you want to know what else is > possible you might want to have a look at the > properties/attributes/methods defined: > > for i in dir(cmd.get_model('n. ca').atom[0]): print i > > Hope it helps, > > Tsjerk > > Of course neither way would restrict you to plotting... > > > > On Mon, Mar 22, 2010 at 1:38 PM, mohan raj <moh...@gm...> wrote: >> hi all: >> >> could any one tell me how to get the coordinates for a specific atom in >> a particular amino acid using pymol commands.... >> >> is their a commant with can list the coordinates for each aminoacid in >> a protein molecule?? \ >> >> kindly clarify, thanking you in advance. >> >> >> - mohan >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> PyMOL-users mailing list (PyM...@li...) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pym...@li... >> > > > > -- > Tsjerk A. Wassenaar, Ph.D. > > post-doctoral researcher > Molecular Dynamics Group > Groningen Institute for Biomolecular Research and Biotechnology > University of Groningen > The Netherlands > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |
From: Jed G. <jgo...@wh...> - 2010-03-22 14:23:49
|
Of course, you could just use the .pdb file as a text file: grep CA xxxx.pdb | cut -f 2,4,7,8,9 will get you the amino acid number, the amino acid identity, and x,y,z coordinates for the CA. Jed Jason Vertrees wrote: > In newer PyMOLs this is as simple as: > > print cmd.get_atom_coords(oneAtom) > > where 'oneAtom' is an object or selection of one atom in PyMOL. > > For example, > > load $TUT/1hpv.pdb > print cmd.get_atom_coords("A/30/CA"); > > -- Jason > > On Mon, Mar 22, 2010 at 9:04 AM, Tsjerk Wassenaar <ts...@gm...> wrote: > >> Hi Mohan, >> >> You can use iterate_state, which would be the pymol approach: >> >> coords = {} >> iterate_state 1,n. ca,coords[i]=(x,y,z) >> >> Or you can take a lower level approach; the python one: >> >> for i in cmd.get_model('n. ca').atom: >> print i.coord >> >> cmd.get_model builds you a ChemPy model from a given selection. The >> .atom property is the list of atoms. If you want to know what else is >> possible you might want to have a look at the >> properties/attributes/methods defined: >> >> for i in dir(cmd.get_model('n. ca').atom[0]): print i >> >> Hope it helps, >> >> Tsjerk >> >> Of course neither way would restrict you to plotting... >> >> >> >> On Mon, Mar 22, 2010 at 1:38 PM, mohan raj <moh...@gm...> wrote: >> >>> hi all: >>> >>> could any one tell me how to get the coordinates for a specific atom in >>> a particular amino acid using pymol commands.... >>> >>> is their a commant with can list the coordinates for each aminoacid in >>> a protein molecule?? \ >>> >>> kindly clarify, thanking you in advance. >>> >>> >>> - mohan >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> PyMOL-users mailing list (PyM...@li...) >>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >>> Archives: http://www.mail-archive.com/pym...@li... >>> >>> >> >> -- >> Tsjerk A. Wassenaar, Ph.D. >> >> post-doctoral researcher >> Molecular Dynamics Group >> Groningen Institute for Biomolecular Research and Biotechnology >> University of Groningen >> The Netherlands >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> PyMOL-users mailing list (PyM...@li...) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pym...@li... >> >> > > > > -- ------------------------ Jed Goldstone Research Specialist Woods Hole Oceanographic Institution Redfield 3-52 MS#32 Woods Hole, MA 02543 http://www.whoi.edu/hpb/Site.do?id=481 Phone: 508-289-4823 |
From: Robert C. <rob...@qu...> - 2010-03-22 14:58:48
|
Hi Jed, On Mon, 22 Mar 2010 10:23:34 -0400 Jed Goldstone <jgo...@wh...> wrote: > Of course, you could just use the .pdb file as a text file: > > grep CA xxxx.pdb | cut -f 2,4,7,8,9 > > will get you the amino acid number, the amino acid identity, and x,y,z > coordinates for the CA. Often this will work, but unfortunately it is not fool proof. If there is no chain ID, if the residue numbers are greater than 999 or if there are alternate position characters present on the atom names, then your field counts in your "cut" command will be off. The PDB file is very strict about which character columns contain which information and there is no requirement for spaces between those data columns. Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Botterell Hall Rm 644 Department of Biochemistry, Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 Fax: 613-533-2497 <rob...@qu...> http://pldserver1.biochem.queensu.ca/~rlc |
From: Jed G. <jgo...@wh...> - 2010-03-22 15:01:56
|
Of course you're all correct - Thierry Fischmann already emailed me to correct me :) I hadn't actually tested anything (mea culpa). I was just trying to point out for those of us less familiar with python that there were alternatives to doing this relatively simple thing outside of pymol. Apologies to the list, Jed Robert Campbell wrote: > Hi Jed, > > On Mon, 22 Mar 2010 10:23:34 -0400 Jed Goldstone <jgo...@wh...> wrote: > > >> Of course, you could just use the .pdb file as a text file: >> >> grep CA xxxx.pdb | cut -f 2,4,7,8,9 >> >> will get you the amino acid number, the amino acid identity, and x,y,z >> coordinates for the CA. >> > > Often this will work, but unfortunately it is not fool proof. If there is > no chain ID, if the residue numbers are greater than 999 or if there are > alternate position characters present on the atom names, then your field > counts in your "cut" command will be off. The PDB file is very strict about > which character columns contain which information and there is no requirement > for spaces between those data columns. > > Cheers, > Rob > -- ------------------------ Jed Goldstone Research Specialist Woods Hole Oceanographic Institution Redfield 3-52 MS#32 Woods Hole, MA 02543 http://www.whoi.edu/hpb/Site.do?id=481 Phone: 508-289-4823 |
From: Tsjerk W. <ts...@gm...> - 2010-03-22 15:06:50
|
But it is very doable using grep/cut, you'll just have to use the -b flag that allows you to cut columns: grep CA xxxx.pdb | cut -b 13-26,30-54 Cheers, Tsjerk On Mon, Mar 22, 2010 at 3:58 PM, Robert Campbell <rob...@qu...> wrote: > Hi Jed, > > On Mon, 22 Mar 2010 10:23:34 -0400 Jed Goldstone <jgo...@wh...> wrote: > >> Of course, you could just use the .pdb file as a text file: >> >> grep CA xxxx.pdb | cut -f 2,4,7,8,9 >> >> will get you the amino acid number, the amino acid identity, and x,y,z >> coordinates for the CA. > > Often this will work, but unfortunately it is not fool proof. If there is > no chain ID, if the residue numbers are greater than 999 or if there are > alternate position characters present on the atom names, then your field > counts in your "cut" command will be off. The PDB file is very strict about > which character columns contain which information and there is no requirement > for spaces between those data columns. > > Cheers, > Rob > -- > Robert L. Campbell, Ph.D. > Senior Research Associate/Adjunct Assistant Professor > Botterell Hall Rm 644 > Department of Biochemistry, Queen's University, > Kingston, ON K7L 3N6 Canada > Tel: 613-533-6821 Fax: 613-533-2497 > <rob...@qu...> http://pldserver1.biochem.queensu.ca/~rlc > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group Groningen Institute for Biomolecular Research and Biotechnology University of Groningen The Netherlands |