Skip to content

Commit

Permalink
updates user charges notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhswenson committed Dec 4, 2023
1 parent 0873718 commit 00b34c3
Showing 1 changed file with 8 additions and 81 deletions.
89 changes: 8 additions & 81 deletions cookbook/user_charges.ipynb
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
{
"cells": [
{
"cell_type": "raw",
"id": "4d9beae7-b6bd-4743-9614-42450df0697d",
"metadata": {
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
".. _User Charges:\n",
"\n",
"Assining partial Charges to Small Molecule Components\n",
"====================================================="
]
},
{
"cell_type": "markdown",
"id": "088a1bc4-e5f3-47ac-8ebf-1a904fa82f80",
Expand All @@ -30,23 +12,7 @@
"tags": []
},
"source": [
"# Assigning partial charges to Small Molecule Components"
]
},
{
"cell_type": "raw",
"id": "acb1ed05-1874-4dd3-a41d-e18623bece44",
"metadata": {
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"On partial charge assignment\n",
"----------------------------"
"# Selecting partial charge assigment methods when loading small molecules"
]
},
{
Expand Down Expand Up @@ -82,25 +48,7 @@
"\n",
"Unfortunately charge assignment can be both, a) time consuming for large molecules, and b) non-deterministic, especially when the molecule occupies a conformation far from a local minima in the AM1 energetic landscape. The latter can be particularly problematic as this can lead to significant differences in assigned partial charges between Protocol simulation repeats.\n",
"\n",
"To avoid these issues, we recommend applying `user charges` to `SmallMoleculeComponents`. In its simplest form, this is done by converting the `SmallMoleculeComponent` to an `OpenFF Molecule` calling the [OpenFF Molecule's `assign_partial_charges method`](https://docs.openforcefield.org/projects/toolkit/en/0.9.2/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.assign_partial_charges) and then re-loading it back into a `SmallMoleculeComponent` before further manipulation."
]
},
{
"cell_type": "raw",
"id": "d7277536-be61-4d45-b09f-1a7b355bee82",
"metadata": {
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
".. _Loading small molecules and converting them to OpenFF Molecules:\n",
"\n",
"Loading small molecules and converting them to OpenFF Molecules\n",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"To avoid these issues, we recommend applying `user charges` to `SmallMoleculeComponents`. In its simplest form, this is done by converting the `SmallMoleculeComponent` to an `OpenFF Molecule` calling the [OpenFF Molecule's `assign_partial_charges method`](https://docs.openforcefield.org/projects/toolkit/en/latest/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.assign_partial_charges) and then re-loading it back into a `SmallMoleculeComponent` before further manipulation."
]
},
{
Expand Down Expand Up @@ -175,14 +123,11 @@
]
},
{
"cell_type": "raw",
"id": "4b70d3b8-0e89-4165-ac01-4eef5f4fe311",
"cell_type": "markdown",
"id": "5ad7998f-f74c-44b3-9ba9-9036dc0385af",
"metadata": {},
"source": [
".. _Assigning partial charges to an OpenFF Molecule:\n",
"\n",
"Assigning partial charges to an OpenFF Molecule\n",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
"### Assigning partial charges to an OpenFF Molecule"
]
},
{
Expand Down Expand Up @@ -242,7 +187,7 @@
"id": "2ae36cf5-a109-4abb-8427-d2c1015e097d",
"metadata": {},
"source": [
"Alternative partial charge methods can be used. For example one could ask for `am1-mulliken` charges. Please see the [OpenFF documentation](https://docs.openforcefield.org/projects/toolkit/en/stable/) for more information."
"Alternative partial charge methods can be used. For example one could ask for `am1-mulliken` charges. Please see the [OpenFF documentation](https://docs.openforcefield.org/projects/toolkit/en/latest/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.assign_partial_charges) for more information."
]
},
{
Expand Down Expand Up @@ -274,24 +219,6 @@
"</div>"
]
},
{
"cell_type": "raw",
"id": "b1c7eea8-7aaa-4a72-8d48-dfb7c32a60eb",
"metadata": {
"editable": true,
"raw_mimetype": "text/restructuredtext",
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
".. _Converting to OpenFE SmallMoleculeComponents:\n",
"\n",
"Converting to OpenFE SmallMoleculeComponents\n",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
]
},
{
"cell_type": "markdown",
"id": "852c038e-d4dc-4fac-975c-d5e6baee719e",
Expand Down Expand Up @@ -338,7 +265,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/home/ialibay/software/mambaforge/install/envs/alchemiscale-client-0.2.1/lib/python3.10/site-packages/gufe/components/explicitmoleculecomponent.py:79: UserWarning: Partial charges have been provided, these will preferentially be used instead of generating new partial charges\n",
"/Users/dwhs/mambaforge/envs/openfe/lib/python3.11/site-packages/gufe/components/explicitmoleculecomponent.py:79: UserWarning: Partial charges have been provided, these will preferentially be used instead of generating new partial charges\n",
" warnings.warn(wmsg)\n"
]
}
Expand Down Expand Up @@ -379,7 +306,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.11.5"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 00b34c3

Please sign in to comment.