Skip to main content

aiida-alc-ins

An AiiDA plugin for lattice dynamics and inelastic neutron scattering (INS) simulations. It wraps Python libraries for phonon modelling and spectrum calculation (Euphonic, abinslib, and resins) into reproducible workflows, using aiida-pythonjob to dispatch calculations directly from Python without command-line wrappers.

⚠️ Status: Agentic Prototype
This package is an experiment in use of agentic coding ("vibe coding") to accelerate research software infrastructure at the STFC Ada Lovelace Centre. It has been developed rapidly with LLMs, as a thin layer around libraries providing the scientific capability. While changes are planned and tracked with OpenSpec and backed by automated integration tests, it has not undergone full line-by-line human review. Expect fast iteration and breaking changes before 1.0. Do not use in production without reviewing the code.

Features

  • Input support: Read force constants from CASTEP (.castep_bin) or Phonopy (phonopy.yaml + FORCE_CONSTANTS / force_constants.hdf5).
  • Lattice dynamics: Compute phonon dispersions (BandsData) and density of states (XyData) with automatic band-path generation via seeK-path.
  • INS spectra: Simulate inelastic neutron scattering on the TOSCA instrument (fundamentals and combination modes via abinslib, instrument resolution broadening via resins), with intensity decomposition grouped by element, atom, or quantum order.
  • Full provenance: Workflows automatically record calculation steps, interpolation parameters, and intermediate modes in the AiiDA provenance graph.

Installation

pip install aiida-alc-ins

Quick Example: TOSCA Spectrum from Force Constants

from aiida import load_profile, orm
from aiida.engine import run_get_node
from aiida.plugins import WorkflowFactory

load_profile()

ToscaFromForceConstantsWorkChain = WorkflowFactory("alc_ins.tosca_from_force_constants")
code = orm.load_code("python3@localhost")

results, node = run_get_node(
    ToscaFromForceConstantsWorkChain,
    force_constants={
        "castep_file": orm.SinglefileData("quartz.castep_bin"),
    },
    q_spacing=orm.Float(0.05),  # Monkhorst-Pack grid spacing (1/Å)
    spectrum={
        "temperature": orm.Float(10.0),  # Kelvin
        "energy_spacing": orm.Float(1.0),  # cm⁻¹
        "group_by": orm.List(["atom_symbol"]),
    },
    code=code,
)

# Spectrum is stored as native AiiDA XyData
spectrum_node = results["spectrum"]
_, energies, _ = spectrum_node.get_x()
for label, intensities, _ in spectrum_node.get_y():
    print(f"Computed {label} spectrum across {len(energies)} points")

Documentation & Specs

Development

Run the test suite with uv:

uv run pytest

uv run automatically creates .venv and installs dependencies. Integration tests run in parallel by default (pytest-xdist) using a shared, locked container fixture.

Metadata

Release files for aiida-alc-ins 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiida-alc-ins 0.2.0
File Size Uploaded Provenance Actions
aiida_alc_ins-0.2.0.tar.gz 49.3 kB With provenance Details for aiida_alc_ins-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiida-alc-ins 0.2.0
File Interpreter ABI Platform Actions
aiida_alc_ins-0.2.0-py3-none-any.whl Python 3 none any Details for aiida_alc_ins-0.2.0-py3-none-any.whl

Total release size: 103.2 kB

Release files / aiida_alc_ins-0.2.0.tar.gz

Download URL aiida_alc_ins-0.2.0.tar.gz
Size 49.3 kB
Tags Source
SHA-256 checksum
How to use checksums
81deeb9453c9188331a3466f07ed5c05ca7b83b66606b4d779780b15ba602974
BLAKE2b-256 checksum
How to use checksums
9ec5177c076435b92435c0cf68186b5b8949b041584f3f55d8fade1f16f7aab4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / aiida_alc_ins-0.2.0-py3-none-any.whl

Download URL aiida_alc_ins-0.2.0-py3-none-any.whl
Size 53.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9da49d16a849e0415f827702ef9ffc834f3febeb5e6c18ac4ae6257b14c17e2b
BLAKE2b-256 checksum
How to use checksums
d6a3af4c8438ac434f403a84651432fe80e022eeb73fd5f07ea73fe68220a167
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for aiida-alc-ins 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiida_alc_ins-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page