[cctbxbb] alternative to scipy.linalg.eig

Gildea, Richard (DLSLtd,RAL,LSCI) richard.gildea at diamond.ac.uk
Thu Dec 10 07:06:42 PST 2020


scitbx.linalg.eigensystem?

>>> from scitbx.array_family import flex
>>> from scitbx.linalg import eigensystem
>>> m = flex.double((-2, -4, 2, -2, 1, 2, 4, 2, 5))
>>> m.reshape(flex.grid(3,3))
>>> es = eigensystem.real_symmetric(m)
>>> list(es.values())
[6.999999999999998, 2.0, -5.0]
>>> list(es.vectors())
[0.36514837167011327, 0.18257418583505025, 0.9128709291752769, -0.4472135954999558, 0.8944271909999169, 5.177854513745429e-15, 0.816496580927726, 0.4082482904638631, -0.40824829046386296]

Dr Richard Gildea
Data Analysis Scientist
Tel: +441235 77 8078

Diamond Light Source Ltd.
Diamond House
Harwell Science & Innovation Campus
Didcot
Oxfordshire
OX11 0DE
________________________________
From: cctbxbb-bounces at phenix-online.org <cctbxbb-bounces at phenix-online.org> on behalf of Robert Oeffner <rdo20 at cam.ac.uk>
Sent: 10 December 2020 14:57
To: cctbx mailing list <cctbxbb at phenix-online.org>
Subject: [cctbxbb] alternative to scipy.linalg.eig

scipy.linalg.eig is useful for diagonalising a 3x3 matrix to find
eigenvalues and eigenvectors. Does anybody know if there is code in
CCTBX which can also do this?


Rob


--
This email has been checked for viruses by AVG.
https://www.avg.com

_______________________________________________
cctbxbb mailing list
cctbxbb at phenix-online.org
http://phenix-online.org/mailman/listinfo/cctbxbb

-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20201210/c0f0de81/attachment.htm>


More information about the cctbxbb mailing list