Placing Centroid at center of selection
Hello,
I am trying to place a centroid https://www.cgl.ucsf.edu/chimerax/docs/user/commands/define.html#centroid marker at the center of a selection of atoms, for example in the middle of a benzene ring that is at some arbitrary position in my system. I want to do some distance measurements here. I can do something like this:
shape sphere color orange radius 0.25 center sel
where the center sel places the sphere where I want, but these spheres can't be used to make measurements. Instead I think I need a marker object, such as:
define centroid radius 0.25 color orange
But I don't know how to recreate that `center sel` position. I have tried
define centroid radius 0.25 color orange position center
define centroid radius 0.25 color orange position center sel
define centroid radius 0.25 color orange position sel
These do not work. I am under the impression that the centroid is a marker object and should have some position argument. Can anyone help me?
Thanks,
Hi German, Sure! "sel" is an atom specification that means the currently selected atoms. So if you have selected the atoms of the benzene ring, it would be something like:
define centroid sel radius 0.25 color orange
...where "sel" is the atom-spec as shown in the usage information: https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#centroid
There are lots of different ways to give an atom-spec. Instead of "sel" you could give residue number(s) or name(s), atom name(s), "protein" etc. https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 16, 2022, at 4:45 PM, German Barcenas via ChimeraX-users chimerax-users@cgl.ucsf.edu wrote:
Hello, I am trying to place a centroid marker at the center of a selection of atoms, for example in the middle of a benzene ring that is at some arbitrary position in my system. I want to do some distance measurements here. I can do something like this:
shape sphere color orange radius 0.25 center sel
where the center sel places the sphere where I want, but these spheres can't be used to make measurements. Instead I think I need a marker object, such as:
define centroid radius 0.25 color orange
But I don't know how to recreate that `center sel` position. I have tried
define centroid radius 0.25 color orange position center
define centroid radius 0.25 color orange position center sel
define centroid radius 0.25 color orange position sel
These do not work. I am under the impression that the centroid is a marker object and should have some position argument. Can anyone help me? Thanks,
Ahh ok, so I was overcomplicating it I guess(: I just tried this and it worked.
Thanks so much!
On Wed, Mar 16, 2022 at 6:53 PM Elaine Meng meng@cgl.ucsf.edu wrote:
Hi German, Sure! "sel" is an atom specification that means the currently selected atoms. So if you have selected the atoms of the benzene ring, it would be something like:
define centroid sel radius 0.25 color orange
...where "sel" is the atom-spec as shown in the usage information: https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#centroid
There are lots of different ways to give an atom-spec. Instead of "sel" you could give residue number(s) or name(s), atom name(s), "protein" etc. https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html
I hope this helps, Elaine
Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 16, 2022, at 4:45 PM, German Barcenas via ChimeraX-users <
chimerax-users@cgl.ucsf.edu> wrote:
Hello, I am trying to place a centroid marker at the center of a selection of
atoms, for example in the middle of a benzene ring that is at some arbitrary position in my system. I want to do some distance measurements here. I can do something like this:
shape sphere color orange radius 0.25 center sel
where the center sel places the sphere where I want, but these spheres
can't be used to make measurements. Instead I think I need a marker object, such as:
define centroid radius 0.25 color orange
But I don't know how to recreate that `center sel` position. I have
tried
define centroid radius 0.25 color orange position center
define centroid radius 0.25 color orange position center sel
define centroid radius 0.25 color orange position sel
These do not work. I am under the impression that the centroid is a
marker object and should have some position argument. Can anyone help me?
Thanks,
participants (2)
-
Elaine Meng
-
German Barcenas