Skip to main content

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 checkmol for 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qm_tools_aw-1.4.5.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qm_tools_aw-1.4.5-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

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

Hashes for qm_tools_aw-1.4.5.tar.gz
Algorithm Hash digest
SHA256 23ac771875c507cabb88525824e1545244263b728953ebd4b673bac82065ead5
MD5 06b75fa3900fa25f2e0cc1d54b976d25
BLAKE2b-256 90b3e8a4e643eb8d49e1841e022fc01f25e481c2bf90735e5208ed5dcda94e0a

See more details on using hashes here.

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

Hashes for qm_tools_aw-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 10ccc4f01d8ffc515f2d1ff06c23c635cbde6fa0191545d9f3e4465627607197
MD5 313d0f9ae89b4b396c36695a2b979e90
BLAKE2b-256 b3a22529b902c76cfed6e488f008f4812020f094b8488b3575b0b5f3b743dfb4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page