{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Creating a Solvation Box\n",
"\n",
"> ### In this tutorial we will cover:\n",
"> - how we can use the Extension's PDBFixer integration to solvate a molecule\n",
"> - how we may use BuildAMol to create a solvation box from scratch"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When performing molecular dynamics (MD) the question of solvent can be addressed in two ways. Either there are explicit solvent molecules added to the simulation system or the solvent effects are implicitely included when computing the energy heuristic. \n",
"\n",
"There are great software tools around that can generate solvation boxes around molecules of interest, often working in synergy with the MD engine you are going to use later on. As such, it is always a good idea to use a dedicated tool that can do exactly what you need. BuildAMol does not itself concern itself with MD or solvation processes, and therefore does not offer a built-in method to create solvation boxes. However, there are still ways we can construct such systems with a little creativity. The purpose of this tutorial is two-fold. For once, we will see how we can create a bounding box using an established software-port (PDBFixer), and secondly, we will see a from-scratch construction of a (admittedly somewhat crystalline) bounding box that may not be very useful in practice but hopefully illustrates the process of creating multi-molecule systems. With that said, let's start!"
]
},
{
"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": "markdown",
"metadata": {},
"source": [
"Let's start by quickly making some molecule. For instance a glycan..."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"customdata": [
[
"C1",
1,
1,
"GLC",
"A"
],
[
"C2",
2,
1,
"GLC",
"A"
],
[
"C3",
3,
1,
"GLC",
"A"
],
[
"C4",
4,
1,
"GLC",
"A"
],
[
"C5",
5,
1,
"GLC",
"A"
],
[
"C6",
6,
1,
"GLC",
"A"
],
[
"C1",
24,
2,
"GLC",
"A"
],
[
"C2",
25,
2,
"GLC",
"A"
],
[
"C3",
26,
2,
"GLC",
"A"
],
[
"C4",
27,
2,
"GLC",
"A"
],
[
"C5",
28,
2,
"GLC",
"A"
],
[
"C6",
29,
2,
"GLC",
"A"
],
[
"C1",
44,
3,
"GLC",
"A"
],
[
"C2",
45,
3,
"GLC",
"A"
],
[
"C3",
46,
3,
"GLC",
"A"
],
[
"C4",
47,
3,
"GLC",
"A"
],
[
"C5",
48,
3,
"GLC",
"A"
],
[
"C6",
49,
3,
"GLC",
"A"
],
[
"C1",
66,
4,
"NAG",
"A"
],
[
"C2",
67,
4,
"NAG",
"A"
],
[
"C3",
68,
4,
"NAG",
"A"
],
[
"C4",
69,
4,
"NAG",
"A"
],
[
"C5",
70,
4,
"NAG",
"A"
],
[
"C6",
71,
4,
"NAG",
"A"
],
[
"C7",
72,
4,
"NAG",
"A"
],
[
"C8",
73,
4,
"NAG",
"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]}
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]}