Skip to content

Releases: kmmukut/PyPack

PyPack v1.0.0: Initial Release

Choose a tag to compare

@kmmukut kmmukut released this 10 Aug 08:20

PyPack v1.0.0: Initial Release

We are excited to announce the first official release of PyPack!

PyPack is a Python toolkit for building molecular simulation systems directly from SMILES strings or structure files. It enables the collision-free packing of diverse molecules into 3D periodic boxes, with on-the-fly conformer generation to ensure maximum structural variety in the final system.

This initial release establishes the core functionality for creating and exporting complex molecular systems for simulations.

Key Features:

  • Flexible Molecule Input: Build systems using SMILES strings or from common structure files (.xyz, .mol, .sdf).
  • On-the-Fly Conformer Generation: At placement time, a fresh, random conformer is generated for each molecule using RDKit and Open Babel, maximizing the diversity of the packed system.
  • Collision-Aware Packing: Utilizes a cKDTree algorithm to ensure that all packed molecules respect a user-defined minimum interatomic distance.
  • LAMMPS & XYZ Export: Save the generated system as a LAMMPS .data file (with support for multiple atom styles) or a standard .xyz file for visualization.
  • Dual Interfaces:
    • A modern Tkinter GUI with live log output for an interactive workflow.
    • A powerful Command-Line Interface with JSON-based input for easy scripting and automation.
  • Robust Packing Algorithm: Features random 3D rotation, an auto-resizing box that expands if packing fails, and a configurable number of placement attempts per molecule.

Getting Started

  1. Install Dependencies:
    pip install numpy scipy openbabel rdkit ase
  2. Run PyPack:
    • To use the graphical interface:
      python gui.py
    • To use the command-line interface with an example file:
      python pypack.py --json example_molecules.json

This release is made possible by the foundational work of the teams behind Open Babel, RDKit, and ASE. We welcome your feedback and hope PyPack proves useful for your simulation work!