Skip to main content

A fragment-based molecular assembly toolkit for python.

Project description



cite - BMC Cheminformatics version DOI - 10.5281/zenodo.13169192 Made with Python Documentation Status Check out - Tutorials PyPI version Downloads code style - black CodeFactor

BuildAMol is a molecular building suite designed to facilitate the generation and alteration of atomic models for large and small chemical structures.

It allows for an easy modeling process inside a Jupyter Notebook or can be integrated into automated pipelines. BuildAMol offers direct integrations to PubChem, and the PDBE component library as well as the CHARMM project to provide pre-defined template structures and linkages to use out-of-the-box. Quick-conversions to popular libraries such as RDKit allow for a smooth workflow, going from modeling to analysis.

BuildAMol allows users to:

  • build any larger molecular structure they like
  • improve the conformation of an existing structure
  • convert data formats
  • visualize the structures as they build them
  • quickly obtain molecular structures for chemical compounds

BuildAMol cannot:

  • imitate real-life chemical reaction mechanisms
  • perform molecular dynamics or quantum chemistry computations
  • generate molecules for the user out of the blue - the user needs to know what they want to build...

Installing BuildAMol

BuildAMol can be installed via pip using:

pip install buildamol

Getting Started

BuildAMol has a comprehensive documentation on ReadTheDocs. There you can find also also a number of tutorials to get you started on the API covering both basic operations as well as more complex and applied workflows such as building materials, preparing molecules for molecular dynamics, or designing protein ligands.

BuildAMol Paper

To learn more about the benchmarking we did and further details on the software, please check out the BuildAMol paper. Also, if you were using BuildAMol for your project, please cite the paper :heart:

@article{buildamol,
	author = {Kleinschmidt, Noah and Lemmin, Thomas},
	journal = {Journal of Cheminformatics},
	number = {1},
	pages = {104},
	title = {BuildAMol: a versatile Python toolkit for fragment-based molecular design},
	volume = {16},
	year = {2024}}

Quick Example - Building A Dendrimer

Open In Colab

This code will model a polyphenylene dendrimer as it was originally described by Bauer et al. (2002).

import buildamol as bam

bam.load_small_molecules()

benzene = bam.molecule("benzene")

# -----------------------------
#     make the periphery
# -----------------------------
periphery = benzene.copy()

# set up the linkage instructions
# always shifting the carbon at which to attach
link = bam.linkage("C1", "C1")
for carbon in range(1, 6):
    link.atom1 = f"C{carbon}"
    periphery.attach(benzene, link, at_residue=1)

# -----------------------------
#     assemble the molecule
# -----------------------------
mol = benzene.copy()
link2 = bam.linkage("C1", "C4")

# and attach the periphery to the core
for carbon in mol.get_atoms("C", by="element"):
    link2.atom1 = carbon
    mol.attach(periphery, link2, at_residue=1, other_residue=2)

# -----------------------------
#   optimize the conformation
# -----------------------------
mol.optimize()
mol.to_pdb("polyphenylene.pdb")

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

buildamol-1.2.8.tar.gz (17.2 MB view details)

Uploaded Source

Built Distribution

buildamol-1.2.8-py3-none-any.whl (18.3 MB view details)

Uploaded Python 3

File details

Details for the file buildamol-1.2.8.tar.gz.

File metadata

  • Download URL: buildamol-1.2.8.tar.gz
  • Upload date:
  • Size: 17.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for buildamol-1.2.8.tar.gz
Algorithm Hash digest
SHA256 c118d57e4c6fe9276ed75771f54848d20413db0a0d1724070df1ccc78e30122f
MD5 ffb241a5096410a477b253c1cd8acbda
BLAKE2b-256 28041989c8320f3a6f6bc3ea118544e5207902c1856815b10cb88168de531115

See more details on using hashes here.

File details

Details for the file buildamol-1.2.8-py3-none-any.whl.

File metadata

  • Download URL: buildamol-1.2.8-py3-none-any.whl
  • Upload date:
  • Size: 18.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for buildamol-1.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7e5ea85102e23bd9135feb506e212c5ac00b88becdf0ef5c1baadac07bc656a3
MD5 fb2a27019395939ef30c66075d4e20d1
BLAKE2b-256 4ab98fa17bd372718da4966613a9cadbce5289a27f9fe482ecaab5cdeb23d823

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page