[Chimera-users] Writing residues coordinates and COMs

Yasser Almeida yasser.almeida at gmail.com
Tue Oct 20 07:33:58 PDT 2020

  Hi Elaine,

Thank you for your message and sorry for the late reply. I found a pythonic
way to get the COMs of the residues of interest and save their xyz
coordinates. That's more flexible for my problem.


El mié., 14 oct. 2020 a las 18:42, Elaine Meng (<meng at cgl.ucsf.edu>)

>  Hi Yasser,
> In general you should first figure out all the commands you need to use
> before putting them into python form.  (And then if there are some things
> not available as commands, they may be possible to do in python, but that
> is not the issue here.)
> You can use a command to select the residue and then use the "write"
> command option "selected" to include only the atoms that are selected, for
> example, commands:
> select #0:25.A
> write selected 25.pdb
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html>
> However, it will require more python knowledge to loop through all the
> residues and substitute their numbers into the "select" command (and output
> file name, if that's what you want).  I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> > On Oct 14, 2020, at 1:26 AM, Yasser Almeida <yasser.almeida at gmail.com>
> wrote:
> >
> > Hello,
> >
> > I am writing a python script to iterate through all the residues of my
> model and write the residue coordinates and its correspondent center of
> mass. I tried with 'runCommand' with the command 'write' but it only
> accepts a model to be written, not a specific residue.
> >
> > Any thoughts?
> >
> > Thanks in advance.
> >
> > Yasser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20201020/13b348da/attachment.html>

More information about the Chimera-users mailing list