Opened 6 years ago
Closed 6 years ago
#2926 closed defect (not a bug)
Adding coord sets
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MD/Ensemble Analysis | Version: | |
Keywords: | Cc: | pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
The following bug report has been submitted: Platform: Windows-10-10.0.17763 ChimeraX Version: 0.92 (2020-03-03) Description I'm not sure if this is a bug or if I need to add something to my code. I've had issues adding coordsets to molecules. When I open 'freq.out', I'm adding coordsets to it using `mdl.add_coordsets`. I'm doing the same thing in my tool to reset the coordinate sets (again using `mdl.add_coordsets`). Each time I set the coordsets, I print the coordset array to the reply log. It looks the same both times. The issue is that the second time I add the coordsets, it doesn't seem to work. I can open the shell and grab the coordsets (using `mdl.coordsets(1).xyzs`). However, the atom coordinates do not match the coordset (`mdl.atoms[i].coord`). The molecule also appears very different. The only thing I've gotten to work to overwrite coordsets with my tool is ``` mdl.remove_coordsets() for i, coordset in enumerate(coordsets): mdl.add_coordset(i+1, coordsets) mdl.active_coordset_id = i + 1 for atom, coord in zip(mdl.atoms, coordset): atom.coord = coord ``` where mdl is the model and coordsets in the coordset array (equal to the one I used when opening the molecule). Like I said, I've tried using `mdl.add_coordsets` here. I've also tried just looping over the coordset array and doing `mdl.add_coordset`. I've tried both of these with and without mdl.remove_coordsets(). Without the `for atom, coord` loop, the coordinate sets don't do what I expect. The atom coordinates seem to all get set to zero, but never updated to what's in coordsets. I'm not sure why I wouldn't be able to just use mdl.add_coordsets(x, replace=True). I've attached a session with two models: a freshly-opened 'freq.out', and a 'freq.out' where I've tried to overwrite the coordsets with mdl.add_coordsets. Log: > cd "C:\Users\Tony Schaefer/Desktop" Current working directory is: C:\Users\Tony Schaefer\Desktop UCSF ChimeraX version: 0.92 (2020-03-03) © 2016-2020 Regents of the University of California. All rights reserved. How to cite UCSF ChimeraX Successfully installed 'ChimAARON-0.1-py3-none-any.whl' Looking in indexes: https://pypi.org/simple, https://cxtoolshed.rbvi.ucsf.edu/pypi/ Processing c:\users\tony schaefer\appdata\local\ucsf\chimerax\cache\0.92\installers\chimaaron-0.1-py3-none- any.whl Requirement already satisfied, skipping upgrade: ChimeraX-Core>=0.1 in d:\chimerax\bin\lib\site-packages (from ChimAARON==0.1) (0.92) Requirement already satisfied, skipping upgrade: scipy in d:\chimerax\bin\lib\site-packages (from ChimAARON==0.1) (1.4.1) Requirement already satisfied, skipping upgrade: numpy in d:\chimerax\bin\lib\site-packages (from ChimAARON==0.1) (1.17.4+mkl) Installing collected packages: ChimAARON Attempting uninstall: ChimAARON Found existing installation: ChimAARON 0.1 Uninstalling ChimAARON-0.1: Successfully uninstalled ChimAARON-0.1 Successfully installed ChimAARON-0.1 Lock 2950636499272 acquired on C:\Users\Tony Schaefer\AppData\Local\UCSF\ChimeraX\Cache\0.92\toolshed\bundle_info.cache.lock Lock 2950636499272 released on C:\Users\Tony Schaefer\AppData\Local\UCSF\ChimeraX\Cache\0.92\toolshed\bundle_info.cache.lock > open "C:\Users\Tony Schaefer\Desktop\freq.out" Summary of feedback from opening C:\Users\Tony Schaefer\Desktop\freq.out --- notes | there are 5 coordsets 0 float64 [[ 0. 0. 0.68769] [ 0. 0. -0.53966] [ 0. 0.93947 -1.1318 ] [ 0. -0.93947 -1.1318 ]] 1 float64 [[ 0. -0. 0.672927] [-0. 0. -0.532651] [ 0. 0.945975 -1.127923] [ 0. -0.945975 -1.127923]] 2 float64 [[ 0. 0. 0.670659] [-0. 0. -0.528855] [ 0. 0.947362 -1.128687] [ 0. -0.947362 -1.128687]] 3 float64 [[ 0. -0. 0.671777] [-0. -0. -0.527821] [ 0. 0.946536 -1.129763] [ 0. -0.946536 -1.129763]] 4 float64 [[-0. 0. 0.673041] [ 0. 0. -0.526642] [-0. 0.945072 -1.130984] [-0. -0.945072 -1.130984]] Opened C:\Users\Tony Schaefer\Desktop\freq.out as a out file > toolshed show "Managed Models" there are 5 coordsets 0 float64 [[ 0. 0. 0.68769] [ 0. 0. -0.53966] [ 0. 0.93947 -1.1318 ] [ 0. -0.93947 -1.1318 ]] 1 float64 [[ 0. -0. 0.672927] [-0. 0. -0.532651] [ 0. 0.945975 -1.127923] [ 0. -0.945975 -1.127923]] 2 float64 [[ 0. 0. 0.670659] [-0. 0. -0.528855] [ 0. 0.947362 -1.128687] [ 0. -0.947362 -1.128687]] 3 float64 [[ 0. -0. 0.671777] [-0. -0. -0.527821] [ 0. 0.946536 -1.129763] [ 0. -0.946536 -1.129763]] 4 float64 [[-0. 0. 0.673041] [ 0. 0. -0.526642] [-0. 0.945072 -1.130984] [-0. -0.945072 -1.130984]] > toolshed show Shell OpenGL version: 3.3.0 NVIDIA 441.87 OpenGL renderer: GeForce RTX 2070/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation File attachment: coordsets.cxs
Attachments (5)
Change History (10)
by , 6 years ago
Attachment: | coordsets.cxs added |
---|
comment:1 by , 6 years ago
Cc: | added |
---|---|
Component: | Unassigned → MD/Ensemble Analysis |
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → assigned |
Summary: | ChimeraX bug report submission → Adding coord sets |
comment:3 by , 6 years ago
I attach a simple test program that adds a coordinate set to a molecule to see if the atoms get the expected coordinate set coordinates (original coordinates with 1.0 added). When I run it with today's ChimeraX it works as expected. If you can, please provide a simple standalone test example like this which demonstrates your case where it does not work and gives all coordinates = 0 as you describe in the ticket. coords [[15.491 7.05 17.165] [14.946 7.55 15.888] [16.011 7.604 14.814] [17.199 7.619 15.115] [15.573 7.664 13.56 ]] added coords [[16.491 8.05 18.165] [15.946 8.55 16.888] [17.011 8.604 15.814] [18.199 8.619 16.115] [16.573 8.664 14.56 ]] executed test_add_coordset.py
follow-up: 3 comment:4 by , 6 years ago
Sorry that this got split into multiple reports. Apparently all ChimeraX emails (except when the bug report status changes) ended up in my junk folder. As I mentioned in #2934, the issue only happened when I added and deleted atoms from a pre-existing model. What my tool did is comparable to the first ~60 lines of the attached script. When I submitted this report, all coordinates were zero because all atoms got replaced (a new atom was added and the old atom is deleted). In the attached script, only one atom is getting replaced. I was confused because the new atoms' `coord` attributes did not match what I thought were the corresponding values in the coordset (note the `print` statements on lines 59 and 60). With a better understanding of how coordsets work (from the explanations in #2934), I realize that what I was doing was not compatible with how coordsets work. I've made the necessary changes to my tools. From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu <mailto:ChimeraX-bugs-admin@cgl.ucsf.edu>> Sent: Thursday, March 5, 2020 11:53 PM Cc: Anthony James Schaefer <tony.schaefer@uga.edu <mailto:tony.schaefer@uga.edu>> Subject: Re: [ChimeraX] #2926: ChimeraX bug report submission [EXTERNAL SENDER - PROCEED CAUTIOUSLY] #2926: ChimeraX bug report submission --------------------------------------+-------------------- Reporter: tony.schaefer@… | Owner: (none) Type: defect | Status: new Priority: normal | Milestone: Component: Unassigned | Version: Resolution: | Keywords: Blocked By: | Blocking: Notify when closed: | --------------------------------------+-------------------- Changes (by tony.schaefer@…): * Attachment "coordsets.cxs" added. Added by email2trac -- Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2926 <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2926>> ChimeraX <http://www.rbvi.ucsf.edu/chimerax/ <http://www.rbvi.ucsf.edu/chimerax/>> ChimeraX Issue Tracker
comment:5 by , 6 years ago
Resolution: | → not a bug |
---|---|
Status: | assigned → closed |
Ok, so it was just a misunderstanding how ChimeraX handles coordinate sets. If there is a way we could make the behavior more obvious or a place we could document its behavior that would have helped you, let us know.
Note:
See TracTickets
for help on using tickets.
Added by email2trac