﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
2762	Clip cap error with zero-length bond	Tristan Croll	Tom Goddard	"{{{
The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.9.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 0.92 (2020-01-11)
Description
Obscure and only occurs under unusual circumstances, but reporting for the record:

If `geometry.cylinder_rotations()` is used to set the geometry of a bond where start and end points are the same, then setting `clip_cap=True` on the `Drawing` leads to a neverending stream of the following error:

Traceback (most recent call last):
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/core/updateloop.py"", line 133, in _redraw_timer_callback
    drew = self.draw_new_frame()
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/core/updateloop.py"", line 62, in draw_new_frame
    surface.update_clip_caps(view)
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/surface/cap.py"", line 27, in update_clip_caps
    subdivision = settings.clipping_cap_subdivision)
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/surface/cap.py"", line 35, in show_surface_clip_caps
    varray, narray, tarray = compute_cap(d, p, offset)
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/surface/cap.py"", line 92, in compute_cap
    dp = d.scene_position.inverse()
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/core/geometry/place.py"", line 187, in inverse
    self._inverse = Place(m34.invert_matrix(self._matrix))
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/chimerax/core/geometry/matrix.py"", line 130, in invert_matrix
    rinv[:, :] = matrix_inverse(r)
  File ""<__array_function__ internals>"", line 6, in inv
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/numpy/linalg/linalg.py"", line 551, in inv
    ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
  File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/numpy/linalg/linalg.py"", line 97, in _raise_linalgerror_singular
    raise LinAlgError(""Singular matrix"")
numpy.linalg.LinAlgError: Singular matrix

numpy.linalg.LinAlgError: Singular matrix

File ""/opt/UCSF/ChimeraX-daily/lib/python3.7/site-packages/numpy/linalg/linalg.py"", line 97, in _raise_linalgerror_singular
raise LinAlgError(""Singular matrix"")

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




OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

}}}
"	defect	closed	normal		Surface		wontfix		Eric Pettersen				all	ChimeraX
