OpenThermo
A comprehensive C++ program for calculating molecular thermochemistry properties from quantum chemistry outputs (Gaussian, Orca, GAMESS, NWCHEM, CP2K, VASP, Q-Chem). OpenThermo implements state-of-the-art methods for computing thermodynamic quantities using statistical mechanics & partition functions.
Install / Use
/learn @lenhanpham/OpenThermoREADME
A comprehensive C++ program for calculating molecular thermochemistry properties from quantum chemistry output files (Gaussian, Orca, GAMESS, NWCHEM, CP2K, VASP, Q-Chem). OpenThermo implements state-of-the-art methods for computing thermodynamic quantities including Gibbs free energy, enthalpy, entropy, and heat capacities using statistical mechanics.
Online Document: https://lenhanpham.github.io/OpenThermo
Important Note
The project is still in the early stage and not fully tested. Therefore, errors and inaccuracy may happen. Users are suggested to check calculated data against original data from outputs of corresponding quantum chemical programs (with default temperature, conentration, and pressure)
A graphical user interface (GUI) version is under development and can be found here: https://github.com/lenhanpham/OpenThermoGUI
Table of Contents
- Project Overview
- Key Features
- System Requirements
- Installation
- Configuration
- Usage
- Input Formats
- Output Formats
- Calculation Methods
- Advanced Features
- Examples
- Troubleshooting
- Contributing
- License
Project Overview
OpenThermo is a high-performance C++17 program designed for molecular thermochemistry calculations. It processes quantum chemistry output files to compute thermodynamic properties using rigorous statistical mechanics methods. The program supports multiple quantum chemistry packages and implements both standard and advanced treatment methods for accurate thermochemical analysis.
Purpose
OpenThermo addresses the need for accurate thermochemical data in computational chemistry without re-running quantum chemical programs by providing:
- Accurate thermodynamic calculations using statistical mechanics
- Multiple treatment methods for low-frequency vibrational modes
- Comprehensive analysis of molecular systems
- Batch processing capabilities for high-throughput workflows
- Extensible architecture for future enhancements
Architecture
The codebase is organized into modular components located in the src/ directory:
src/
├── atommass.cpp
├── atommass.h
├── calc.cpp
├── calc.h
├── chemsys.h
├── help_utils.cpp
├── help_utils.h
├── loadfile.cpp
├── loadfile.h
├── main.cpp
├── omp_config.h
├── symmetry.cpp
├── symmetry.h
├── util.cpp
├── util.h
└── version.h
Development Status
- Version: 0.001.6
- Language: C++17 with clang++ compiler
- Build System: GNU Make with CMake support
- Testing: Test regression suite with CI on Linux, macOS, and Windows (+ AddressSanitizer, ThreadSanitizer)
- Documentation: Doxygen-generated API documentation
Key Features
Core Functionality
- Multi-format Support: Gaussian, ORCA, GAMESS-US, NWChem, CP2K, VASP, Q-Chem (experimental)
- Advanced Thermochemistry: Standard RRHO and quasi-RRHO treatments for low-frequency modes
- Statistical Mechanics: Rigorous implementation of partition functions and thermodynamic properties
- Symmetry Analysis: Automatic point group detection and rotational symmetry number calculation
Calculation Methods
- Standard RRHO: Rigid-rotor harmonic oscillator approximation
- Quasi-RRHO Treatments:
- Truhlar's frequency raising method
- Grimme's entropy interpolation
- Minenkov's energy + entropy interpolation
- Head-Gordon's energy interpolation (with optional entropy) [Experimental]
- Electronic Contributions: Multi-level electronic structure support
- Concentration Corrections: Solution-phase Gibbs energy adjustments
Flexibility & Usability
- Temperature/Pressure Scanning: Automated parameter sweeps
- Batch Processing: Multi-file analysis with ensemble averaging
- Mass Modifications: Isotopic substitution and custom atomic masses
- Configurable Scaling: Frequency scaling factors for different properties
- Multiple Output Formats: Console, text files, and native OpenThermo format
Technical Excellence
- High Performance: Optimized C++17 implementation
- Memory Efficient: Minimal memory footprint for large systems
- Error Handling: Comprehensive validation and graceful error recovery
- Extensible Design: Modular architecture for easy enhancement
- Cross-Platform: Linux, macOS, and Windows support
System Requirements
Minimum Requirements
- Operating System: Linux, macOS 10.14+, or Windows 10+
- Processor: x86_64 architecture
- Memory: 512 MB RAM (2 GB recommended)
- Storage: 50 MB free space
Compiler Requirements
- Primary: Clang 6.0+ or GCC 7.0+
- Alternative: Intel C++ Compiler 18.0+
- Standard: C++17 compliant compiler
Build Dependencies
- GNU Make: 3.8.1+ (build system, tested)
- CMake: 3.26.5+ (alternative build system, tested)
- Standard Library: C++17 standard library
Optional Dependencies
- Doxygen: 1.8+ (documentation generation)
- Graphviz: For documentation diagrams
- Python: 3.6+ (for test automation scripts)
Supported Platforms
- Linux: Ubuntu 18.04+, CentOS 7+, Fedora 28+
- macOS: 10.14+ with Xcode Command Line Tools
- Windows: 10+ with MSYS2/MinGW or Visual Studio 2017+
Installation
Quick Start Build
-
Clone or download the repository:
git clone https://github.com/lenhanpham/OpenThermo.git cd OpenThermo -
Build with Make (recommended):
make clean && make -
Alternative CMake build:
mkdir build && cd build cmake .. make
Build Options
GNU Make Build System
# Standard optimized build
make
# Build with OpenMP parallelization
make OPENMP=1
# Debug build with AddressSanitizer
make debug
# Release build with maximum optimization
make release
# Force specific compiler
make CXX=g++ # GCC
make CXX=clang++ # Clang
make CXX=icpc # Intel
# Clean build artifacts
make clean
CMake Build System
# Create build directory
mkdir build && cd build
# Configure and build
cmake ..
make
# Build with OpenMP parallelization
cmake .. -DENABLE_OPENMP=ON
make
# Build types
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake .. -DCMAKE_BUILD_TYPE=Debug
# Specify compiler
cmake .. -DCMAKE_CXX_COMPILER=clang++
Windows Build (MSYS2/MinGW)
For Windows Users, there is a binary package in Release. Download this package and unzip it for further instruction of installation.
For those who would like to complie OpenThermo from source code on Windows:
- Install MSYS2 and open a MINGW64 terminal
- Install dependencies:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-make - Build:
The Makefile auto-detects Windows and addsmake-staticlinking so the binary runs without MinGW DLLs.
Post-Build Setup
-
Add OpenThermo to PATH (Linux/macOS):
Add the following line to your shell configuration file (
~/.bashrc,~/.zshrc, or equivalent), replacing/path/to/OpenThermowith the actual path to the directory containing theOpenThermobinary (e.g. the repo root orbuild/):export PATH=$PATH:/path/to/OpenThermoThen reload your shell:
source ~/.bashrc # or source ~/.zshrcWindows users: Add the directory containing
OpenThermo.exeto the System PATH via Settings → System → Advanced system settings → Environment Variables. -
Verify executable:
OpenThermo --help -
Create settings file (optional):
OpenThermo --create-config -
Compiler options:
make CXX=g++ # Force GCC compilation make CXX=icpc # Force Intel compiler -
Clean build:
make clean
Build Targets
all(default): Standard optimized builddebug: Includes debug symbols and AddressSanitizerrelease: Maximum optimization for production usetsan: ThreadSanitizer build for detecting data races (use withOPENMP=1)clean: Remove all build artifactstest: Run the regression test suitetest-generate: Regenerate reference values from current build
Successful Compilation Output
Using compiler: g++
g++ -std=c++17 -Wall -Wextra -O2 -c main.cpp -o build/main.o
g++ -std=c++17 -Wall -Wextra -O2 -c atommass.cpp -o build/atommass.o
...
g++ build/main.o ... -o OpenThermo -lrt -lstdc++fs
Configuration
Configuration Files
OpenThermo supports configuration through:
- Command-line arguments (highest priority)
- Local settings file:
./settings.ini - Environment settings:
$OPENTHERMOPATH/settings.ini - Program defaults (lowest priority)
Creating Settings File
Generate a default settings file:
OpenThermo --create-config
This creates settings.ini with all available pa
