[chimerax-users] distance between centers of mass using python API
Eric Pettersen
pett at cgl.ucsf.edu
Tue Sep 7 11:26:56 PDT 2021
We are thinking it would be nice if the marker atom also got the given name so that you could use:
dist @AA1 @AA2
And will probably make that enhancement today, so it will be in tomorrow's daily build.
--Eric
> On Sep 7, 2021, at 11:20 AM, Eric Pettersen via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi Diego,
> 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:
>
> dist ##name=AA1 ##name=AA2
>
> If you have exactly two of these centroids open, then this command will also do it:
>
> dist :centroid
>
> 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'.
>
> --Eric
>
> Eric Pettersen
> UCSF Computer Graphics Lab
>
>
>> On Sep 6, 2021, at 10:14 AM, Diego Amaya via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto:chimerax-users at cgl.ucsf.edu>> wrote:
>>
>> Hello,
>>
>> I'm trying to compute the distance between the centers of mass of two residues using the python API. I tried two different ways :
>>
>> 1.
>> rc(session, 'define centroid :43 massWeighting true name AA1')
>> rc(session, 'define centroid :35 massWeighting true name AA2')
>> rc(session, 'distance AA1 AA2')
>>
>> 2.
>> rc(session, ' measure center :43 mark true name AA1')
>> rc(session, 'measure center :35 mark true name AA2')
>> rc(session, 'distance AA1 AA2')
>>
>> But I get this error in the third line in both cases :
>> chimerax.core.errors.UserError: Missing or invalid "objects" argument: invalid objects specifier
>>
>> What is wrong ?
>>
>> Thanks in advance.
>> --
>> Diego A. Amaya Ramírez
>>
>> Aviso legal: 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 www.unal.edu.co <http://www.unal.edu.co/>. 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.
>> _______________________________________________
>> ChimeraX-users mailing list
>> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
>> Manage subscription:
>> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210907/9428d4dd/attachment.html>
More information about the ChimeraX-users
mailing list