Provides some functions that I have found value in reusing for quantum chemistry related tasks.
Project description
QM-Tools-AW
A collection of quantum mechanics and computational chemistry tools for data analysis, visualization, and manipulation.
Installation
pip install qm-tools-aw
Features
General Utilities
- File I/O operations (JSON, pickle)
- Molecular geometry manipulation and conversion
- Handling of various file formats (XYZ, PDB, Psi4 input)
- Distance calculations and molecular structure analysis
- Visualization helpers (e.g., PyMOL script generation)
Plot Utilities
- Violin plots for error analysis with customizable aesthetics
- Support for statistical visualizations of computational chemistry data
SAPT Analysis
- Symmetry-Adapted Perturbation Theory (SAPT) term computation for higher-order SAPT mimicking Psi4 but on a pandas DataFrame
Software Access
- Interface with external chemistry software
- Tools for working with
checkmolfor functional group analysis
Usage Examples
Create Violin Plots for Error Analysis
import pandas as pd
import numpy as np
from qm_tools_aw.plot import violin_plot
# Create sample data
df = pd.DataFrame({
'MP2': np.random.normal(0.5, 5, 1000),
'HF': np.random.normal(-0.5, 5, 1000),
})
# Create violin plot
violin_plot(
df,
{'MP2 Method': 'MP2', 'HF Method': 'HF'},
output_filename="method_comparison",
ylim=[-25, 25],
plt_title="Method Error Comparison"
)
Results: Plotting method_comparison
Process Molecular Geometries
from qm_tools_aw.tools import read_xyz_to_pos_carts, write_cartesians_to_xyz, print_cartesians_pos_carts
# Read XYZ file
pos, carts = read_xyz_to_pos_carts("molecule.xyz")
# Manipulate coordinates
carts[:, 0] += 1.0 # Shift x coordinates
# Write modified structure
write_cartesians_to_xyz(pos, carts, "modified.xyz")
print_cartesians_pos_carts(pos, carts)
Results:
8 0.2978039460 -0.0560602560 0.0099422620
1 -0.0221932240 0.8467757820 -0.0114887140
1 1.2575210620 0.0421214960 0.0052189990
Documentation
For detailed documentation on all functions and classes, refer to the docstrings in the source code.
Dependencies
- NumPy
- Pandas
- Matplotlib
- QCElemental
- Other standard Python libraries
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 qm_tools_aw-1.4.5.tar.gz.
File metadata
- Download URL: qm_tools_aw-1.4.5.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23ac771875c507cabb88525824e1545244263b728953ebd4b673bac82065ead5
|
|
| MD5 |
06b75fa3900fa25f2e0cc1d54b976d25
|
|
| BLAKE2b-256 |
90b3e8a4e643eb8d49e1841e022fc01f25e481c2bf90735e5208ed5dcda94e0a
|
File details
Details for the file qm_tools_aw-1.4.5-py3-none-any.whl.
File metadata
- Download URL: qm_tools_aw-1.4.5-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10ccc4f01d8ffc515f2d1ff06c23c635cbde6fa0191545d9f3e4465627607197
|
|
| MD5 |
313d0f9ae89b4b396c36695a2b979e90
|
|
| BLAKE2b-256 |
b3a22529b902c76cfed6e488f008f4812020f094b8488b3575b0b5f3b743dfb4
|