cesmix-mit / InteratomicPotentials.jl

Contains methods and types for a variety interatomic potentials.
MIT License
27 stars 6 forks source link

add get_rcutoff and get_species functions to API #34

Closed jrdegreeff closed 2 years ago

jrdegreeff commented 2 years ago

This PR adds two new field accessor functions to the API: get_rcutoff and get_species. This allows us to avoid using direct field access in the aggregation functions and will be very important for when we externalize the neighbor list interface. New implementations default to Inf and missing respectively. The LinearCombinationPotential has rcutoff which is the maximum of its subpotentials. This choice seems sensible right now but it could potentially be revisited when we rework the neighbor list abstraction in version 0.3.

codecov-commenter commented 2 years ago

Codecov Report

Merging #34 (13d7ac5) into main (e22dc35) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          147       160   +13     
=========================================
+ Hits           147       160   +13     
Impacted Files Coverage Δ
src/empirical/bm.jl 100.00% <100.00%> (ø)
src/empirical/coulomb.jl 100.00% <100.00%> (ø)
src/empirical/lj.jl 100.00% <100.00%> (ø)
src/empirical/morse.jl 100.00% <100.00%> (ø)
src/empirical/zbl.jl 100.00% <100.00%> (ø)
src/mixed/linear_combination_potential.jl 100.00% <100.00%> (ø)
src/types/arbitrary_potential.jl 100.00% <100.00%> (ø)
src/types/empirical_potential.jl 100.00% <100.00%> (ø)

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 e22dc35...13d7ac5. Read the comment docs.