Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pegerto-ck committed Feb 18, 2023
1 parent 4761f5a commit ec9f398
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions package/MDAnalysis/analysis/accesibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@


def atomic_radi(e):
"""van der Waals radii"""
DEFAULT_ATOMIC_RADI = 2.
return ATOMIC_RADI[e] if e in ATOMIC_RADI else DEFAULT_ATOMIC_RADI
"""van der Waals radii"""
DEFAULT_ATOMIC_RADI = 2.0
return ATOMIC_RADI[e] if e in ATOMIC_RADI else DEFAULT_ATOMIC_RADI


class SASA(AnalysisBase):
r""" Calculation of solvent accesible surface areas using Shrake-Rupley "rolling ball'
algorithm
r"""Calculation of solvent accesible surface areas using Shrake-Rupley
'rolling ball' algorithm
"""

def __init__(self, ag, n_points=100, probe_radius=1.40, **kwargs):
"""Parameters
----------
Expand All @@ -58,7 +59,6 @@ def __init__(self, ag, n_points=100, probe_radius=1.40, **kwargs):
self._twice_max_radi = (max(list(ATOMIC_RADI.values())) + probe_radius) * 2
self._probe_radius = probe_radius


def _compute_sphere(self):
"""Fibonacci lattice to evently distribute points in the sphere."""
golden_ratio = (1 + 5**0.5) / 2
Expand All @@ -72,7 +72,6 @@ def _compute_sphere(self):
)
return np.transpose(np.array([x_points, y_points, z_points]))


def _compute(self):
asas = np.zeros(len(self._ag.atoms), dtype=np.double)

Expand All @@ -99,7 +98,6 @@ def _compute(self):
asas[atom.index] = points * area_per_point
return asas


def atoms(self):
""" returns accessible surface area in A**2"""
"""returns accessible surface area in A**2"""
return self._compute()

0 comments on commit ec9f398

Please sign in to comment.