@@ -185,12 +185,9 @@ def get_bonded_axes(self, system, atom, dimensions):
185185 # find the heavy bonded atoms and light bonded atoms
186186 heavy_bonded , light_bonded = self .find_bonded_atoms (atom .index , system )
187187 UA = atom + light_bonded
188- # UA_all = atom + heavy_bonded + light_bonded
189188
190189 # now find which atoms to select to find the axes for rotating forces:
191190 # case1, won't apply to UA level
192- # if len(heavy_bonded) == 0:
193- # custom_axes, custom_moment_of_inertia = self.get_vanilla_axes(UA_all)
194191 # case2
195192 if len (heavy_bonded ) == 1 and len (light_bonded ) == 0 :
196193 custom_axes = self .get_custom_axes (
@@ -205,13 +202,6 @@ def get_bonded_axes(self, system, atom, dimensions):
205202 dimensions ,
206203 )
207204 # case4, not used in Jon's code, use case5 instead
208- # if len(heavy_bonded) == 2:
209- # custom_axes = self.get_custom_axes(
210- # atom.position,
211- # [heavy_bonded[0].position],
212- # heavy_bonded[1].position,
213- # dimensions,
214- # )
215205 # case5
216206 if len (heavy_bonded ) >= 2 :
217207 custom_axes = self .get_custom_axes (
@@ -236,32 +226,6 @@ def get_bonded_axes(self, system, atom, dimensions):
236226
237227 return custom_axes , custom_moment_of_inertia
238228
239- def get_vanilla_axes (self , molecule ):
240- """
241- From a selection of atoms, get the ordered principal axes (3,3) and
242- the ordered moment of inertia axes (3,) for that selection of atoms
243-
244- Args:
245- molecule: mdanalysis instance of molecule
246- molecule_scale: the length scale of molecule
247-
248- Returns:
249- principal_axes: the principal axes, (3,3) array
250- moment_of_inertia: the moment of inertia, (3,) array
251- """
252- # default moment of inertia
253- moment_of_inertia = molecule .moment_of_inertia ()
254- principal_axes = molecule .principal_axes ()
255- # diagonalise moment of inertia tensor here
256- # pylint: disable=unused-variable
257- eigenvalues , _eigenvectors = np .linalg .eig (moment_of_inertia )
258- # sort eigenvalues of moi tensor by largest to smallest magnitude
259- order = abs (eigenvalues ).argsort ()[::- 1 ] # decending order
260- # principal_axes = principal_axes[order] # PI already ordered correctly
261- moment_of_inertia = eigenvalues [order ]
262-
263- return principal_axes , moment_of_inertia
264-
265229 def find_bonded_atoms (self , atom_idx : int , system ):
266230 """
267231 for a given atom, find its bonded heavy and H atoms
0 commit comments