An AI-assisted computational chemistry tool for Gaussian output analysis, conformer comparison and batch cheminformatics insights.
DFT-Insight Agent is a Python-based computational chemistry analysis tool designed to simplify the extraction, processing and interpretation of data from Gaussian computational chemistry output files.
The project combines automated Gaussian output parsing, thermochemical analysis, conformer ranking, TD-DFT photophysics and UV-Vis spectral analysis, statistical analysis and machine learning techniques within an interactive Streamlit dashboard. It also exposes its analytical capabilities through a Model Context Protocol (MCP) server, allowing compatible AI clients such as Claude Desktop to interact with the analysis tools.
- Project Motivation
- Project Objectives
- Key Features
- System Architecture
- Technology Stack
- Installation and Setup
- Running the Application
- Using the Application
- Sample Analysis and Results
- MCP Integration
- Project Structure
- Current Limitations
- Future Improvements
- Acknowledgements
Density Functional Theory (DFT) calculations are widely used in computational chemistry to investigate molecular properties, electronic structures and molecular stability.
However, the output generated by quantum chemistry software such as Gaussian can contain extensive numerical information. Extracting relevant properties, comparing multiple calculations and identifying meaningful relationships across a collection of molecular systems can require considerable manual effort.
Some of the challenges addressed by this project include:
- Manually extracting molecular properties from Gaussian output files.
- Comparing the relative stability of different molecular conformers.
- Calculating Boltzmann population distributions.
- Identifying unusual results within a collection of computational calculations.
- Understanding relationships between calculated molecular properties.
- Exploring similarities and differences across a batch of molecular calculations.
DFT-Insight Agent was developed to make these analytical workflows more accessible through automated data extraction, statistical analysis, machine learning and AI-assisted interaction.
The broader goal is to move beyond simply extracting numerical results and provide a platform that helps researchers explore and understand the information generated by computational chemistry calculations.
The primary objectives of this project are:
- Automate the extraction of important molecular and thermochemical properties along with TD-DFT photophysics/UV-Vis analysis from Gaussian output files.
- Provide an interactive interface for inspecting individual computational chemistry calculations.
- Simplify conformer comparison using relative Gibbs free energy and Boltzmann population analysis.
- Apply statistical and machine learning techniques to explore patterns across multiple calculations.
- Visualise relationships between selected quantum chemical descriptors.
- Expose analytical functionality through MCP tools for interaction with compatible AI clients.
Upload an individual Gaussian .log or .out file to extract important computational chemistry properties.
Extracted properties include:
- SCF electronic energy (Hartree).
- Zero-point vibrational energy (ZPE).
- Enthalpy.
- Gibbs free energy.
- HOMO energy.
- LUMO energy.
- HOMOβLUMO energy gap (eV).
- Dipole moment (Debye).
- Vibrational frequencies and imaginary frequency count.
The application also checks Gaussian output files for common calculation failure signatures and provides possible explanations and suggested fixes.
Analyse multiple Gaussian output files to compare conformers based on their calculated Gibbs free energies.
The module performs:
- Relative Gibbs free energy calculation (ΞG).
- Conformer ranking based on relative free energy.
- Boltzmann factor calculation.
- Boltzmann population percentage calculation.
- Interactive relative energy comparison.
- Boltzmann population distribution visualisation.
The default temperature used for Boltzmann analysis is 298.15 K.
Process multiple Gaussian calculations together to explore patterns across selected molecular descriptors.
The batch analysis module includes:
Principal Component Analysis (PCA)
- Applies feature standardisation before PCA.
- Reduces the selected descriptor space to up to two principal components.
- Calculates explained variance ratios.
- Visualises calculations in a two-dimensional PCA scatter plot.
K-Means Clustering
- Groups calculations according to similarities in the selected standardised descriptors.
- Allows the user to select the number of clusters.
- Displays cluster assignments for individual calculations.
Outlier Detection
- Uses Z-score analysis to identify unusual descriptor values.
- Applies a threshold of 2.5 for outlier identification.
Feature Correlation Analysis
- Calculates correlations between selected quantum chemical descriptors.
- Displays the relationships through an interactive correlation heatmap.
Descriptors currently used for batch analysis:
- HOMOβLUMO energy gap.
- Dipole moment.
- Gibbs free energy.
- SCF electronic energy.
Missing descriptor values are imputed using the corresponding feature mean before standardisation and PCA.
The project includes an MCP server that exposes the computational chemistry analysis functions as tools for compatible AI clients.
Available MCP tools:
| Tool | Function |
|---|---|
analyze_gaussian_file |
Analyses an individual Gaussian output file. |
analyze_conformer_folder |
Ranks conformers and calculates Boltzmann populations from a folder of Gaussian files. |
analyze_batch_cheminformatics |
Performs batch outlier detection, correlation analysis, PCA and K-Means clustering. |
This integration allows an AI client to invoke the underlying analytical functions and retrieve structured results through natural-language interaction.
The project consists of three main components.
- Streamlit application (
app.py) β Provides the interactive dashboard and visualisation interface. - Core analysis engine (
parser_core.py) β Handles Gaussian parsing, property extraction, conformer ranking and machine learning analysis. - MCP server (
mcp_server.py) β Exposes the core analytical functions as tools for compatible AI clients.
Gaussian Output Files
(.log / .out)
|
v
Streamlit Dashboard
(app.py)
|
v
Core Analysis Engine
(parser_core.py)
|
+-----------------+-----------------+-----------------+
| | | |
v v v v
Individual Conformer Batch ML & TD-DFT &
Analysis Analysis Cheminformatics Photophysics
| | | |
v v v v
Molecular Energy, ΞG & PCA, Clustering, UV-Vis Spectrum,
Properties Boltzmann & Correlation & Orbital Transitions
Temp. Scan Outlier Detection & CT / QC Checks
| | | |
+-----------------+-----------------+-----------------+
|
v
Results & Visualisation
Compatible AI Client (e.g. Claude Desktop / Copilot)
|
v
MCP Server
(mcp_server.py)
|
v
Core Analysis Engine
(parser_core.py)
The dashboard and MCP server provide separate interfaces to the shared analytical code. The MCP server accesses Gaussian files through its configured filesystem paths.
| Category | Technologies |
|---|---|
| Programming Language | Python |
| User Interface | Streamlit |
| Gaussian Output Parsing | cclib |
| Data Processing | Pandas, NumPy |
| Scientific Computing | SciPy |
| Machine Learning | Scikit-learn |
| Data Visualisation | Plotly |
| AI Tool Integration | Model Context Protocol (MCP) |
- Python 3.10 or a compatible Python version.
- pip package manager.
- Gaussian
.logor.outoutput files for analysis. - A compatible MCP client if you intend to use the AI integration.
git clone <https://github.com/AkshayAbraham/DFT-Insight-Agent>cd DFT-Insight-Agentpython -m venv venvWindows:
venv\Scripts\activateLinux / macOS:
source venv/bin/activatepip install -r requirements.txtFrom the project root directory, run:
streamlit run app.pyThe application will open in your default browser.
To start the MCP server:
python mcp_server.pyThe server uses the standard input/output (stdio) transport. It is intended to be launched and managed by a compatible MCP client.
The dashboard provides four main analysis modes.
- Launch the Streamlit application.
- Select Single File Inspector from the sidebar.
- Upload a Gaussian
.logor.outfile. - Review the extracted molecular properties.
- Examine the vibrational stability status and any detected calculation errors.
- Select Batch Conformer Ranking & Comparison.
- Upload multiple Gaussian output files.
- Allow the application to process the uploaded calculations.
- Examine the conformer ranking table.
- Explore the relative Gibbs free energy and Boltzmann population visualisations.
- Select Batch Cheminformatics & ML Insights.
- Upload multiple Gaussian output files.
- Choose the desired number of K-Means clusters using the sidebar control.
- Run the analysis.
- Examine the batch summary and flagged outliers.
- Explore the PCA scatter plot and correlation heatmap.
- Review the clustering assignment table.
- Upload a Gaussian log file containing TD-DFT excited-state calculations (td=(...)).
- Review key photophysical metrics including
$\lambda_{\max}$ (nm), maximum oscillator strength ($f$ ), and total computed states. - Simulated UV-Vis Spectrum: Adjust the Gaussian Broadening Width (
$\sigma$ in eV) slider to inspect the normalized absorption spectrum across 200β800 nm. - Orbital Transitions Breakdown: Examine the state-by-state table detailing dominant molecular orbital transitions (e.g., HOMO β LUMO percentage contributions), transition character classifications (
$\pi \to \pi^*$ , Charge-Transfer, Rydberg-like), and automated scientific warnings when charge-transfer states are detected.
Note: At least two successful Gaussian calculations are required for the batch analysis. The number of successful calculations must also be sufficient for the selected number of clusters.
The application extracts molecular and thermochemical properties from the uploaded Gaussian output file.
Example properties displayed:
| Property | Description |
|---|---|
| SCF Energy | Calculated self-consistent field electronic energy |
| HOMOβLUMO Gap | Energy difference between HOMO and LUMO |
| Dipole Moment | Magnitude of the molecular dipole moment |
| Imaginary Frequencies | Number of negative vibrational frequencies |
| Gibbs Free Energy | Calculated Gibbs free energy |
The conformer ranking module compares different conformations based on their relative Gibbs free energies.
The analysis provides:
- Relative Gibbs free energy (ΞG).
- Boltzmann factors.
- Estimated Boltzmann population percentages.
- Ranked conformer comparison.
PCA is performed on the selected standardised quantum chemical descriptors.
The explained variance of the first two principal components is used to assess how much of the variation in the selected descriptor dataset is represented in the two-dimensional PCA projection.
The combined explained variance is calculated as:
Combined variance (%) =
(PC1 explained variance + PC2 explained variance) Γ 100
The PCA scatter plot provides a visual representation of the calculations in the reduced descriptor space. Points with similar positions have more similar projections across the selected descriptors, while cluster colours represent K-Means assignments.
The correlation heatmap helps explore relationships between the selected molecular properties, while outlier detection highlights calculations with unusually large Z-scores.
For calculations containing time-dependent density functional theory (TD-DFT) output, the photophysics module extracts electronic excitation energies and oscillator strengths to model optical behavior.
Key outputs displayed:
| Property / Feature | Description |
|---|---|
|
|
Wavelength (in nm) corresponding to the strongest allowed electronic transition in the optical range ( |
| Max Oscillator Strength ( |
Dimensionless intensity of the dominant electronic transition |
| Simulated UV-Vis Spectrum | Continuous absorption curve (200β800 nm) generated via Gaussian broadening with adjustable bandwidth ( |
| Orbital Transition Breakdown | Dominant molecular orbital excitations (e.g., |
| Transition Character & CT Check | Classifies states (valence |
When evaluating incomplete or failed Gaussian jobs, the diagnostic engine inspects the calculation footer and excited-state metadata to identify common computational bottlenecks
- Failure Root-Cause Detection: Automatically flags SCF convergence failures, geometry optimization step limits, internal coordinate issues (
FormBX), and memory/disk terminations (Lnk1e), pairing each with a suggested Gaussian route fix. - TD-DFT Validation Checks: Verifies whether sufficient excited states were computed to cover the visible optical region and checks batch series for consistent state counts across molecules.
https://dft-insight-agent-mjade563h4ugrcsytf8ptk.streamlit.app/
Dashboard
The sample calculations, screenshots, and exported tables shown below are generated from Gaussian log/output files in the sample_logs/ directory inside this project.
Single File Analysis
Conformer Ranking
Batch PCA and Machine Learning Analysis
Batch Cheminformatics Analysis (CSV)
TD-DFT Analysis
DFT-Insight Agent exposes its analytical functions through an MCP server.
The MCP server can be connected to compatible clients such as Claude Desktop.
The server exposes three tools:
analyze_gaussian_fileanalyze_conformer_folderanalyze_batch_cheminformatics
These tools allow an AI client to request analysis of Gaussian files and retrieve structured computational results.
Important: The MCP server and the client must be able to access the same Gaussian output files. When the dashboard and MCP server run in separate environments, a shared directory or another suitable file-transfer mechanism must be configured.
Refer to your MCP client's documentation for its server configuration instructions.
The screenshots below demonstrate querying the MCP server tools directly from the workspace assistant using the files in sample_logs/:
| image 1 | image 2 |
|---|---|
![]() |
![]() |
| Caption for screenshot 1 | Caption for screenshot 2 |
| image 3 | image 4 |
|---|---|
![]() |
![]() |
| Caption for screenshot 3 | Caption for screenshot 4 |
| image 5 | image 6 |
|---|---|
![]() |
![]() |
| Caption for screenshot 5 | Caption for screenshot 6 |
DFT-Insight-Agent/
β
βββ app.py # Streamlit application and dashboard
β
βββ parser_core.py # Core Gaussian parsing and analytical engine
β
βββ boltzmann_core.py # Conformer Boltzmann ensemble and temperature scan logic
β
βββ tdft/
β βββ __init__.py # Package exports for UV-Vis and transition helpers
β βββ uv_vis.py # TD-DFT UV-Vis data parsing and spectrum broadening
β βββ transitions.py # Molecular orbital transition analysis and CT checks
β βββ validation.py # TD-DFT quality control and batch consistency checks
β
βββ mcp_server.py # MCP server and tool definitions
β
βββ test_run.py # Local analysis and testing script
β
βββ requirements.txt # Python dependencies
β
βββ sample_logs/ # Gaussian output files
β
βββ assets/
β βββ screenshots/ # Application and AI worker screenshots
β βββ tables/ # Exported sample CSV tables
β
βββ README.md # Project documentation
- The current implementation focuses on Gaussian
.logand.outoutput files. - The batch machine learning module uses a limited set of four quantum chemical descriptors.
- PCA results represent variance across the selected standardised descriptors, not the complete electronic structure or total electronic variance of a molecular system.
- Missing descriptor values are replaced with feature means, which may influence statistical results.
- Outlier detection uses a fixed Z-score threshold of 2.5.
- K-Means clustering results depend on the input dataset and selected cluster count.
- Gaussian error diagnosis is based on a predefined set of recognised error signatures.
- The MCP server requires access to the Gaussian files through its own filesystem environment.
- AI-generated interpretations should be validated against the underlying computational results.
Potential directions for extending the project include:
- Supporting output files from additional quantum chemistry software.
- Expanding the collection of molecular and electronic descriptors.
- Adding molecular structure visualisation.
- Introducing more advanced clustering and anomaly detection approaches.
- Providing batch report export and persistent dataset management.
- Adding PCA feature loadings to improve component interpretation.
- Enhancing AI-assisted interpretation with access to more detailed analytical context.
- Improving the integration between the dashboard, MCP server and shared batch datasets.
β οΈ Prototype & Mixed-Dataset Notice: This project is currently at a prototype stage and has been tested on a mixed set of different molecules with limited log files containing thermochemistry and TD-DFT outputs. Because some calculations have missing properties or heterogeneous job types, certain results or comparisons may be incomplete or inaccurate. Further validation and fine-tuning are planned using a larger, well-curated dataset.
- cclib: Python library for parsing and interpreting computational chemistry output files, as well as sample log files used during testing (
cclibrepository / sample outputs). - Scientific Python Stack:
numpy,pandas,scipy, andscikit-learnfor numerical calculations, data handling, statistical tests, PCA, and clustering. - Streamlit & Model Context Protocol (MCP): Used for building the interactive dashboard and exposing analysis tools to compatible clients.
- ChatGPT, Gemini, and Claude: Used as AI coding and brainstorming assistants during development, debugging, and documentation drafting. (AI-generated suggestions were reviewed alongside project testing and should be verified against primary computational chemistry literature and raw output files.)
This project is available under the MIT licence.
DFT-Insight Agent β Making computational chemistry analysis more accessible through automation, data science and AI-assisted tools.









