Closed noeblassel closed 2 years ago
Merging #54 (087b78f) into master (24ee999) will increase coverage by
0.48%
. The diff coverage is74.07%
.
@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 84.18% 84.66% +0.48%
==========================================
Files 28 28
Lines 2453 2472 +19
==========================================
+ Hits 2065 2093 +28
+ Misses 388 379 -9
Impacted Files | Coverage Δ | |
---|---|---|
src/interactions/coulomb.jl | 77.77% <0.00%> (ø) |
|
src/interactions/mie.jl | 67.27% <0.00%> (ø) |
|
src/interactions/soft_sphere.jl | 62.50% <0.00%> (ø) |
|
src/cutoffs.jl | 93.75% <94.73%> (+0.64%) |
:arrow_up: |
src/interactions/lennard_jones.jl | 100.00% <100.00%> (+16.94%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 24ee999...087b78f. Read the comment docs.
Thanks for the pointers, I made the changes
:+1:
Cubic Spline implementation
This is a suggestion to add a spline cutoff, which interpolates between the true potential at a set activation distance and zero at a cutoff distance. The interpolation itself is based on a cubic Hermite spline.
Main addition
The main addition consists in a new cutoff type,
CubicSplineCutoff
:This cutoff comes with two methods
force_divr_cutoff(cutoff::CubicSplineCutoff, r2, inter, params)
potential_cutoff(cutoff::CubicSplineCutoff, r2, inter, params)
which define the behaviour of the cutoff within the cutoff region, between
dist_activation
anddist_cutoff
Small adjustments
The naming convention used above required changing some of the code in the "interactions" folder, specifically the
potential_energy
andforce
methods defined in coulomb.jl, lennard_jones.jl, mie.jl and soft_sphere.jl. This is because originally, these methods enforce the cutoff in the case of two cutoff points (as is the case here) if the squared distance between two atoms is between cutoff.activation_dist and cutoff.sqdist_cutoff, which is misleading.