{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Conformational Optimization"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"> ### In this tutorial we will cover:\n",
"> - how we can optimize conformations in BuildAMol"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When building a molecule we usually prefer having conformations without clashing atoms. While BuildAMol tries its best to avoid clashes during fragment assembly, sometimes they still happen, especially when merging larger structures together. \n",
"\n",
"To get rid of them again, BuildAMol offers a suite of optimization techniques to obtain better conformations for your molecules. BuildAMol optimized molecules by rotating around bonds within the structures. This ensures that the resulting conformations are never skewed and can be faster than classical \"atom wiggling\" techniques. The downside of it is that small changes in rotational angles can have large effects on the evaluation of a conformation, which can be challenging to optimize for some algorithms. \n",
"\n",
"We will go through how we can optimize molecules in BuildAMol and discuss some good and bad practices."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's work on the following molecule:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import plotly\n",
"plotly.offline.init_notebook_mode()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "849ee2ebff2b4335bb38e4401f8e7cba",
"version_major": 2,
"version_minor": 0
},
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/noahhk/anaconda3/envs/glyco2/lib/python3.11/site-packages/plotly/express/_core.py:1985: FutureWarning:\n",
"\n",
"When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.\n",
"\n"
]
},
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"customdata": [
[
"O7",
1,
1,
"PRP",
"A"
],
[
"O",
35,
2,
"SER",
"A"
],
[
"OG",
37,
2,
"SER",
"A"
],
[
"OXT",
38,
2,
"SER",
"A"
],
[
"O3",
43,
3,
"TBA",
"A"
],
[
"O1",
44,
3,
"TBA",
"A"
],
[
"O2",
77,
5,
"HAC",
"A"
],
[
"O1",
78,
5,
"HAC",
"A"
],
[
"O7",
84,
6,
"PRP",
"A"
],
[
"O",
118,
7,
"SER",
"A"
],
[
"OG",
120,
7,
"SER",
"A"
],
[
"OXT",
121,
7,
"SER",
"A"
],
[
"O3",
126,
8,
"TBA",
"A"
],
[
"O1",
127,
8,
"TBA",
"A"
]
],
"hovertemplate": "atom_element=O
x=%{x}
y=%{y}
z=%{z}
__marker_size=%{marker.size}
atom_id=%{customdata[0]}
atom_serial=%{customdata[1]}
residue_serial=%{customdata[2]}
residue_name=%{customdata[3]}
chain_id=%{customdata[4]}
x=%{x}
y=%{y}
z=%{z}
__marker_size=%{marker.size}
atom_id=%{customdata[0]}
atom_serial=%{customdata[1]}
residue_serial=%{customdata[2]}
residue_name=%{customdata[3]}
chain_id=%{customdata[4]}
x=%{x}
y=%{y}
z=%{z}
__marker_size=%{marker.size}
atom_id=%{customdata[0]}
atom_serial=%{customdata[1]}
residue_serial=%{customdata[2]}
residue_name=%{customdata[3]}
chain_id=%{customdata[4]}
x=%{x}
y=%{y}
z=%{z}
__marker_size=%{marker.size}
atom_id=%{customdata[0]}
atom_serial=%{customdata[1]}
residue_serial=%{customdata[2]}
residue_name=%{customdata[3]}
chain_id=%{customdata[4]}
x=%{x}
y=%{y}
z=%{z}
__marker_size=%{marker.size}
atom_id=%{customdata[0]}
atom_serial=%{customdata[1]}
residue_serial=%{customdata[2]}
residue_name=%{customdata[3]}
chain_id=%{customdata[4]}