A Python package for interfacing with ADDA to calculate the plasmonic properties of gold nanorods.
This project is configured as a Python package. You can install it in editable mode using pip or uv.
- Python 3.14+
addacommand-line tool installed and accessible in your system PATH.
pip install -e .uv sync
uv pip install -e .The package provides three command-line tools for running and analyzing simulations.
Runs an adaptive simulation for a single nanorod geometry. The simulation intelligently adjusts the wavelength step size to resolve spectral peaks efficiently.
Syntax:
plasmon-run --length <L> --width <W> [--start-lambda <wav>] [--output <dir>]Example:
plasmon-run --length 65 --width 15 --start-lambda 600Results will be saved to output/65.0X15.0/ by default.
Runs a series of simulations in parallel for a range of lengths.
Syntax:
plasmon-batch --start-length <L1> --end-length <L2> --width <W> [--step <S>]Example:
plasmon-batch --start-length 40 --end-length 80 --step 10 --width 15This will run simulations for lengths 40, 50, 60, 70, and 80 nm concurrently.
Generates a plot of the extension and absorption spectra from the generated data files.
Syntax:
plasmon-plot <folder_path>Example:
plasmon-plot output/65.0X15.0A plot image results_plot.png will be saved in the specified folder.
By default, all output is saved to the output/ directory (relative to where you run the command).
output/
└── <Length>X<Width>/
├── Data_<Length>X<Width>.dat # Raw simulation data
└── results_plot.png # Generated plot