# adamlaho/amlp architecture

> Architecture diagram of the GitHub repository adamlaho/amlp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adamlaho/amlp
- Repository: https://github.com/adamlaho/amlp
- Video tour (about a minute): https://gitdiagram.com/adamlaho/amlp/video

## Overview

AMLP combines AI-assisted computational-chemistry research with a structure-to-DFT-input and simulation-data preparation workflow. Its documented path runs from structure files through input generation, external DFT calculations, output extraction, and ML-ready dataset creation; it also offers AIMD input generation and trajectory analysis. Research agents use publication search to produce reports. The tree and excerpts support these major capabilities, but do not establish every CLI dispatch or the wiring of unsampled active-learning modules, so uncertain links are omitted.

Main entry points: [`multi_agent_dft/cli/main.py`](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/cli/main.py) (Workflow CLI), [`amlpt.py`](https://github.com/adamlaho/amlp/blob/main/amlpt.py) (Interactive system), [`multi_agent_dft/file_processing/cif.py`](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/cif.py) (Structure processing), [`multi_agent_dft/agents/chemistry_agents.py`](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/chemistry_agents.py) (Chemistry agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Research assistance"]
  node_amlpt["Interactive system<br/>[amlpt.py]"]
  node_agents["Chemistry agents"]
  node_dft_agents["DFT expert agents<br/>[dft_agents.py]"]
  node_supervisor["Report supervisor<br/>[supervisor.py]"]
  node_publication["Publication search<br/>[publication.py]"]
end

subgraph group_inputs["Structure and inputs"]
  node_cli["Workflow CLI<br/>[main.py]"]
  node_structure_processing["Structure processing<br/>[cif.py]"]
  node_cp2k["CP2K inputs<br/>[cp2k.py]"]
  node_vasp["VASP inputs<br/>[vasp.py]"]
  node_gaussian["Gaussian inputs<br/>[gaussian.py]"]
end

subgraph group_simulation_data["Simulation data"]
  node_output_processing["DFT output extraction"]
  node_aimd_processing["AIMD input preparation<br/>[aimd_processor.py]"]
  node_ml_conversion["MACE dataset conversion"]
  node_hdf5["ML training dataset"]
end

subgraph group_analysis["Trajectory analysis"]
  node_analysis_cli["Free-energy analysis CLI"]
  node_free_energy["Free-energy analysis<br/>[free_energy.py]"]
end

node_researcher(("Researcher"))
node_literature(("Literature services"))
node_structure_files["CIF / XYZ files"]
node_dft_calc["DFT calculation"]
node_trajectory["MD trajectory"]

node_researcher -->|"starts session"| node_amlpt
node_amlpt -->|"requests research"| node_agents
node_amlpt -->|"requests guidance"| node_dft_agents
node_agents -->|"searches literature"| node_publication
node_publication -->|"queries sources"| node_literature
node_amlpt -->|"coordinates reports"| node_supervisor
node_agents -->|"provides findings"| node_supervisor
node_dft_agents -->|"provides recommendations"| node_supervisor
node_researcher -->|"runs workflow"| node_cli
node_structure_files -->|"supplies structures"| node_cli
node_cli -->|"processes structures"| node_structure_processing
node_cli -->|"requests input generation"| node_cp2k
node_cli -->|"requests input generation"| node_vasp
node_cli -->|"requests input generation"| node_gaussian
node_structure_processing -->|"provides structures"| node_cp2k
node_structure_processing -->|"provides structures"| node_vasp
node_structure_processing -->|"provides structures"| node_gaussian
node_cp2k -->|"generates inputs for"| node_dft_calc
node_vasp -->|"generates inputs for"| node_dft_calc
node_gaussian -->|"generates inputs for"| node_dft_calc
node_dft_calc -->|"produces outputs for"| node_output_processing
node_output_processing -->|"provides processed data"| node_ml_conversion
node_ml_conversion -->|"writes HDF5 dataset"| node_hdf5
node_output_processing -->|"provides optimized data"| node_aimd_processing
node_aimd_processing -->|"generates AIMD inputs for"| node_dft_calc
node_researcher -->|"starts analysis"| node_analysis_cli
node_trajectory -->|"supplies trajectory"| node_analysis_cli
node_analysis_cli -->|"runs calculations"| node_free_energy

click node_amlpt "https://github.com/adamlaho/amlp/blob/main/amlpt.py"
click node_agents "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/chemistry_agents.py"
click node_dft_agents "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/dft_agents.py"
click node_supervisor "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/supervisor.py"
click node_publication "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/api/publication.py"
click node_cli "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/cli/main.py"
click node_structure_processing "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/cif.py"
click node_cp2k "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/cp2k.py"
click node_vasp "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/vasp.py"
click node_gaussian "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/gaussian.py"
click node_output_processing "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/dft_output_processor.py"
click node_aimd_processing "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/aimd_processor.py"
click node_ml_conversion "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/ml_dataset_converter.py"
click node_analysis_cli "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/analysis/cli/run_free_energy_analysis.py"
click node_free_energy "https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/analysis/free_energy.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_amlpt,node_agents,node_dft_agents,node_supervisor,node_publication toneBlue
class node_cli,node_structure_processing,node_cp2k,node_vasp,node_gaussian toneAmber
class node_output_processing,node_aimd_processing,node_ml_conversion,node_hdf5 toneMint
class node_analysis_cli,node_free_energy toneRose
class node_researcher,node_literature,node_structure_files,node_dft_calc,node_trajectory toneIndigo
```

## Components

### Research assistance

- [Interactive system](https://github.com/adamlaho/amlp/blob/main/amlpt.py): `amlpt.py`
- [Chemistry agents](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/chemistry_agents.py): `multi_agent_dft/agents/chemistry_agents.py`
- [DFT expert agents](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/dft_agents.py): `multi_agent_dft/agents/dft_agents.py`
- [Report supervisor](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/agents/supervisor.py): `multi_agent_dft/agents/supervisor.py`
- [Publication search](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/api/publication.py): `multi_agent_dft/api/publication.py`

### Structure and inputs

- [Workflow CLI](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/cli/main.py): `multi_agent_dft/cli/main.py`
- [Structure processing](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/cif.py): `multi_agent_dft/file_processing/cif.py`
- [CP2K inputs](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/cp2k.py): `multi_agent_dft/dft/cp2k.py`
- [VASP inputs](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/vasp.py): `multi_agent_dft/dft/vasp.py`
- [Gaussian inputs](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/dft/gaussian.py): `multi_agent_dft/dft/gaussian.py`

### Simulation data

- [DFT output extraction](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/dft_output_processor.py): `multi_agent_dft/file_processing/dft_output_processor.py`
- [AIMD input preparation](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/aimd_processor.py): `multi_agent_dft/file_processing/aimd_processor.py`
- [MACE dataset conversion](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/file_processing/ml_dataset_converter.py): `multi_agent_dft/file_processing/ml_dataset_converter.py`
- **ML training dataset**

### Trajectory analysis

- [Free-energy analysis CLI](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/analysis/cli/run_free_energy_analysis.py): `multi_agent_dft/analysis/cli/run_free_energy_analysis.py`
- [Free-energy analysis](https://github.com/adamlaho/amlp/blob/main/multi_agent_dft/analysis/free_energy.py): `multi_agent_dft/analysis/free_energy.py`

### Other components

- **Researcher**
- **Literature services**
- **CIF / XYZ files**
- **DFT calculation**
- **MD trajectory**

## Connections

- Researcher → Interactive system: starts session
- Interactive system → Chemistry agents: requests research
- Interactive system → DFT expert agents: requests guidance
- Chemistry agents → Publication search: searches literature
- Publication search → Literature services: queries sources
- Interactive system → Report supervisor: coordinates reports
- Chemistry agents → Report supervisor: provides findings
- DFT expert agents → Report supervisor: provides recommendations
- Researcher → Workflow CLI: runs workflow
- CIF / XYZ files → Workflow CLI: supplies structures
- Workflow CLI → Structure processing: processes structures
- Workflow CLI → CP2K inputs: requests input generation
- Workflow CLI → VASP inputs: requests input generation
- Workflow CLI → Gaussian inputs: requests input generation
- Structure processing → CP2K inputs: provides structures
- Structure processing → VASP inputs: provides structures
- Structure processing → Gaussian inputs: provides structures
- CP2K inputs → DFT calculation: generates inputs for
- VASP inputs → DFT calculation: generates inputs for
- Gaussian inputs → DFT calculation: generates inputs for
- DFT calculation → DFT output extraction: produces outputs for
- DFT output extraction → MACE dataset conversion: provides processed data
- MACE dataset conversion → ML training dataset: writes HDF5 dataset
- DFT output extraction → AIMD input preparation: provides optimized data
- AIMD input preparation → DFT calculation: generates AIMD inputs for
- Researcher → Free-energy analysis CLI: starts analysis
- MD trajectory → Free-energy analysis CLI: supplies trajectory
- Free-energy analysis CLI → Free-energy analysis: runs calculations
