Skip to content

Commit

Permalink
Update helix_analysis.py
Browse files Browse the repository at this point in the history
using tuples instead of list for ref_axis
  • Loading branch information
tanishy7777 authored Dec 1, 2024
1 parent 48bfd5d commit dc712ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/helix_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def helix_analysis(positions, ref_axis=None):
# origin: origins
# local_axes: perpendicular to plane of screen. Orthogonal to "bisectors"
if ref_axis is None:
ref_axis = [0, 0, 1]
ref_axis = (0, 0, 1)

Check warning on line 248 in package/MDAnalysis/analysis/helix_analysis.py

View check run for this annotation

Codecov / codecov/patch

package/MDAnalysis/analysis/helix_analysis.py#L248

Added line #L248 was not covered by tests
vectors = positions[1:] - positions[:-1] # (n_res-1, 3)
bisectors = vectors[:-1] - vectors[1:] # (n_res-2, 3)
bimags = mdamath.pnorm(bisectors) # (n_res-2,)
Expand Down Expand Up @@ -394,7 +394,7 @@ def __init__(self, universe, select='name CA', ref_axis=None,
super(HELANAL, self).__init__(universe.universe.trajectory,
verbose=verbose)
if ref_axis is None:
ref_axis = [0, 0, 1]
ref_axis = (0, 0, 1)
selections = util.asiterable(select)
atomgroups = [universe.select_atoms(s) for s in selections]
consecutive = []
Expand Down

0 comments on commit dc712ac

Please sign in to comment.