Buildamol

Latest version: v1.2.8

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

3.10

Biobuild is a molecular building suite designed to facilitate the creation of large biomolecules such as glycans.
It allows for an easy molecule creation process in a jupyter-notebook environment. Biobuild offers direct integrations
to [PubChem](https://pubchem.ncbi.nlm.nih.gov), and the [PDBE component library](https://www.google.com/search?client=safari&rls=en&q=pdbe+component+library&ie=UTF-8&oe=UTF-8) as well as the [CHARMM project](http://charmm-gui.org) for pre-defined component structures and linkage types.

Biobuild 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

Biobuild cannot:
----------------
- generate circular structures (users need to choose suitable templates with rings already present)
- imitate real-life chemical reaction mechanisms
- perform molecular dynamics or quantum chemistry computations
- generate molecules _for_ the user - the user needs to know what they want to build...

Example - building a dendrimer
------------------------------

Let's build a polyphenylene dendrimer

python
import biobuild as bb

bb.load_small_molecules()

benzene = bb.molecule("benzene")

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

set up the linkage instructions
always shifting the carbon at which to attach
link = bb.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 = bb.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")


![](support/graphics/polyphenylene.gif)

1.2.8

New Extension - Molecular Factories

The new `molecular_factories` extension includes two classes to assemble and derive molecules combinatorially. Documentation on the new extension can be found [here](https://biobuild.readthedocs.io/en/dev/buildamol.extensions.factories.html#factories).

The Assembler

The `Assembler` class can assemble fragments from a library into molecules. This is a slightly more generic implementation of the code presented in the automated ligand-design pipeline. The class can be used to sample molecular candidates from "candidate space" (i.e., produce random molecules by combining fragments) or create molecules explicitly from an array input (useful for optimization procedures).

The Derivator
The `Derivator` class can create modified versions of a specified molecule, which we call _derivatives_, hence the name. There is also a new [Tutorial](https://biobuild.readthedocs.io/en/dev/examples/derivator_example.html) that exemplifies the usage of the Derivator.

Available modifications are:
- changing elements of atoms
- changing bond orders
- adding functional groups to specific positions
- globally modifying molecules by arbitrary functions

The Derivator can sample molecular candidates just like the Assembler but, in addition, also produce _all_ combinatorically possible derivatives given the desired modifications.

Other Notable Changes

Changes in Modifier Functions

- `amidate` was wrongly named (it was doing _amination_, after all). Now `amidate` will add an **amide** group and `aminate` (new function) will add an **amine** group!
- Residues added by `hydroxylate` are now named `OH` instead of `HOH` (the old name was causing trouble with some PDB reading software that were excluding hydroxyl groups for being "water" due to the residue name)
- `carboxylate` now adheres to the standard naming scheme and calls the atoms `O`, `OXT`, and `HXT` (instead of the current O1, O2, H2)

Refactored Functional Groups

The functional groups (in `structural.groups`) received a significant refactoring. A `BaseFunctionalGroup` class now brings most of the generic features of functional group objects such as `find_matches`, but does not implement any details on the mechanics of finding these matches. This job is carried out by daughter classes. The `FunctionalGroup` (now a daughter of `BaseFunctionalGroup`) serves as the base class for groups defined explicitly by a _single geometry_ around a central atom. The aromatic group is now handled by a separate class `AromaticGroup` - this was the primary reason for the refactor.

What does this mean for users/devs? If you have defined a custom functional group, check if it can still inherit from `FunctionalGroup` (i.e. is defined via a single geometry) or if it should inherit directly from `BaseFunctionalGroup` (i.e. is a little more complex like an aromatic ring).

Miscellaneous Changes

- In-place optimization with RDKit should work now properly
- `rdkit_optimize` now allows to use either `mmff` or `uff` as the force field.
- New methods `Molecule.single(...)`, `Molecule.double(...)`, and `Molecule.triple(...)` to set bond orders more conveniently than just `Molecule.set_bond_order(...)`
- `Residue` objects can now use `name` as a synonym to `resname`
- `is_cis`and `is_trans` received an update that should make them more robust when it comes to symmetric molecules
- `infer_bond_orders` received an update that should make it a little faster
- other bug fixes and small performance enhancements

v.1.2.6
This release of BuildAMol features a small code change that makes BuildAMol now compatible with several older Python versions.

Specifically, BuildAMol should be able to run on:
- Python 3.8 (tested on 3.8.19)
- Python 3.9 (tested on 3.9.19)
- Python 3.10 (tested on 3.10.14)
- Python 3.11 (main development on 3.11.0)
- Python 3.12 (tested on 3.12.2)

BuildAMol uses some string formatting features that make it unable to run on Python 3.7 and earlier. There are no plans to refactor the string formatting to add support for older Python versions.

v.1.2.5
This release of BuildAMol introduces new bioinformatics-related extensions, has a few bug fixes, and, again, slightly refactored architecture to improve compatibility across systems (see below).

New Features
- Extended `bio` extension
- The `bio.proteins` extension now has functions to compute `phi`, `psi` and `omega` angles of polypeptides.
- New `bio.glycans` extension can model glycans from IUPAC string input
- New `bio.lipids` extension offers functions to build:
- fatty acids
- triacylglycerols
- phospholipids
- sphingolipids
- Protonation status can now be changed automatically when changing bond orders and setting atom charges
- The use of Internal Coordinates (IC) when connecting molecules can now be globally disabled using `dont_use_ic()` (and re-enabled using `use_ic()`). This is useful if a given linkage with IC specifies relative coordinates for the wrong stereoisomer of a fragment molecule. Of course, `Molecule.attach(..., use_patch=False)` (or `Molecule.stitch_attach(...)`) can still be used to manually ensure that no ICs are involved in the process on an individual basis.

Technical changes
- The `base_classes` are no longer part of the `core` package but a stand-alone module.
The accessibility of the defined objects (Atom, etc.) has not changed. But be sure to change any direct imports to the module from
python
import buildamol.core.base_classes as ...
or
from buildamol.core import base_classes as ...

to
python
import buildamol.base_classes as ...
or
from buildamol import base_classes as ...

- Annoying warnings from repeated built-in dataset loading are now suppressed
- The utility progress bar `utils.auxiliary.progress_bar` can now use `tqdm` or `alive_progress` as backend.

Notable bug fixes
- Coordinate bleeding when getting reference compounds from the built-in datasets is fixed now. There was an issue that coordinates between molecules were shared if they were obtained by multiple calls to `get_compound` or `Molecule.from_compound` (or the `molecule` function) instead of through the `Molecule.copy` method.
- Fragment mirroring in `Molecule.stitch_attach` is fixed now. There was an issue that in some cases the rotation matrix computed in the `Stitcher` class contained a negative determinant leading to the `source` molecule being mirrored. This should now not happen anymore.

1.2.0

This update contains refactorings in the code architecture and imports to improve compatibility with different python environments.
Also, there are some small bug fixes to improve atom getting, and easier model merging for related Molecule objects.

1.1.67

The first release of the new BuildAMol successor library of Biobuild. BuildAMol comes with a great number of new features and performance enhancements. No further releases are planned for Biobuild, users are asked to switch to BuildAMol. Biobuild code should be compatible with BuildAMol in most cases, so a change of imports should suffice.


New Features
- New _Extensions_ package with pre-implemented workflows for molecules such as peptides, metal complexes, or nanotubes
- New support for functional groups and pseudo-chemical reactions
- Extended optimization suite with new environments for more versatile optimization problems
- Optional performance enhancements with Numba and parallel computations
- Extended visualization suite with flexible backend and a new focus on [Py3DMol](https://william-dawson.github.io/using-py3dmol.html).
- New methods for absolute molecule placement such as alignment to axes or superimposing to reference coordinates
- New interface with the [Stk library](https://github.com/lukasturcani/stk)
- New file format support for XML (to eventually replace JSON encoding as generic export format)
- Ability to access atoms and other objects from multiple Molecule instances to allow more complex systems

Of course, BuildAMol also contains many bug fixes and general improvements with regard to code versatility and speed.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.