﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
20825	align command warns about complex values discarding imaginary part	Eric Pettersen	Tom Goddard	"Begin forwarded message:

From: Eric Pettersen <pett@cgl.ucsf.edu>
Subject: align_points ComplexWarning
Date: August 5, 2026 at 2:51:57 PM PDT
To: Tom Goddard <goddard@cgl.ucsf.edu>

Hi Tom,
	Whilst working on the Metal Geometry tool I noted that chimerax.geometry.align_points() sometimes elicits a ComplexWarning, e.g.:

/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/chimerax/geometry/align.py:68: ComplexWarning: Casting complex values to real discards the imaginary part
tf[:,:3] = R
/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/chimerax/geometry/align.py:69: ComplexWarning: Casting complex values to real discards the imaginary part
tf[:,3] = ref_center - dot(R,center)
/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.14/lib/python3.14/site-packages/chimerax/geometry/align.py:76: ComplexWarning: Casting complex values to real discards the imaginary part
rms = sqrt(rms2/len(Si)) if rms2 >= 0 else 0

So I inserted a print statement at the top of align_points() to print out its parameters, and I don't see anything suspicious, and it's only one of a zillion calls to align_points() that elicits the warning.  This is my personal build using numpy 2.4.6.  I've attached a file of the output (since it's voluminous).

--Eric"	defect	closed	moderate		Core		fixed						all	ChimeraX
