{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Building Polyphenylene\n",
"\n",
"In this tutorial we will build the first reported dendrimer polyphenylene By Mullen et al. \n",
"\n",
"\n",
"\n",
"\"Single-Crystal Structures of Polyphenylene Dendrimers\". Chemistry: A European Journal. 8 (17): 3858–3864. 2002. doi:10.1002/1521-3765(20020902)8:17<3858::AID-CHEM3858>3.0.CO;2-5."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can generate the entire structure using benzene fragments. Because there are many fragments connecting to the same residues, we can automate some of the process using for-loops to make our life just a little bit easier. So let's get started!"
]
},
{
"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": [],
"source": [
"import buildamol as bam"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First let's get the benzene"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# we load the reference data for small molecules (containing benzene)\n",
"# (this is technically not necessary, since BuildAMol will automatically\n",
"# query PubChem for any unloaded compounds, but it's a good practice to load the molecules\n",
"# to make sure the atom labels are consistent)\n",
"bam.load_small_molecules()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"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": [
[
"C1",
1,
1,
"BNZ",
"A"
],
[
"C2",
2,
1,
"BNZ",
"A"
],
[
"C3",
3,
1,
"BNZ",
"A"
],
[
"C4",
4,
1,
"BNZ",
"A"
],
[
"C5",
5,
1,
"BNZ",
"A"
],
[
"C6",
6,
1,
"BNZ",
"A"
]
],
"hovertemplate": "atom_element=C
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]}