Author: bugman Date: Thu May 12 11:46:15 2016 New Revision: 28208 URL: http://svn.gna.org/viewcvs/relax?rev=28208&view=rev Log: Mac OS X fixes for the Structure.test_pca and Structure.test_pca_observers system tests.
The eigenvectors on this OS are sometimes inverted. As the sign of the eigenvector is irrelevant, the vectors hardcoded into the system tests are now inverted as required. Modified: trunk/test_suite/system_tests/structure.py Modified: trunk/test_suite/system_tests/structure.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/structure.py?rev=28208&r1=28207&r2=28208&view=diff ============================================================================== --- trunk/test_suite/system_tests/structure.py (original) +++ trunk/test_suite/system_tests/structure.py Thu May 12 11:46:15 2016 @@ -21,7 +21,7 @@ # Python module imports. from math import sqrt -from numpy import array, average, dot, float64, std, zeros +from numpy import array, average, dot, float64, sign, std, zeros from numpy.linalg import norm from os import sep from re import search @@ -4150,6 +4150,11 @@ proj[:, 2] = -proj[:, 2] proj[:, 3] = -proj[:, 3] + # Are more inversion necessary? + for mode in range(4): + if sign(cdp.structure.pca_proj[mode][0]) != sign(proj[0][mode]): + proj[:, mode] = -proj[:, mode] + # Checks. self.assert_(hasattr(cdp.structure, 'pca_values')) self.assert_(hasattr(cdp.structure, 'pca_vectors')) @@ -4180,6 +4185,11 @@ # Invert the 3rd and 4th Gromacs eigenvectors to match. proj[:, 2] = -proj[:, 2] proj[:, 3] = -proj[:, 3] + + # Are more inversion necessary? + for mode in range(4): + if sign(cdp.structure.pca_proj[mode][0]) != sign(proj[0][mode]): + proj[:, mode] = -proj[:, mode] # Checks. self.assert_(hasattr(cdp.structure, 'pca_values')) _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits