Opened 6 years ago

Closed 6 years ago

#2196 closed defect (fixed)

index out of bounds during color bypolymer

Reported by: chimerax-bug-report@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Depiction Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-4.4.0-154-generic-x86_64-with-debian-stretch-sid
ChimeraX Version: 0.91 (2019-07-02)
Description
(Describe the actions that caused this problem to occur here)

Log:
Startup Messages  
---  
warning | 'clip' is a prefix of an existing command 'clipper'  
  
UCSF ChimeraX version: 0.91 (2019-07-02)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open /home/kimtruc/S2C2_Workshop/chimerax_tutorial/6n2y.cif

Summary of feedback from opening
/home/kimtruc/S2C2_Workshop/chimerax_tutorial/6n2y.cif  
---  
notes | Fetching CCD ATP from http://ligand-
expo.rcsb.org/reports/A/ATP/ATP.cif  
Fetching CCD MG from http://ligand-expo.rcsb.org/reports/M/MG/MG.cif  
Fetching CCD PO4 from http://ligand-expo.rcsb.org/reports/P/PO4/PO4.cif  
Fetching CCD ADP from http://ligand-expo.rcsb.org/reports/A/ADP/ADP.cif  
  
6n2y.cif title:  
Bacillus PS3 ATP synthase class 1 [more info...]  
  
Chain information for 6n2y.cif #1  
---  
Chain | Description  
A B C | ATP synthase subunit α  
D E F | ATP synthase subunit β  
G | ATP synthase γ chain  
H | ATP synthase ε chain  
I | ATP synthase subunit δ  
a | ATP synthase subunit a  
b1 | ATP synthase subunit b  
b2 | ATP synthase subunit b  
c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 | ATP synthase subunit c  
  
Non-standard residues in 6n2y.cif #1  
---  
ADP — adenosine-5'-diphosphate  
ATP — adenosine-5'-triphosphate  
MG — magnesium ion  
PO4 — phosphate ion  
  

> select down

Nothing selected  

> select /A:2-501

3827 atoms, 3888 bonds, 1 model selected  

> select :ADP

27 atoms, 29 bonds, 1 model selected  

> select clear

> select /B:254@NZ

1 atom, 1 model selected  

> select up

9 atoms, 8 bonds, 1 model selected  

> select up

13 atoms, 12 bonds, 1 model selected  

> select up

3819 atoms, 3879 bonds, 1 model selected  

> select down

13 atoms, 12 bonds, 1 model selected  

> select down

9 atoms, 8 bonds, 1 model selected  

> select down

1 atom, 1 model selected  

> select up

9 atoms, 8 bonds, 1 model selected  

> select up

13 atoms, 12 bonds, 1 model selected  

> select up

3819 atoms, 3879 bonds, 1 model selected  

> select up

35043 atoms, 35579 bonds, 1 model selected  

> select down

3819 atoms, 3879 bonds, 1 model selected  

> select ~sel

31224 atoms, 31700 bonds, 10 pseudobonds, 3 models selected  

> select clear

> style selAtoms stick

Changed 35043 atom styles  

> style selAtoms sphere

Changed 35043 atom styles  

> select /B:219@CG

1 atom, 1 model selected  

> select up

8 atoms, 7 bonds, 1 model selected  

> select up

25 atoms, 24 bonds, 1 model selected  

> select up

3819 atoms, 3879 bonds, 1 model selected  

> style selAtoms stick

Changed 3819 atom styles  

> select clear

> hide selAtoms

> show selAtoms ribbons

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> hide

> show ribbons

> preset "initial styles" "original look"

Preset implemented in Python; no expansion to individual ChimeraX commands
available.  

> lighting simple

> lighting soft

> lighting full

> lighting soft

> lighting simple

> lighting soft

> lighting full

> set bgColor white

> save /home/kimtruc/Desktop/image1.png supersample 3

Empty filename passed to function  

> save image /home/kimtruc/Desktop/atp.png width 1500 height 1320

> show selAtoms surfaces

> color bfactor selAtoms

35043 atoms, 4722 residues, 22 surfaces, atom bfactor range 0 to 144  

> mlp selAtoms

