@@ -129,7 +129,6 @@ def test_get_residue_axes_one_residue_uses_principal_axes(monkeypatch):
129129
130130 u = MagicMock ()
131131 u .dimensions = np .array ([10.0 , 10.0 , 10.0 , 90 , 90 , 90 ])
132- u .atoms .principal_axes .return_value = np .eye (3 )
133132
134133 # atom_set non-empty => bonded branch
135134 def _select_atoms (q ):
@@ -159,7 +158,6 @@ def test_get_UA_axes_uses_principal_axes_when_single_heavy(monkeypatch):
159158 ax = AxesCalculator ()
160159 u = MagicMock ()
161160 u .dimensions = np .array ([10.0 , 10.0 , 10.0 , 90 , 90 , 90 ])
162- u .atoms .principal_axes .return_value = np .eye (3 )
163161 u .center_of_mass .return_value = np .array ([[4.0 , 0.0 , 0.0 ]])
164162
165163 # heavy_atoms length <= 1 => principal_axes path
@@ -666,13 +664,11 @@ def test_get_residue_axes_one_residue_principal_axes_path(monkeypatch):
666664
667665 residue = MagicMock ()
668666 residue .__len__ .return_value = 1
669- residue .atoms .principal_axes .return_value = np .eye (3 ) * 2
670667 residue .atoms .center_of_mass .return_value = np .array ([1.0 , 2.0 , 3.0 ])
671668 residue .center_of_mass .return_value = np .array ([1.0 , 2.0 , 3.0 ])
672669
673670 u = MagicMock ()
674671 u .dimensions = np .array ([10.0 , 10.0 , 10.0 , 90 , 90 , 90 ])
675- u .atoms .principal_axes .return_value = np .eye (3 ) * 2
676672
677673 def _select_atoms (q ):
678674 if q .startswith ("(resindex" ):
@@ -1788,7 +1784,7 @@ def _select_atoms(q):
17881784def test_get_UA_axes_raises_when_only_rot_axes_fail (monkeypatch ):
17891785 ax = AxesCalculator ()
17901786 u = MagicMock ()
1791- u .atoms .principal_axes . return_value = np .eye ( 3 )
1787+ u .atoms .atoms . moment_of_inertia . return_value = np .diag ([ 3.0 , 2.0 , 1.0 ] )
17921788 u .dimensions = np .array ([10.0 , 10.0 , 10.0 , 90 , 90 , 90 ])
17931789 heavy_atoms = [
17941790 _atom (index = 0 , mass = 12.0 , pos = (1 , 0 , 0 )),
0 commit comments