Skip to content

aquilesC/plasmon_adda

Repository files navigation

Plasmon ADDA

A Python package for interfacing with ADDA to calculate the plasmonic properties of gold nanorods.

Installation

This project is configured as a Python package. You can install it in editable mode using pip or uv.

Prerequisites

  • Python 3.14+
  • adda command-line tool installed and accessible in your system PATH.

Installing with pip

pip install -e .

Installing with uv

uv sync
uv pip install -e .

Usage

The package provides three command-line tools for running and analyzing simulations.

1. Run a Single Simulation (plasmon-run)

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 600

Results will be saved to output/65.0X15.0/ by default.

2. Run Batch Simulations (plasmon-batch)

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 15

This will run simulations for lengths 40, 50, 60, 70, and 80 nm concurrently.

3. Plot Results (plasmon-plot)

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.0

A plot image results_plot.png will be saved in the specified folder.

Output Structure

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

About

Simple Python scripts for interfacing with ADDA to calculate the plasmon of nanoparticles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages