Not 100% sure I understand the question correctly, but maybe the confusing part is the following: The clip numbers are not absolute, but are additive. As in every time you use the following command:

 

clip far 35

 

the far clipping plane would be moved by 35. This can lead to some inconsistencies, for example when one uses ‘clip list’ and gets a value of 210, and then puts that value into a script that changes the clipping plane several times for different views. Safest way to not have that problem is: put a ‘clip off’ in front of all clipping commands in a script. This way the exact view will be reproduced every time. E.g.

 

.

.

.

#set view 1

view matrix camera  -0.20791,2.5127e-09,-0.97815,-250.33,-0.97815,-4.5356e-09,0.20791,309.25,-9.8669e-09,1,4.8527e-09,229.38

clip off

clip near -1

clip far 134

save "PNG/view_1.png"

 

#set view 2

view matrix camera  -0.96824,-0.21649,0.12504,-223.03,-0.075286,-0.22447,-0.97157,-549.26,0.2384,-0.95013,0.20104,356.85

clip off

clip near -16

clip far 35

save "PNG/view_2.png"

.

.

.

 

In this example, the first view will be at clipping near/far of -1/134, and the second view will be at -16/35. If one omits the ‘clip off’, the second view would be at clip near=-17 and clip far=169 (instead of the intended -16, 35)

 

For me personally absolute values would be more intuitive (I guess similar to pymol (which many people might be used to), where ‘get_view’ would give you a matrix that reproduces both view and also clipping/fogging every time, no matter whether there is already fog/clipping present.)

 

Best,

Moritz

 

 

 

From: Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
Date: Monday, August 28, 2023 at 11:59 AM
To: vincent Chaptal <vincent.chaptal@ibcp.fr>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: [chimerax-users] Re: save "side view" settings

        External Email - Use Caution       

Hi Vincent,
I always save a session file with the view for each publication image.  Trying to do it this other way is much harder, in my opinion, and I have never tried it myself.  As far as I know, the "view matrix" command should report (and restore) the camera and model positions, and "clip list" report (and "clip" restore) the clipping plane position(s):

<https://secure-web.cisco.com/1MVnhhzN19WBilS9gDO4_Q4yCh88PWvZfX-39fwyPLIlx6y4Vz3erktHutC1_lKG0kNF5i7X1vpZ7EWpHymhI9own4UCYQDyy245qU8KiJfSeI282n3t0Lt4kYQGx7NLjSiWQYIRlp84o6PVH6X9EUHJBZzTt2SRhRejzqbrEhvgPa64B1kDYW8xNta0vRQDIBmq8mjNAC3NY5px5EfwuoG0iTlnewXuEifYJRWHp6ACyMas0YrxHVwJfshSUq8ank_K2DLemsI1f6ECTd8K7bZCVQ4RFPwUkWmX8Tr41j_tEfbkruTRSi5UoMb6FcMAsNnE9QFKwhNLqfOFG2hXo_w/https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fview.html%23matrix>
<https://secure-web.cisco.com/1rH6UOFHJhkT9dijsnzAEc3Hc8ARJKTd5xv5ALjfH1y-k5g4IK3l8co6LiNk9qjkgrwKk9eMLlyWjhtYrdPqg4Siy0MRjcp9fZngrYrOFiTM8kjV3bxH7udnPoeNhGW3st_N9PH9-pYscgbTW9E508Wf4-U5IkR2tVGRqGOimTv68XGSjgm5QqZMsIdGZUJS0Ahkn2CPJYnNE450ekgoCE5nUnXSenyXxRNbUq8__qZTIas3sBteUOb1Enmo05OXaswwSZLia_YEYuK6XbH5Ewb13Fht0YRaay0qjzUobh05clvM-qA550zp_NjZAUGpXKviIAWGEh5Io-IFqO0pUvQ/https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fclip.html>

What you showed for results from "clip list" does not make sense:  the near and far planes do not have a tilt axis, so their axis will only be 0,0,1 or 0,0,-1.  But you said "modified" so maybe you edited it?  It is impossible for me to tell what is really in your session if you don't include the whole results for clip list.

Then if you want it to look the same you should set exactly the same clip plane(s) as reported by clip list.  If you have a front or back plane, you should also set the reported axis ("axis" option of "clip", see help above) and point cordinates  ("position" option of "clip").

