{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "> ### In this tutorial we will cover:\n", "> - which built-in resources are available\n", "> - how to set your own default settings" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Built-in resources\n", "\n", "BuildAMol has three built-in data resources: the _CHARMM_ force field, the _PDBE compound library_, and _PubChem_ (remotely queried)." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "```mermaid\n", "\n", "flowchart TB\n", " node_1((\"CHARMM\"))\n", " node_2[\"pre-defined linkages\"]\n", " node_3((\"PDBE Compounds\"))\n", " node_4[\"small molecules\"]\n", " node_5((\"PubChem\"))\n", " node_7[\"amino acids\"]\n", " node_8[\"sugars\"]\n", " node_9[\"lipids\"]\n", " node_6[\"any other available molecule\"]\n", " node_10[\"nucleotides\"]\n", " node_1 --> node_2\n", " node_3 --> node_4\n", " node_3 --> node_7\n", " node_3 --> node_8\n", " node_3 --> node_9\n", " node_5 --> node_6\n", " node_3 --> node_10\n", "\n", "\n", "```" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import buildamol as bam\n", "bam.visual.set_backend(\"py3dmol\")" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### CHARMM Force Field\n", "\n", "In order to connect molecules together, the user may define their own `Linkage` by specifying which atoms to connect and which atoms to remove in the process. However, to make life easier, BuildAMol` references the CHARMM force field which already specifies a number of linkage types - so-called `patches`. Each _patch_ specifies the atoms to connect and remove as well as the _internal coordinates_ around the newly formed bond. This allows BuildAMol to generate structures by pure matrix transformation as the resulting geometry is already specified. " ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "We can check what linkages are available by default using:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[Linkage(SCK0), Linkage(SCK1), Linkage(LLLO), Linkage(CERA), Linkage(CERB), Linkage(DAGA), Linkage(DAGB), Linkage(INS2A), Linkage(INS2B), Linkage(INS6A), Linkage(INS6B), Linkage(SGPA), Linkage(TGPA), Linkage(SGPB), Linkage(TGPB), Linkage(NGLA), Linkage(11aa), Linkage(11ab), Linkage(11bb), Linkage(12aa), Linkage(12ab), Linkage(12ba), Linkage(12bb), Linkage(13aa), Linkage(13ab), Linkage(13ba), Linkage(13bb), Linkage(14aa), Linkage(14ab), Linkage(14ba), Linkage(14bb), Linkage(16aa), Linkage(16ab), Linkage(16ba), Linkage(SUCR), Linkage(LCTL), Linkage(AB15), Linkage(SA23AB), Linkage(LINK)]\n" ] } ], "source": [ "print(bam.available_linkages())" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Each linkage is identified by an ID within the CHARMM force field - e.g. `12aa` stands for the `1->2 alpha glycosydic linkage`. Each of the pre-defined available linkages can be referenced by their (string) id when connecting molecules together.\n", "\n", "For example, we can connect two mannoses using a `12aa` linkage by:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/3dmoljs_load.v0": "
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol