
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@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