A scientific module for vibrational coupling Hamiltonian analysis.
Project description
PyVCHAM
PyVCHAM is an open-source Python package designed to construct vibronic coupling (VC) Hamiltonians for complex molecular systems where the Born-Oppenheimer approximation fails. Leveraging machine learning techniques, specifically automatic differentiation via TensorFlow, PyVCHAM optimizes Hamiltonian parameters efficiently and accurately. It is built to integrate seamlessly with quantum chemistry tools, enabling high-dimensional nonadiabatic dynamics simulations with enhanced flexibility and precision.
Key Features
- Automatic Differentiation: Uses TensorFlow to compute precise gradients of cost functions, improving optimization efficiency.
- Quantum Chemistry Integration: Interfaces with tools such as OpenMolcas and ADC-connect for ab initio data input.
- Standardized JSON Format: Proposes a structured JSON format for storing VC Hamiltonians, enhancing interoperability with dynamics software like MCTDH.
- Modular Design: Supports custom diabatic or coupling functions to adapt to specific research needs.
- Robust Optimization: Employs the Adam algorithm for parameter fitting, with support for linear and higher-order vibronic coupling terms.
- Symmetry Handling: Incorporates symmetry constraints to ensure physically meaningful coupling terms.
Installation
PyVCHAM requires Python 3.9+ (tested up to 3.12). We strongly recommend using a fresh Conda environment to manage dependencies like TensorFlow and NumPy.
Step 1: Create the Environment
Choose the instructions matching your operating system:
A. Linux / Windows / Intel Macs
Standard installation for most users.
conda create --name pyvcham python=3.12
conda activate pyvcham
B. Apple Silicon (M1/M2/M3) [Recommended]
To ensure TensorFlow utilizes your Mac's GPU (Metal) and avoids architecture conflicts, force a native ARM environment:
# 1. Create a native arm64 environment
CONDA_SUBDIR=osx-arm64 conda create -n pyvcham python=3.12
# 2. Activate it
conda activate pyvcham
# 3. Permanently lock the architecture configuration
conda config --env --set subdir osx-arm64
# 4. Verify architecture (Output must be 'arm64')
python -c "import platform; print(platform.machine())"
Step 2: Install PyVCHAM
Once your environment is active, ensure pip is up to date (crucial for resolving modern wheels) and then install the package.
# 1. Upgrade pip
python -m pip install --upgrade pip
# 2. Install PyVCHAM
pip install pyvcham
For Developers
If you want to modify the source code:
git clone https://gitlab.com/tc-heidelberg/pyvcham.git
cd pyvcham
pip install -e ".[dev]"
Running Examples
If you plan to run the tutorials or examples provided in the documentation, please install Pandas:
pip install pandas
Usage
PyVCHAM enables the construction of VC Hamiltonians using a multi-point approach, fitting ab initio data to analytical potential energy surfaces. A typical workflow includes:
- Prepare Input Data: Gather normal mode data, ab initio energies, symmetry information, and harmonic frequencies.
- Build Database: Create a Python object containing the input data.
- Optimize Parameters: Use PyVCHAM to fit the VC Hamiltonian parameters, starting with linear vibronic coupling (LVC) and adding higher-order terms as needed.
- Export Results: Save the optimized Hamiltonian in the standardized JSON format.
For detailed examples and instructions, refer to the documentation.
Standardized JSON Format
PyVCHAM introduces a standardized JSON format to store VC Hamiltonians, promoting data exchange and compatibility with quantum dynamics tools. The format includes:
- General Data: System-wide details, ab initio information, and custom functions.
- VC Hamiltonian: Reference geometry, units, state and mode counts, symmetry data, vertical energies, dipole matrices, and LVC parameters.
- Interactions (optional): Parameters for intermolecular interactions in multi-molecule systems.
This structure ensures portability and usability across platforms. Explore examples in the repository (e.g., Examples/li3/results/lvc_li3.json).
License
PyVCHAM is released under the MIT License.
Citations
If you use PyVCHAM in your research, please cite our paper:
[In preparation]
PyVCHAM builds on foundational work in vibronic coupling, including:
- Köppel, H.; Domcke, W.; Cederbaum, L. S. "Multimode Molecular Dynamics Beyond the Born-Oppenheimer Approximation," Advances in Chemical Physics 1984, 57, 59–246.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyvcham-1.0.0.tar.gz.
File metadata
- Download URL: pyvcham-1.0.0.tar.gz
- Upload date:
- Size: 44.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c553bee5d82c06b8ede0abc7f80b227d8453de742f02bd92466a021c71c5201e
|
|
| MD5 |
026e71b1276a10c9f2ddc680a070b716
|
|
| BLAKE2b-256 |
ef83fdec54ba1f7c47e06227f6b2427c4edb28ee4e312f042f0ec2735aaed973
|
File details
Details for the file pyvcham-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyvcham-1.0.0-py3-none-any.whl
- Upload date:
- Size: 41.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fd078a6b168d73a8c40449e4bbbf669e0bd91f7ebc6def7c4abe3bac17520f3
|
|
| MD5 |
32cd03b7aa686dbbeea4df34f1df871f
|
|
| BLAKE2b-256 |
be38011f6fe55e88c85f0252fc42b747347af2bf41ca82e5b0c09c9844671651
|