Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions SAFEP_Tutorial_Notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"For more up-to-date and general versions see the SAFEP github.\n",
"\n",
"- This and other SAFEP notebooks make use of pyMBAR and Alchemlyb. \n",
"For more information see Shirts and Chodera (2008), \"Statistically optimal analysis of samples from multiple equilibrium states\" doi: 10.1063/1.2978177\n",
"For more information see Shirts and Chodera (2008), [\"Statistically optimal analysis of samples from multiple equilibrium states\"](https://doi.org/10.1063%2F1.2978177)\n",
"\n"
]
},
Expand Down Expand Up @@ -422,17 +422,6 @@
"**Step E.3 to End**"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "64ae9965",
"metadata": {},
"outputs": [],
"source": [
"def RMS(some_vector):\n",
" return np.sqrt(np.mean(np.array(some_vector)**2))"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -474,7 +463,7 @@
" return L/(K+L)\n",
"\n",
"def Kd(dG, RT):\n",
" return np.exp(dG/RT)*1000"
" return np.exp(dG/RT)*1000000"
]
},
{
Expand All @@ -484,14 +473,14 @@
"metadata": {},
"outputs": [],
"source": [
"concentrations = np.logspace(-3,2,1000) # A vector of concentrations in millimolar\n",
"concentrations = np.logspace(0,5,1000) # A vector of concentrations in micromolar\n",
"K = Kd(dG_binding, RT)\n",
"\n",
"fig, ax = plt.subplots(figsize=(10,6.1))\n",
"ax.plot(concentrations, P_bind(K, concentrations), label='Binding Curve')\n",
"ax.fill_between(concentrations, P_bind(Kd(dG_binding-error_binding*1.96, RT), concentrations), P_bind(Kd(dG_binding+error_binding*1.96, RT), concentrations), alpha=0.25, label='95% Confidence Interval')\n",
"plt.xscale('log')\n",
"ax.set_xlabel('Concentration of Phenol (mM)', fontsize=20)\n",
"ax.set_xlabel('Concentration of Phenol '+r'($\\mathrm{\\mu}$M)', fontsize=20)\n",
"ax.set_ylabel('Fraction of Sites Occupied', fontsize=20)\n",
"ax.vlines(K, 0, 1, linestyles='dashed', color='black', label='Dissociation Constant')\n",
"ax.legend(loc='lower right', fontsize=20*0.75)\n",
Expand Down Expand Up @@ -525,7 +514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.12"
}
},
"nbformat": 4,
Expand Down
Binary file modified titration_curve.pdf
Binary file not shown.