If it is not working and you feel it is a bug, please use Help... Report a Bug and attach the session, and the details of how you tried to reproduce it; however, that would put your data in a publicly available repository.  If you have a simpler example you could attach that to the bug report instead.

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


> On Aug 28, 2023, at 7:48 AM, vincent Chaptal via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Hi Elaine,
>
> I've been playing around with it but I can't get to what I want.
> The second option of saving views works within a session, but it is lost if I restart ChimeraX or changes session, so what I'm looking for is really some numbers to place in a script so I can touch up my figure for publication multiple times.
>
> Using "clip list" does list me an offset for the "far", as I modified it:
> Using 1 clip planes:
> far offset -1.5964, axis 0.032,-0.040,0.999, point 106.7,107.9,112.8)
>
> I am trying to reproduce the view with:
> view matrix camera 0.051145,-0.99818,0.03201,113.43,0.99794,0.049838,-0.040387,99.325,0.038719,0.034009,0.99867,323.92
> clip front 0 far -1.5964
>
> (and varying flavors) but it doesn't recreate the same view. The clipping offset is much more drastic with my command line compared to the manual twicking of the far plane.
> Could you please point me in the right direction?
> Thank you
> Vincent
>
>
> Le 22/08/2023 à 17:08, Elaine Meng a écrit :
>> Hi Vincent,
>> You can report current clip settings in the Log with command:
>>
>> clip list
>>
>>
>> <https://secure-web.cisco.com/1rH6UOFHJhkT9dijsnzAEc3Hc8ARJKTd5xv5ALjfH1y-k5g4IK3l8co6LiNk9qjkgrwKk9eMLlyWjhtYrdPqg4Siy0MRjcp9fZngrYrOFiTM8kjV3bxH7udnPoeNhGW3st_N9PH9-pYscgbTW9E508Wf4-U5IkR2tVGRqGOimTv68XGSjgm5QqZMsIdGZUJS0Ahkn2CPJYnNE450ekgoCE5nUnXSenyXxRNbUq8__qZTIas3sBteUOb1Enmo05OXaswwSZLia_YEYuK6XbH5Ewb13Fht0YRaay0qjzUobh05clvM-qA550zp_NjZAUGpXKviIAWGEh5Io-IFqO0pUvQ/https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fclip.html>
>>
>>
>> More to your point, however, you can save the current view (which includes the clipping plane positions) with command:
>>
>> view name myviewname
>>
>> ....of course you can name it something else, and you can have multiple saved views with different names.  Then later in the same session, either not quitting ChimeraX between, or from saving a session file after you saved the view(s) and later restoring the session from the file, you can get back to that view with command:
>>
>> view myviewname
>>
>> ...there are various command options, like gradually moving to the view over a number of frames as is often done for recording a movie, see the help:
>>
>> <https://secure-web.cisco.com/1QzMfrb2bZI0tVknJWm-znSsYye9DecegVUfz15eWNt_8AzFuzOAXgIKZHBreojVsS73FrNrwRrBkd1UE6S9pAAamQqPRyDDZpT89CZXZntBovx5URBa_xBs8IfMrD3wLZEvvwUAzrWsz9CWHBWQL_su4yWaM0qW8ffrI5NlHt4dFq_nntTiGdUqU-BsNjJX6g-2Tp2mo_eAnYDw34TAbUD5IYF-t_5kUJrLOSpz_MWw4dELuErBKnv50drbgJl4KhiovI4fsA6zDL0ybgaxcv5n6Vm4noNShHARvqUWPNI8YAPpxGbCnOGZ8fL-rqwoVhPI7bCw8EaLQuu9syS9Fuw/https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fview.html%23name>
>>
>>
>> I hope this helps,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.                      
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>
>>> On Aug 22, 2023, at 3:34 AM, vincent Chaptal via ChimeraX-users <chimerax-users@cgl.ucsf.edu>
>>>  wrote:
>>>
>>> Hi,
>>>
>>> I opened the side view dialog window and adjusted the view planes for a nice figure.
>>> I would like to save the parameters so I can go back and modify the figure at a later stage, but the setting are not stored in the "view matrix" command.
>>> Could you tell me which command can save these settings? (I'm using chimeraX 1.5).
>>>
>>> Thank you.
>>> Best
>>> Vincent
>>>
>
> --
> Vincent Chaptal, PhD
> Director of GdR APPICOM
> Drug Resistance and Membrane Proteins Lab
>
> MMSB -UMR5086
> 7 passage du Vercors
> 69007 LYON
> FRANCE
> +33 4 37 65 29 01
> http://secure-web.cisco.com/1Jw2wqm82BlLwDhGvezoCHIjxc5KT0yVHQFrUSCIA7tGyJPdm1lKrSZkNAyLH5cAW7SzFeIeGsL8e5nT0xTPdSWiHINNqNlVqgCK82ewBZ8cNSYNZ1FxBu0WYTm2jm70Ej0RNO6N7_NYMCQWJ_X0rPKe5ui_9UpkqMBLqdG74-vsos7XlfPMhzhiQIvkBw5svcpBQVx9tUcTDIM_eghTeLo86IbDBN7RK1UM4FnZ4duYIq6DjV4rGVa44bljPdWSRiZQ3Ci62V6Bd2UhevNjlEvFxVFA75YBcMhVvkMn3uNTu63BgQlXrDJs6mIJ_MWqC76K-INoP37N0RnXoCDj9Vg/http%3A%2F%2Fwww.appicom.cnrs.fr
> http://secure-web.cisco.com/1dJbUg3FMhRO53a0TOcDiRztwiHxyX5efun_yRGQmanKtYpGNq5N8NEkU0Ue3Cfis0qxa2vhV5DLdY4xFgQAMQDUm8sWgXeE9TIfJhvuVPWEwwbACWxcW4q79ljZyCGtmOp57DEVWdS8Tq7oh3HQgtMYh7avWs2IyqQKTuG3cXf6W3BfoXtPLeAp_vb2grhFK6Jv9ykGUbLxfEdTaq2ZFky600yHermrAOVi2FWgQN1jizGH834gp2_skw5fGeI3fBWtvjhJ5aue0_PTMgGFYOlhFRTe1vju-bX02u43F8WDgC89aeIglsyKRy07-p2d2co6KZgOfg-HudF3C5IJTBQ/http%3A%2F%2Fmmsb.cnrs.fr%2Fen%2F
>
> _______________________________________________
> ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
> Archives: https://secure-web.cisco.com/1Bq4XXRT5xl47h-0oUXAvH6QIe8H0yGPknLwTmCVuBiEgkRNGZMNBBXh6yY7vkIcxr3lJxlxupJCjmD3PuyAgU3RmX0p3OLst4tI8vUFzRSe7mTUqaoEoT6SKt_nM7zirPypE_GlXaTCEGg18ULrRcJ9OmaY39m2s3GrCgT_KxO1DK2ZodWT4hYkJhXZJ5GAsnjbCQYNv58gBIH5CRZWOv7vcOu7lxBnlGEUMWLPZr9K_ly_Rty_dXRFcZdsgnzwOjmourF-UG-sS3cA6XWek5KBjhiI-4T8zaUYk7kfD9acDSiMeA5G3w35WJr2SK0f3doxqJSkxcedKBoGjcO1ong/https%3A%2F%2Fmail.cgl.ucsf.edu%2Fmailman%2Farchives%2Flist%2Fchimerax-users%40cgl.ucsf.edu%2F


_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://secure-web.cisco.com/1Bq4XXRT5xl47h-0oUXAvH6QIe8H0yGPknLwTmCVuBiEgkRNGZMNBBXh6yY7vkIcxr3lJxlxupJCjmD3PuyAgU3RmX0p3OLst4tI8vUFzRSe7mTUqaoEoT6SKt_nM7zirPypE_GlXaTCEGg18ULrRcJ9OmaY39m2s3GrCgT_KxO1DK2ZodWT4hYkJhXZJ5GAsnjbCQYNv58gBIH5CRZWOv7vcOu7lxBnlGEUMWLPZr9K_ly_Rty_dXRFcZdsgnzwOjmourF-UG-sS3cA6XWek5KBjhiI-4T8zaUYk7kfD9acDSiMeA5G3w35WJr2SK0f3doxqJSkxcedKBoGjcO1ong/https%3A%2F%2Fmail.cgl.ucsf.edu%2Fmailman%2Farchives%2Flist%2Fchimerax-users%40cgl.ucsf.edu%2F

The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline .


Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.