atoms.scene_coords inconsistency before and after saving

Hi, With version 1.7.1 (2024-01-23), if I open a structure (tested with 6MEO and 6ARA), select the whole molecule, change "Right Mouse" to "Rotate model", rotate the model by dragging with the right mouse, save the model into a .cif file (uncheck "Use untransformed coordinates"), and then type the following python script in the Shell in the session performed the rotation and in a new session/launch of ChimeraX and opening of the saved file, the results are different, see the attached screenshots. ======= from chimerax.atomic import Structure mol = session.models.list(type = Structure)[0] mol.atoms.scene_coords ======= For 6ARA, if I do not change the camera setting before rotation (drag the left mouse), only rotate in the original camera setting, this is not reproduced. But if I change the camera setting, this is reproduced. For 6MEO, I always reproduce the described behavior. From https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/atomic/atomic.html#chim... , *property *scene_coords <https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/atomic/atomic.html#chim...> Atoms’ coordinates in the global scene coordinate system. This accounts for the Drawing positions for the hierarchy of models each atom belongs to. Either I misunderstood the whole scene and camera system, or this should not have happened. Why is this the case? How can I access from the session performed the rotation the coords as in a new session? Many thanks, Roden -- This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.

Hi Roden, ChimeraX writes the atoms in the mmCIF file in a different order compared to the orignal PDB mmCIF file. So when you print out the scene_coords for the atoms and look at the values at the end of the arrays for the PDB file and ChimeraX mmcif file you are seeing coordinates for different atoms. The clue to this is that the coordinates for the first atoms in the two arrays are the same. If you look at the ChimeraX mmCIF file and the PDB mmCIF file in a text editor you can see they have different atom orders. I don't know why the order is different. Greg Couch is the ChimeraX developer who works on reading and writing mmCIF files and would probably know why the order is different. Tom
On Sep 10, 2024, at 10:15 AM, Roden Deng Luo via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
With version 1.7.1 (2024-01-23), if I open a structure (tested with 6MEO and 6ARA), select the whole molecule, change "Right Mouse" to "Rotate model", rotate the model by dragging with the right mouse, save the model into a .cif file (uncheck "Use untransformed coordinates"), and then type the following python script in the Shell in the session performed the rotation and in a new session/launch of ChimeraX and opening of the saved file, the results are different, see the attached screenshots.
======= from chimerax.atomic import Structure mol = session.models.list(type = Structure)[0] mol.atoms.scene_coords =======
For 6ARA, if I do not change the camera setting before rotation (drag the left mouse), only rotate in the original camera setting, this is not reproduced. But if I change the camera setting, this is reproduced. For 6MEO, I always reproduce the described behavior.
From https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/atomic/atomic.html#chim...,
property scene_coords <https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/atomic/atomic.html#chim...> Atoms’ coordinates in the global scene coordinate system. This accounts for the Drawing positions for the hierarchy of models each atom belongs to.
Either I misunderstood the whole scene and camera system, or this should not have happened. Why is this the case? How can I access from the session performed the rotation the coords as in a new session?
Many thanks, Roden
This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.<scene_coords in a new session.jpg><scene_coords in the session performed the rotation.jpg>_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Tom, Thanks! It makes sense now. Just in case Greg or anyone is looking into this. I tried again but could not reproduce for 6ARA. It might be the case that I mis-opened a file earlier. I guess it is at least related to the different handling of HETATM. (I will need to rethink if anywhere in the DiffFit pipeline relies on this order. I noticed some bugs when I played with various scenarios right before I was gonna put DiffFit in the ChimeraX toolshed. So, it is postponed.) Best, Roden On Tue, Sep 10, 2024 at 9:48 PM Tom Goddard <goddard@sonic.net> wrote:
Hi Roden,
ChimeraX writes the atoms in the mmCIF file in a different order compared to the orignal PDB mmCIF file. So when you print out the scene_coords for the atoms and look at the values at the end of the arrays for the PDB file and ChimeraX mmcif file you are seeing coordinates for different atoms. The clue to this is that the coordinates for the first atoms in the two arrays are the same.
If you look at the ChimeraX mmCIF file and the PDB mmCIF file in a text editor you can see they have different atom orders. I don't know why the order is different. Greg Couch is the ChimeraX developer who works on reading and writing mmCIF files and would probably know why the order is different.
Tom
On Sep 10, 2024, at 10:15 AM, Roden Deng Luo via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Hi,
With version 1.7.1 (2024-01-23), if I open a structure (tested with 6MEO and 6ARA), select the whole molecule, change "Right Mouse" to "Rotate model", rotate the model by dragging with the right mouse, save the model into a .cif file (uncheck "Use untransformed coordinates"), and then type the following python script in the Shell in the session performed the rotation and in a new session/launch of ChimeraX and opening of the saved file, the results are different, see the attached screenshots.
======= from chimerax.atomic import Structure mol = session.models.list(type = Structure)[0] mol.atoms.scene_coords =======
For 6ARA, if I do not change the camera setting before rotation (drag the left mouse), only rotate in the original camera setting, this is not reproduced. But if I change the camera setting, this is reproduced. For 6MEO, I always reproduce the described behavior.
From https://www.cgl.ucsf.edu/chimerax/docs/devel/modules/atomic/atomic.html#chim... <https://urldefense.com/v3/__https://www.cgl.ucsf.edu/chimerax/docs/devel/mod...> ,
*property *scene_coords <https://urldefense.com/v3/__https://www.cgl.ucsf.edu/chimerax/docs/devel/mod...> Atoms’ coordinates in the global scene coordinate system. This accounts for the Drawing positions for the hierarchy of models each atom belongs to.
Either I misunderstood the whole scene and camera system, or this should not have happened. Why is this the case? How can I access from the session performed the rotation the coords as in a new session?
Many thanks, Roden
------------------------------ This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.<scene_coords in a new session.jpg><scene_coords in the session performed the rotation.jpg> _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/ <https://urldefense.com/v3/__https://mail.cgl.ucsf.edu/mailman/archives/list/...>
-- This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.
participants (2)
-
Roden Deng Luo
-
Tom Goddard