mnp_plasmon

mnp_plasmon is an Erlang Hex package for single-particle plasmonic response in the Rayleigh quasi-static limit. It mirrors the same physical model already published in JavaScript and Racket, so the codebase stays consistent across languages.

It integrates three layers:

Install

Add to rebar.config:

{deps, [
    {mnp_plasmon, "0.1.0"}
]}. 

High-level API

1> mnp_plasmon:simulate_sphere_response(#{
       material => <<"Au">>,
       wavelength_nm => 550.0,
       radius_nm => 20.0,
       medium_refractive_index => 1.33
   }).

Return structure:

Low-level API

Cross-language integration

This package is designed to match the same API concepts already implemented in:

There is also an Elixir example in examples/elixir_demo.exs showing how the Erlang package can be consumed from another BEAM language.

License

GPL-3.0-only