<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Diego,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Centroids are created as 'markers' and therefore are referred to in commands in the same way as atoms are. So specifically, your first 'define' command creates a structure named AA1, with one residue named 'centroid', with one atom named 'cent'. Therefore this command will create the distance:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>dist ##name=AA1 ##name=AA2</div><div class=""><br class=""></div><div class="">If you have exactly two of these centroids open, then this command will also do it:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>dist :centroid</div><div class=""><br class=""></div><div class="">Therefore, it might be easiest to not even give these centroids names but instead use two 'define' commands followed by 'dist :centroid' and then 'close :centroid'.</div><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>UCSF Computer Graphics Lab</div></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 6, 2021, at 10:14 AM, Diego Amaya via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">I'm trying to compute the distance between the centers of mass of two residues using the python API. I tried two different ways :</div><div class=""><br class=""></div><div class="">1. <br class=""></div><div class=""><i class="">rc(session, 'define centroid :43 massWeighting true name AA1')<br class="">rc(session, 'define centroid :35 massWeighting true name AA2')<br class="">rc(session, 'distance AA1 AA2') </i></div><div class=""><br class=""></div><div class="">2.</div><div class=""><i class=""><span style="font-family:arial,sans-serif" class="">rc(session, ' measure center :43 mark true name AA1')<br class="">rc(session, 'measure center :35 mark true name AA2')<br class="">rc(session, 'distance AA1 AA2')</span></i></div><div class=""><br class=""></div><div class="">But I get this error in the third line in both cases : <br class=""></div><div class=""><i class="">chimerax.core.errors.UserError: Missing or invalid "objects" argument: invalid objects specifier <br class=""></i></div><div class=""><i class=""><br class=""></i></div><div class="">What is wrong ?<br class=""></div><div class=""><br class=""></div><div class="">Thanks in advance.<i class=""><br class=""></i></div><div class="">-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class="">Diego A. Amaya Ramírez</div></div></div></div>
<br class="">
<b style="color:rgb(34,34,34);font-family:Calibri,sans-serif;font-size:14.6667px;font-style:normal;letter-spacing:normal;text-align:justify;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" class=""><span style="font-size: 6.5pt; line-height: 9.96667px; font-family: "Ancizar Sans", sans-serif;" class="">Aviso legal:</span></b><span style="font-style: normal; font-weight: 400; letter-spacing: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; background-color: rgb(255, 255, 255); font-size: 6.5pt; line-height: 9.96667px; font-family: "Ancizar Sans", sans-serif;" class=""> El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web </span><span style="color:rgb(34,34,34);font-family:Calibri,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;text-align:justify;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);font-size:6.5pt;line-height:9.96667px" class=""><a href="http://www.unal.edu.co/" style="color:blue" target="_blank" class=""><span style="font-family:"Ancizar Sans",sans-serif" class="">www.unal.edu.co</span></a></span><span style="font-style: normal; font-weight: 400; letter-spacing: normal; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; background-color: rgb(255, 255, 255); font-size: 6.5pt; line-height: 9.96667px; font-family: "Ancizar Sans", sans-serif;" class="">.<u class=""><span class=""> </span></u>Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.</span><br class=""><span style="color:rgb(245,132,111);font-family:ClearSans-Regular,Arial,Verdana,Helvetica,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none" class=""><span class=""></span></span><span style="color:rgb(245,132,111);font-family:ClearSans-Regular,Arial,Verdana,Helvetica,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);display:inline!important;float:none" class=""><span class=""></span></span>_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>