Skip to main content

graphpancake

GitHub Actions Build Status codecov

graphpancake is a Python library for generating molecular graphs of small organic molecules (elements H, B, C, N, O, F, Si, P, S, Cl, Br, I) from electronic structure theory (i.e., DFT and WFT quantum chemistry calculations).

Outputs from DFT calculations (.xyz coordinates), Natural Population Analysis (NPA) from JANPA, Natural Bond Orbital (NBO) analysis, and thermodynamic data from Shermo are parsed to extract atom (node), bond (edge), and graph-level features.

Essentially, graphpancake takes three-dimensional data and flattens it into molecular graph representations, because computers haven't taken organic chemistry class...


Installation

Setup with Conda (Recommended)

Create a complete conda environment with all dependencies:

# Clone or download the environment.yml file from the repository
curl -O https://raw.githubusercontent.com/sneha-sil/graphpancake/main/environment.yml

# Create and activate the environment
conda env create -f environment.yml
conda activate graphpancake-env

Alternative Installation Methods

Using pip

pip install graphpancake

Basic usage example

## Example: Single-molecule processing using the command line interface
graphpancake create-db database_name.db

graphpancake load-data --database database_name.db --xyz-file pentane.xyz --shermo-output pentane_shermo.txt --janpa-output pentane.JANPA --nbo-output pentane_nbo.out --mol-id pentane_QM --smiles "CCCCCC" --graph-type QM

A full list of commands and options are available using:

graphpancake --help

If the graphpancake command is not available, you can also use python -m graphpancake.cli.


Example: Batch processing of several molecules using scripts

Batch processing works best when you have a folder or gzip file of hundreds or thousands of data files, with a corresponding CSV of identification names and SMILES strings. Examples are available in the auxiliary graphpancake_data.zip folder from Releases page.

  1. Make a copy of config_template.yaml, rename as config.yaml
  2. Adjust file names and operation settings as necessary
  3. Run the script (python -m graphpancake.batch_processing -config config.yaml). A database .db file will be created with all of your molecular graph data.

Documentation

Full documentation is available at:
https://graphpancake.readthedocs.io/


References

  • Neese, F. et al. The ORCA quantum chemistry program package. J. Chem. Phys. 2020, 152, 224108
  • Nikolaienko et al. JANPA: an open source cross-platform implementation of the Natural Population Analysis on the Java platform, Computational and Theoretical Chemistry 2014, 1050, 15-22, DOI: 10.1016/j.comptc.2014.10.002, http://janpa.sourceforge.net
  • Glendening, E. D., Landis, C. R., Weinhold, F. NBO 7.0: New vistas in localized and delocalized chemical bonding theory. Journal of Computational Chemistry 2019, 40 (25), 2234-2241. https://doi.org/10.1002/jcc.25873
  • Tian, L., Qinxue, C., Shermo: A general code for calculating molecular thermodynamic properties, Comput. Theor. Chem. 2021, 1200, 113249 DOI: 10.1016/j.comptc.2021.113249

Citation

If you use graphpancake in your research, please cite this repository and the relevant references above.

Sil, S., Maskeri, M. A., Scheidt, K.A. 2025. graphpancake: A Python package for representing organic molecules as molecular graphs utilizing electronic structure theory.

DOI: 10.5281/zenodo.17553385


License

MIT License. See LICENSE for details.


Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.11. Code written with assistance from Claude Sonnet 4.

Download files

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

Source Distribution

graphpancake-1.0.1.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

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

graphpancake-1.0.1-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file graphpancake-1.0.1.tar.gz.

File metadata

  • Download URL: graphpancake-1.0.1.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.0

File hashes

Hashes for graphpancake-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b9d81940627cb0d5b0a688182a9cbf12528d3b9a3e0156494855ca78458b3977
MD5 f2b862fc87d1fe8f97fc4572956a22f7
BLAKE2b-256 115599bb53614aac3c9e2410a6908643160693731b2f51d66deb76d973605e76

See more details on using hashes here.

File details

Details for the file graphpancake-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: graphpancake-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 60.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.0

File hashes

Hashes for graphpancake-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32b5e0a5af89c79e34ea02b3a532ea0a9b1324231f479901a452690ea6dd10a3
MD5 6d8ce7e96d0bc7c880d922e40c83818c
BLAKE2b-256 923d2a4857f7dfd14776198700d2528975fba8ac85b6e28ebcc5a0ebd0e1aec5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page