Skip to main content

zincware codecov PyPI version DOI Docs status Ask DeepWiki

molify - Molecular Structure Interface with RDKit, ASE, Packmol and NetworkX

Installation via pip install molify. For more information please visit the documentation.

A common use case is to create 3D structures from SMILES strings. This can be achieved using the molify.rdkit2ase function.

import ase
from rdkit import Chem
from molify import rdkit2ase, ase2rdkit

mol = Chem.MolFromSmiles("O")
atoms: ase.Atoms = rdkit2ase(mol)
mol = ase2rdkit(atoms)

Because this is such a common use case, there is a convenience function molify.smiles2atoms that combines the two steps.

import ase
from molify import smiles2atoms

atoms: ase.Atoms = smiles2atoms("O")

print(atoms)
>>> Atoms(symbols='OH2', pbc=False)

Command Line Interface

Commands mirror the molify functions and write to standard output. --format takes any ASE format name or extension, defaulting to extxyz.

molify smiles2atoms CCO > etoh.xyz

Packmol Interface

Given the molecular units, you can build periodic boxes with a given density using the molify.pack function.

The molify package ships with an installation of packmol. If you like packmol, give it a star on GitHub!

from molify import pack, smiles2conformers

water = smiles2conformers("O", 2)
ethanol = smiles2conformers("CCO", 5)
density = 1000  # kg/m^3
box = pack([water, ethanol], [7, 5], density)
print(box)
>>> Atoms(symbols='C10H44O12', pbc=True, cell=[8.4, 8.4, 8.4])

Many additional features are described in the documentation.

Metadata

Release files for molify 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for molify 0.2.7
File Size Uploaded
molify-0.2.7.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for molify 0.2.7
File Interpreter ABI Platform
molify-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / molify-0.2.7.tar.gz

Download URL molify-0.2.7.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7445166525b09dba7d09aef13fbadcf9202be2597352a839c54c484a87e6909c
BLAKE2b-256 checksum
How to use checksums
b881b49c623a44f59c128482e1fe5b718001297a8e6bfd092d482b6c0c544c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / molify-0.2.7-py3-none-any.whl

Download URL molify-0.2.7-py3-none-any.whl
Size 36.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e5276c81702988535a4557ce456076f10a243407d1986ca0207571767b5bb3c
BLAKE2b-256 checksum
How to use checksums
45552e37b6f9430123f7d5c9278a441c3a0b76331c71c4dd42796f21d9739c74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log
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