Map values for surface "6n2y.cif_A SES surface": minimum -49.67, mean -9.103,
maximum 22.97  
Map values for surface "6n2y.cif_B SES surface": minimum -54.79, mean -9.429,
maximum 23.24  
Map values for surface "6n2y.cif_C SES surface": minimum -48.93, mean -9.469,
maximum 24.15  
Map values for surface "6n2y.cif_D SES surface": minimum -49.82, mean -8.614,
maximum 25.56  
Map values for surface "6n2y.cif_E SES surface": minimum -49, mean -8.976,
maximum 23.87  
Map values for surface "6n2y.cif_F SES surface": minimum -49.92, mean -8.684,
maximum 22.56  
Map values for surface "6n2y.cif_G SES surface": minimum -43.34, mean -8.507,
maximum 22.41  
Map values for surface "6n2y.cif_H SES surface": minimum -43.27, mean -8.606,
maximum 23.31  
Map values for surface "6n2y.cif_I SES surface": minimum -46.41, mean -8.739,
maximum 25.32  
Map values for surface "6n2y.cif_b2 SES surface": minimum -42.06, mean -10.19,
maximum 22.08  
Map values for surface "6n2y.cif_b1 SES surface": minimum -44.2, mean -11.65,
maximum 22.09  
Map values for surface "6n2y.cif_a SES surface": minimum -47.69, mean -5.122,
maximum 23.05  
Map values for surface "6n2y.cif_c0 SES surface": minimum -39.73, mean -4.977,
maximum 22.62  
Map values for surface "6n2y.cif_c1 SES surface": minimum -39.53, mean -4.684,
maximum 21.9  
Map values for surface "6n2y.cif_c2 SES surface": minimum -40.37, mean -4.997,
maximum 22.64  
Map values for surface "6n2y.cif_c3 SES surface": minimum -38.97, mean -4.955,
maximum 22.04  
Map values for surface "6n2y.cif_c4 SES surface": minimum -40.82, mean -5.091,
maximum 21.96  
Map values for surface "6n2y.cif_c5 SES surface": minimum -42.06, mean -5.229,
maximum 22.34  
Map values for surface "6n2y.cif_c6 SES surface": minimum -38.51, mean -5.224,
maximum 22.54  
Map values for surface "6n2y.cif_c7 SES surface": minimum -41.11, mean -4.995,
maximum 21.92  
Map values for surface "6n2y.cif_c8 SES surface": minimum -40.72, mean -5.007,
maximum 22.67  
Map values for surface "6n2y.cif_c9 SES surface": minimum -39.75, mean -4.963,
maximum 22.49  

> hide selAtoms

> hide selAtoms surfaces

> show selAtoms

> color selAtoms bychain

> color bypolymer

Traceback (most recent call last):  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/cmd_line/tool.py", line 254, in execute  
cmd.run(cmd_text)  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/core/commands/cli.py", line 2646, in run  
result = ci.function(session, **kw_args)  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/std_commands/color.py", line 109, in color  
_set_atom_colors(atoms, color, opacity, bgcolor, undo_state)  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/std_commands/color.py", line 215, in _set_atom_colors  
c = _computed_atom_colors(atoms, color, opacity, bgcolor)  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/std_commands/color.py", line 179, in _computed_atom_colors  
sc,amask = polymer_colors(atoms.residues)  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/atomic/colors.py", line 265, in polymer_colors  
c = sc[seq_ids,:]  
IndexError: index 10 is out of bounds for axis 0 with size 10  
  
IndexError: index 10 is out of bounds for axis 0 with size 10  
  
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/atomic/colors.py", line 265, in polymer_colors  
c = sc[seq_ids,:]  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3 (Core Profile) Mesa 18.0.5
OpenGL renderer: Mesa DRI Intel(R) Haswell Mobile 
OpenGL vendor: Intel Open Source Technology Center

Change History (5)

comment:1 by pett, 6 years ago

Component: UnassignedDepiction
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionindex out of bounds during color bypolymer

comment:2 by Tom Goddard, 6 years ago

This error does not happen on Mac. This was on Linux. The trouble is that

seqs, seq_ids = residues.unique_sequences

is returning values of the seq_ids array that go one past the number of sequences. Looks impossible, but maybe due to the molc.cpp C++ code in residue_unique_sequences

si = cmap[c] = smap[seq] = smap.size()+1;


where the smap[seq] may add a map entry before smap.size() is evaluated. This behavior may be compiler dependent.

Test this on Linux. If error occurs, break above C++ into two lines so smap.size() is evaluated first.

comment:3 by Tom Goddard, 6 years ago

Made the C++ code fix. Can check if ChimeraX 0.9 on linux has bug and if this fixes it.

comment:4 by Tom Goddard, 6 years ago

The ubuntu linux distribution does not exhibit this error (July 2, 2019 daily build), but the generic linux distribution (version 0.9) does.

Apparently I forgot to push the fix. Pushed now. Need to test it tomorrow.

comment:5 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Incorrect C++ code, side-effect in assignment.

Note: See TracTickets for help on using tickets.