You can also use the "slab" option with command "shape rectangle" to get a 3D box, for example,

shape rectangle width 40 height 50 slab 30

But it does not give sharp edges between the xy box sides (see image).

Tom


On Feb 23, 2022, at 12:25 PM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Gustavo,
There are a few different possibilities:

(1) create a BILD format file describing geometric objects.  It is a simple plain-text format described here, typically just created in the text editor of your choice, and you would name the file something.bild and open it in ChimeraX to display the objects.
<https://rbvi.ucsf.edu/chimerax/docs/user/formats/bild.html>

(2) create markers and links, which are essentially fake atoms and bonds. They can be created within ChimeraX using the "Marker Placement" tool or "marker" command,  or you can use your own external process to create a marker file and then open it in ChimeraX.
<https://rbvi.ucsf.edu/chimerax/docs/user/markers.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/tools/markerplacement.html>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/marker.html>

(3) create shapes which are surface models, using the "shape" command:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/shape.html>

Shape does not have cube option, although you could create a box from repeated use of the "triangle" or "rectangle" option. Still it may make more sense to use one of the other methods to draw a box.  If you are using "shape" it may be easier to use triangles to make the box than rectangles, because the triangle option allows specifying the vertex coordinates whereas the rectangle location has to be specified by its center.

(4) create a cube as a surface with only 8 vertices, using Python somehow (sorry somebody else would have to advise on how to do this)

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco




On Feb 23, 2022, at 11:31 AM, de Miranda Seabra, Gustavo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,

I was wondering if it is possible to draw objects in ChimeraX. More specifically, I'd like to show the gridbox used for docking calculations, so it would be nice if I could draw a cube, and even better if it can be drawn as a surface that could have color, transparency, etc.

How to do this in ChimeraX?

Thanks a lot!
--
Gustavo Seabra
Research Associate Professor
Center for Natural Products, Drug Discovery, and Development (CNPD3)
Department of Medicinal Chemistry
College of Pharmacy
University of Florida, Gainesville, FL, USA
_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users


_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users