Skip to content

Commit

Permalink
Update coordination_number_calculation.py
Browse files Browse the repository at this point in the history
replace cumtrapz for cumulative_trapezoid
  • Loading branch information
alvarovm authored Nov 8, 2024
1 parent ba68b6c commit b521d67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mdsuite/calculators/coordination_number_calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from bokeh.models import HoverTool, LinearAxis, Span
from bokeh.models.ranges import Range1d
from bokeh.plotting import figure
from scipy.integrate import cumtrapz
from scipy.integrate import cumulative_trapezoid
from scipy.signal import find_peaks

from mdsuite import utils
Expand Down Expand Up @@ -74,7 +74,7 @@ def _integrate_rdf(radii_data: np.array, rdf_data: np.array, density: float) ->
integral_data : np.array
Cumulative integral of the RDF scaled by the radius and denisty.
"""
integral_data = cumtrapz(y=radii_data[1:] ** 2 * rdf_data[1:], x=radii_data[1:])
integral_data = cumulative_trapezoid(y=radii_data[1:] ** 2 * rdf_data[1:], x=radii_data[1:])

return 4 * np.pi * density * integral_data

Expand Down

0 comments on commit b521d67

Please sign in to comment.