Hi Christophe,

I prepare my figures using ChimeraX command (.cxc) scripts and I believe I have a workflow that lets me reproduce exact views. I know it's not 100% robust, but it's reliable enough for me. It basically relies on a sequence of close; windowsize; view matrix; zoom; clip; save.

Here is a pseudo script. To work out the values you need for the matrices, just move your point of view and your models until you are happy, then do "view matrix".  I have not worked out a good way to get the distances for the clip planes. So I just play with them on the command line until I get the look I want, then save the values in my cxc file.

Hope this helps & that more experienced users can chime in with improvements.

Cheers,
Alexis


# close anything currently open
close
# go to relevant directory
cd /my/absolute/path
windowsize 1200 1200
camera ortho
clip near off far off front off back off
# Open files
open my_model.pdb name "my model"
open my_map.mrc name "my map"
# etc.

#insert here coloring, styles, for the model/map/background etc

# Go to your favorite view point, save a shot
view matrix camera 1,0,0,182.59,0,1,0,229.79,0,0,1,352.89
zoom 0.33
clip near off far off front off back off; clip near -100.0 far +100.0 front off back off
~select
save my_figure.png supersample 3 transparentBackground false

# If you need to move your models
view matrix models #1,0.91269,-0.0093359,-0.40855,59.153,-0.40865,-0.018906,-0.91249,368.7,0.00079806,0.99977,-0.02107,-44.893,#2,-0.83654,-0.058918,-0.54474,344.52,-0.54355,-0.035951,0.83861,293.33,-0.068993,0.99762,-0.0019503,-42.032

# then take another shot
view matrix camera 0.98289,-0.005269,-0.18408,131.07,-0.17421,-0.3506,-0.92018,70.662,-0.059691,0.93651,-0.34553,163.8
clip near off far off front off back off; clip near -20.0 far +12.0 front off back off
save Figures/TRPA1_3551_binding_site_details1.png supersample 3 transparentBackground false




On Sun, Feb 9, 2020 at 10:01 AM Christophe Leterrier <christophe.leterrier@gmail.com> wrote:
Hi,

I haven't been able to find how to
- log
- set
- store
- recall

a precise view (ie get the same exact image if I do a snapshot). 

First use case would within the same session (fixed computer, window size, no restart of the application in between). Second use case (more tricky?) would be independently of computer / window size / current session.

Thanks for your help!

Christophe


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