Drawing shapes given coordinates
Hi all, I'm trying to add some 3d shapes to a visualization. I was wondering if it would be possible to draw either a cylinder or tube given starting and ending coordinates rather than atom names/numbers or centroid? For example, if I had this coordinate pair: 6.17 1.10 -15.33 20.82 -0.70 -8.39 What would be the best way to go about drawing a line of some sort between those two points? I have dozens of pairs of coordinates so something command line would be ideal. Cheers, Rebecca This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.
Hi Rebecca, There are two approaches for adding cylinders independent of atoms… but I don’t know if either will be satisfactory: (1) “shape cylinder” is command-line and doesn’t require using atoms as endpoints, but it doesn’t allow specifying endpoint coordinates directly. A cylinder is specified by only its center, height, radius, and a rotation angle. I don’t think it is easy to figure out what angle gives the desired endpoint coordinates. (We’ve discussed the need to improve this, but it may be deferred to our next-generation software in development.) <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/shape.html#cylinder> (2) BILD-format input allows specifying endpoint coordinates of a cylinder, but it is not a command. You generate a BILD text file describing the objects and read it in to Chimera. BILD format is very simple, however: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/bild.html> The objects created with “shape” are surface models, so you can change their colors afterward. The BILD objects are not surface models and cannot be recolored and do not work well with transparency. There are two approaches that depend on atoms: (1) pseudobonds can be created with the “distance” command (or atom pairs can be read in from a file with Pseudobond Reader), but pseudobonds require atoms as endpoints. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/distance.html> <http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/pbreader/pbreader.html> (2) the “define” command (or Axes/Planes/Centroids) tool will show cylindrical axes that are best fits to specified sets of atoms. However, there is currently little control over length… it is automatically determined from the atomic coordinates. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/define.html> I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 4, 2016, at 12:09 PM, Rebecca Swett <Rebecca_Swett@vrtx.com> wrote:
Hi all, I'm trying to add some 3d shapes to a visualization. I was wondering if it would be possible to draw either a cylinder or tube given starting and ending coordinates rather than atom names/numbers or centroid? For example, if I had this coordinate pair: 6.17 1.10 -15.33 20.82 -0.70 -8.39
What would be the best way to go about drawing a line of some sort between those two points? I have dozens of pairs of coordinates so something command line would be ideal. Cheers, Rebecca
Thank you! Theoretically if I was to create dummy atoms with coordinates at the locations where I want the cylinders to end, I could connect them with pseudobonds. I can easily shape my data that way, and if it doesn't work the BILD files will probably be fine. Thanks for the help! Cheers, Rebecca On 1/4/16, 5:20 PM, "Elaine Meng" <meng@cgl.ucsf.edu> wrote:
Hi Rebecca, There are two approaches for adding cylinders independent of atomsŠ but I don¹t know if either will be satisfactory:
(1) ³shape cylinder² is command-line and doesn¹t require using atoms as endpoints, but it doesn¹t allow specifying endpoint coordinates directly. A cylinder is specified by only its center, height, radius, and a rotation angle. I don¹t think it is easy to figure out what angle gives the desired endpoint coordinates. (We¹ve discussed the need to improve this, but it may be deferred to our next-generation software in development.) <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_shape.html-23cylinder&d=CwIFaQ&c=TzEZu9LIcihmW3 7vx9Ah6w&r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd 4eXf6HdP_BL9dt0gv_zz3oMdq8&s=9vZCIh2K2i-8UrGF7HkSZwZwT7CRFcS9RUZsHUsson4&e = >
(2) BILD-format input allows specifying endpoint coordinates of a cylinder, but it is not a command. You generate a BILD text file describing the objects and read it in to Chimera. BILD format is very simple, however: <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_bild.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w&r=Z2BqCMu wlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP_BL9dt0gv_ zz3oMdq8&s=2A5wPT06BJ7QN1TDyA4kS36ILONzhA703a7xRpdnJKY&e= >
The objects created with ³shape² are surface models, so you can change their colors afterward. The BILD objects are not surface models and cannot be recolored and do not work well with transparency.
There are two approaches that depend on atoms:
(1) pseudobonds can be created with the ³distance² command (or atom pairs can be read in from a file with Pseudobond Reader), but pseudobonds require atoms as endpoints. <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_distance.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w &r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP _BL9dt0gv_zz3oMdq8&s=tUGhl0z5yTsTqr2tyEgexdraCTB8o2JtwjuJZTgMwvo&e= > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_ContributedSoftware_pbreader_pbreader.html&d=CwIFaQ&c=TzEZu9LIci hmW37vx9Ah6w&r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH 6akd4eXf6HdP_BL9dt0gv_zz3oMdq8&s=nRvWQ2FPg5n33Obqd9Bee1ovSNmgCCdbaT1EH6Uc1 I8&e= >
(2) the ³define² command (or Axes/Planes/Centroids) tool will show cylindrical axes that are best fits to specified sets of atoms. However, there is currently little control over lengthŠ it is automatically determined from the atomic coordinates. <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_define.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w&r =Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP_B L9dt0gv_zz3oMdq8&s=t9I-WC_-VvEvmTfphtU3ey2GT0sMRiFtO62hFkRj7Rk&e= >
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 4, 2016, at 12:09 PM, Rebecca Swett <Rebecca_Swett@vrtx.com> wrote:
Hi all, I'm trying to add some 3d shapes to a visualization. I was wondering if it would be possible to draw either a cylinder or tube given starting and ending coordinates rather than atom names/numbers or centroid? For example, if I had this coordinate pair: 6.17 1.10 -15.33 20.82 -0.70 -8.39
What would be the best way to go about drawing a line of some sort between those two points? I have dozens of pairs of coordinates so something command line would be ideal. Cheers, Rebecca
This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.
You’re welcome! If going the pseudobond route, just make sure you can get the kind of display you want. If you just want solid cylinders, that can be achived with the stick drawmode, and you can also set color and radius as desired. If you make a file for Pseudobond Reader you can also specify the colors and (optional) text labels in the file. Otherwise you can control pseudobond attributes collectively or individually with “setattr p” and “setattr g” commands. <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/setattr.html> For example, you could hide all distance labels with command: setattr p label '' (that’s two single quote marks in a row) and the same command except plus “sel” at the end will do it for only the pseudobonds with both end atoms selected. You could also give the atom names. Best, Elaine
On Jan 5, 2016, at 5:37 AM, Rebecca Swett <Rebecca_Swett@vrtx.com> wrote:
Thank you! Theoretically if I was to create dummy atoms with coordinates at the locations where I want the cylinders to end, I could connect them with pseudobonds. I can easily shape my data that way, and if it doesn't work the BILD files will probably be fine. Thanks for the help! Cheers, Rebecca
On 1/4/16, 5:20 PM, "Elaine Meng" <meng@cgl.ucsf.edu> wrote:
Hi Rebecca, There are two approaches for adding cylinders independent of atomsŠ but I don¹t know if either will be satisfactory:
(1) ³shape cylinder² is command-line and doesn¹t require using atoms as endpoints, but it doesn¹t allow specifying endpoint coordinates directly. A cylinder is specified by only its center, height, radius, and a rotation angle. I don¹t think it is easy to figure out what angle gives the desired endpoint coordinates. (We¹ve discussed the need to improve this, but it may be deferred to our next-generation software in development.) <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_shape.html-23cylinder&d=CwIFaQ&c=TzEZu9LIcihmW3 7vx9Ah6w&r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd 4eXf6HdP_BL9dt0gv_zz3oMdq8&s=9vZCIh2K2i-8UrGF7HkSZwZwT7CRFcS9RUZsHUsson4&e = >
(2) BILD-format input allows specifying endpoint coordinates of a cylinder, but it is not a command. You generate a BILD text file describing the objects and read it in to Chimera. BILD format is very simple, however: <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_bild.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w&r=Z2BqCMu wlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP_BL9dt0gv_ zz3oMdq8&s=2A5wPT06BJ7QN1TDyA4kS36ILONzhA703a7xRpdnJKY&e= >
The objects created with ³shape² are surface models, so you can change their colors afterward. The BILD objects are not surface models and cannot be recolored and do not work well with transparency.
There are two approaches that depend on atoms:
(1) pseudobonds can be created with the ³distance² command (or atom pairs can be read in from a file with Pseudobond Reader), but pseudobonds require atoms as endpoints. <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_distance.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w &r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP _BL9dt0gv_zz3oMdq8&s=tUGhl0z5yTsTqr2tyEgexdraCTB8o2JtwjuJZTgMwvo&e= > <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_ContributedSoftware_pbreader_pbreader.html&d=CwIFaQ&c=TzEZu9LIci hmW37vx9Ah6w&r=Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH 6akd4eXf6HdP_BL9dt0gv_zz3oMdq8&s=nRvWQ2FPg5n33Obqd9Bee1ovSNmgCCdbaT1EH6Uc1 I8&e= >
(2) the ³define² command (or Axes/Planes/Centroids) tool will show cylindrical axes that are best fits to specified sets of atoms. However, there is currently little control over lengthŠ it is automatically determined from the atomic coordinates. <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rbvi.ucsf.edu_chi mera_docs_UsersGuide_midas_define.html&d=CwIFaQ&c=TzEZu9LIcihmW37vx9Ah6w&r =Z2BqCMuwlxQxgSzUiCDaK4rAd15j9FSes0phjplcAGU&m=ALnOY5nR3xnyH6akd4eXf6HdP_B L9dt0gv_zz3oMdq8&s=t9I-WC_-VvEvmTfphtU3ey2GT0sMRiFtO62hFkRj7Rk&e= >
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 4, 2016, at 12:09 PM, Rebecca Swett <Rebecca_Swett@vrtx.com> wrote:
Hi all, I'm trying to add some 3d shapes to a visualization. I was wondering if it would be possible to draw either a cylinder or tube given starting and ending coordinates rather than atom names/numbers or centroid? For example, if I had this coordinate pair: 6.17 1.10 -15.33 20.82 -0.70 -8.39
What would be the best way to go about drawing a line of some sort between those two points? I have dozens of pairs of coordinates so something command line would be ideal. Cheers, Rebecca
participants (2)
-
Elaine Meng
-
Rebecca Swett