<div dir="ltr"> Hi Elaine,<br><div><br></div><div>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.</div><div><br></div><div>Best,</div><div>Yasser</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 14 oct. 2020 a las 18:42, Elaine Meng (<<a href="mailto:meng@cgl.ucsf.edu">meng@cgl.ucsf.edu</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Hi Yasser,<br>
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.)<br>
<br>
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:<br>
<br>
select #0:25.A<br>
write selected 25.pdb<br>
<br>
<<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html" rel="noreferrer" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html</a>><br>
<br>
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,<br>
Elaine<br>
-----<br>
Elaine C. Meng, Ph.D. <br>
UCSF Chimera(X) team<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
<br>
> On Oct 14, 2020, at 1:26 AM, Yasser Almeida <<a href="mailto:yasser.almeida@gmail.com" target="_blank">yasser.almeida@gmail.com</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> 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.<br>
> <br>
> Any thoughts?<br>
> <br>
> Thanks in advance.<br>
> <br>
> Yasser<br>
<br>
</blockquote></div>