Skip to main content

A fragment-based molecular assembly toolkit for python.

Project description



cite - BMC Cheminformatics version DOI - 10.5281/zenodo.12581092 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.9.tar.gz (17.2 MB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for buildamol-1.2.9.tar.gz
Algorithm Hash digest
SHA256 7bd04e8ab20aac4205e33dd0b6471fa51b78c88000ddc4115e245a1f927e015d
MD5 e98bc8f23a2a4c0ae93e467440a4b3f5
BLAKE2b-256 42dcb78a89cca88cd66c2dd53a28a599e95cb2e89d1cdc2f6d32f18589fb5d59

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for buildamol-1.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6852f44888ebe80c53b7d389bbc39af79d592fb420ca82067b51bff4d57fb4a1
MD5 c77ffd8db8364ddec5842bc5352bf1d6
BLAKE2b-256 bf70ce01e588daac083d30f0bad05bfd0b3132b79279211d7cc20ea604f99054

See more details on using hashes here.

Supported by

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