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.

Download files

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

Source Distribution

molify-0.2.6.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

molify-0.2.6-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file molify-0.2.6.tar.gz.

File metadata

  • Download URL: molify-0.2.6.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for molify-0.2.6.tar.gz
Algorithm Hash digest
SHA256 11280d889663f4442275b0b4ee9a5fc016fd19fc2b4c5e7fd0a35de4649d3c7c
MD5 587687bd5094d032ad2428f302ef42e8
BLAKE2b-256 0633d276019406eb6e0f8699969b54744bfbaf1fbfc1c44969e7dfd3fa06b522

See more details on using hashes here.

Provenance

The following attestation bundles were made for molify-0.2.6.tar.gz:

Publisher: build-wheels.yaml on zincware/molify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file molify-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: molify-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for molify-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3edc36072d849835cf31fdcd3c5d9cd6e19ef236b4edb4f43a9fc93e27a487b3
MD5 c30369142e3ea7a374d2b252cbd61bff
BLAKE2b-256 de9763484e457c5efd27e20626fd194d4f6fbf063190681c98feb02434c26e15

See more details on using hashes here.

Provenance

The following attestation bundles were made for molify-0.2.6-py3-none-any.whl:

Publisher: build-wheels.yaml on zincware/molify

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

55 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