Opened 6 years ago
Closed 4 years ago
#2934 closed defect (fixed)
Adding coord sets
Reported by: | Owned by: | pett | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MD/Ensemble Analysis | Version: | |
Keywords: | Cc: | Tom Goddard | |
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 more stuff on #2926 I've played around with it some more, and it looks like the problem happens when one or more atoms on the molecule have been deleted. My tool might delete some atoms, but it does replace them before trying to 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: numpy in d:\chimerax\bin\lib\site-packages (from ChimAARON==0.1) (1.17.4+mkl) 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: ChimeraX-Core>=0.1 in d:\chimerax\bin\lib\site-packages (from ChimAARON==0.1) (0.92) 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 2730295765320 acquired on C:\Users\Tony Schaefer\AppData\Local\UCSF\ChimeraX\Cache\0.92\toolshed\bundle_info.cache.lock Lock 2730295765320 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 | no chix atom O 0.00000000 -0.00000000 0.67304000 0 1 no chix atom C -0.00000000 -0.00000000 -0.52664300 0 2 no chix atom H 0.00000000 0.94502100 -1.13098300 0 3 no chix atom H 0.00000000 -0.94502100 -1.13098300 0 4 Opened C:\Users\Tony Schaefer\Desktop\freq.out as a out file > toolshed show "Structure Modification" > select /a:1@H2 1 atom, 1 model selected no chix atom C -0.00000000 -1.30280961 -1.36080988 0 -1 no chix atom H 0.21803884 -1.07908437 -2.42655254 0 -1.2 no chix atom H -0.99312523 -1.79493271 -1.29082032 0 -1.3 no chix atom H 0.77509507 -1.99630487 -0.97133357 0 -1.4 > toolshed show "Managed Models" chix_atom deleted H 0.00000000 -0.94502100 -1.13098300 0 4 > toolshed show "Visualize Normal Modes" D:\ChimeraX\bin\lib\site-packages\chimerax\core\graphics\view.py:866: RuntimeWarning: invalid value encountered in double_scalars return (d-r, d+r) D:\ChimeraX\bin\lib\site-packages\chimerax\core\geometry\vector.py:57: RuntimeWarning: invalid value encountered in double_scalars return u[0]*v[0] + u[1]*v[1] + u[2]*v[2] D:\ChimeraX\bin\lib\site-packages\chimerax\core\geometry\matrix.py:166: RuntimeWarning: invalid value encountered in double_scalars \+ m1[r][2] * m2[2][c]) D:\ChimeraX\bin\lib\site-packages\chimerax\core\graphics\view.py:744: RuntimeWarning: invalid value encountered in less_equal if vw is None or vw >= b.width(): > close > open 6t20 format mmCIF fromDatabase pdb 6t20 title: Cryo-EM structure of phalloidin-stabilized F-actin (aged) [more info...] Chain information for 6t20 #1 --- Chain | Description A B C D E | Actin, α skeletal muscle F G H I J | phalloidin Non-standard residues in 6t20 #1 --- ADP — adenosine-5'-diphosphate EEP — (2S,4R)-2-amino-4,5-dihydroxy-4-methylpentanoic acid MG — magnesium ion > select /F:3@CB 1 atom, 1 model selected > toolshed show "Structure Modification" no chix atom C 144.89718478 155.50216630 203.40393904 0 14529 no chix atom C 144.28987881 156.55183295 204.10115029 0 14529.2 no chix atom C 145.51374191 154.46082570 204.10550242 0 14529.3 no chix atom C 144.91568709 155.51881838 206.20148830 0 14529.4 no chix atom C 145.52299306 154.46915174 205.50427705 0 14529.5 no chix atom C 144.29912996 156.56015899 205.49992491 0 14529.6 no chix atom H 143.81063218 157.36126151 203.55582936 0 14529.7 no chix atom H 143.82707420 157.37605933 206.04186295 0 14529.8 no chix atom H 144.92287796 155.52529016 207.28874726 0 14529.9 no chix atom H 146.00223970 153.65972317 206.04959798 0 14529.10 no chix atom H 145.98579768 153.64492535 203.56356439 0 14529.11 > close #1 > open "C:\Users\Tony Schaefer\Desktop\freq.out" Summary of feedback from opening C:\Users\Tony Schaefer\Desktop\freq.out --- notes | no chix atom O 0.00000000 -0.00000000 0.67304000 0 1 no chix atom C -0.00000000 -0.00000000 -0.52664300 0 2 no chix atom H 0.00000000 0.94502100 -1.13098300 0 3 no chix atom H 0.00000000 -0.94502100 -1.13098300 0 4 Opened C:\Users\Tony Schaefer\Desktop\freq.out as a out file > select /a:1@H2 1 atom, 1 model selected no chix atom C -0.00000000 -1.30280961 -1.36080988 0 -1 no chix atom C 1.21051022 -1.86944665 -1.77349815 0 -1.2 no chix atom C -1.21051022 -1.91955514 -1.69399765 0 -1.3 no chix atom C -0.00000000 -3.66957475 -2.85256195 0 -1.4 no chix atom C -1.21051022 -3.10293771 -2.43987368 0 -1.5 no chix atom C 1.21051022 -3.05282922 -2.51937418 0 -1.6 no chix atom H 2.15143345 -1.39005411 -1.51451335 0 -1.7 no chix atom H 2.15143345 -3.49327272 -2.84015425 0 -1.8 no chix atom H -0.00000000 -4.58941078 -3.43232682 0 -1.9 no chix atom H -2.15143345 -3.58233025 -2.69885849 0 -1.10 no chix atom H -2.15143345 -1.47911164 -1.37321758 0 -1.11 > toolshed show "Managed Models" > preset chimaaron "index labels" Preset implemented in Python; no expansion to individual ChimeraX commands available. > preset chimaaron ball-stick-endcap Preset implemented in Python; no expansion to individual ChimeraX commands available. chix_atom deleted H 0.00000000 -0.94502100 -1.13098300 0 4 > preset chimaaron "index labels" Preset implemented in Python; no expansion to individual ChimeraX commands available. > toolshed show "Visualize Normal Modes" D:\ChimeraX\bin\lib\site-packages\chimerax\core\geometry\bounds.py:53: RuntimeWarning: overflow encountered in multiply r = 0.5*sqrt((size*size).sum()) > close #1 > open "C:\Users\Tony Schaefer\Desktop\freq.out" Summary of feedback from opening C:\Users\Tony Schaefer\Desktop\freq.out --- notes | no chix atom O 0.00000000 -0.00000000 0.67304000 0 1 no chix atom C -0.00000000 -0.00000000 -0.52664300 0 2 no chix atom H 0.00000000 0.94502100 -1.13098300 0 3 no chix atom H 0.00000000 -0.94502100 -1.13098300 0 4 Opened C:\Users\Tony Schaefer\Desktop\freq.out as a out file OpenGL version: 3.3.0 NVIDIA 441.87 OpenGL renderer: GeForce RTX 2070/PCIe/SSE2 OpenGL vendor: NVIDIA Corporation
Change History (9)
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:2 by , 6 years ago
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
comment:3 by , 6 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Coordinate sets behave in a somewhat unexpected way when you add and delete atoms. You might think if you have 10 atoms and you delete the first atom and add a new atom then the coordset array would have 10 coordinates for the original atoms 2-10 and the new atom. Instead it has 11 coordinates, the first is meaningless since there is no atom for it, array elements 2-10 are the original atoms 2-10 and element 11 is for the new atom.
Atoms have an attribute coord_index that indicates their position in the coordinate set array. Those coordinate index values I think never change. If an atom is deleted the array does not shrink. I am not sure why the code does not use the conceptually simpler system where the coordset is an array that always matches the structure atoms. If an atom is deleted the code would compact all the coordset arrays. Maybe it is due to performance reasons, but I would think deleting atoms does not need to e fast. Eric Pettersen designed this.
Let me know if your problems are due to the Atom.coord_index business.
It is somewhat painful to make coordinate sets with the current design, and cumbersome to use them efficiently. But you can do numpy array slicing operations with atoms.coord_indices to do these things, e.g. coordset_array[atoms.coord_indices] would give the array of coordinates matching the order of atoms.
comment:4 by , 6 years ago
Coordinate sets were not significantly redesigned between Chimera and ChimeraX and are were intended to support MD trajectories. With MD trajectories you may sometimes delete atoms (e.g. solvent) but basically never add atoms. Hence, adding atoms in the context of a trajectory is not well supported.
--Eric
comment:5 by , 6 years ago
Just explaining why it's the way it is -- not saying the way it is is great!
comment:6 by , 6 years ago
Comment from Tony via ticket #2951:
My issues do seem to be related to the issue with the position of atoms in the coordset array. Understanding where this comes from is helpful. My tools that touch coordinate sets are aimed at systems much smaller than classical MD trajectories, so I don't really notice any performance hit from my "for atom, coord in zip(model.atoms, coordset)" workaround.
I did take a look at the code for the add_coordsets function, and it looks like it checks to see if one of the coordset's dimensions matches the model's num_atoms. Given that the number of atoms might not be the same as the coordset size, could that be changed to check against the corresponding current coordset dimension?
comment:7 by , 5 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
Status: | reopened → assigned |
Reassigning to Eric since the discussion is now about coordset capabilities for handling added or deleted atoms.
comment:8 by , 5 years ago
Status: | assigned → accepted |
---|
comment:9 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
add_coordsets() now check against previous coordinate set sizes (if any) and only falls back to number of atoms if there are no pre-existing coordinate sets.
I think that's the only outstanding issue in this ticket, so closing it.
Follow up to #2926