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.5.3.tar.gz (25.9 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.5.3-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file qm_tools_aw-1.5.3.tar.gz.

File metadata

  • Download URL: qm_tools_aw-1.5.3.tar.gz
  • Upload date:
  • Size: 25.9 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.5.3.tar.gz
Algorithm Hash digest
SHA256 c7e322f249cd0b18ca09b952137e52f762003cca5437f7683bf023235624e52a
MD5 085c95e5324afb084adfa91dce0dea37
BLAKE2b-256 1914db963e91f639f286ea024cdba2391260db8af98d2eb8bd596e9bd34b89d3

See more details on using hashes here.

File details

Details for the file qm_tools_aw-1.5.3-py3-none-any.whl.

File metadata

  • Download URL: qm_tools_aw-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 25.8 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.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d6341d398a5238566c930cbf0dcae218e36eb9c9f7857820842879c89897d17
MD5 d016562df47e1ac544394251c755e92f
BLAKE2b-256 0f498340d97330d2c15dad91f861d6771f1fdf55519f05b495ccfbb896d4ac29

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