|
30 | 30 | },
|
31 | 31 | {
|
32 | 32 | "cell_type": "code",
|
33 |
| - "execution_count": 1, |
| 33 | + "execution_count": 4, |
34 | 34 | "metadata": {},
|
35 | 35 | "outputs": [
|
36 | 36 | {
|
|
99 | 99 | }
|
100 | 100 | ],
|
101 | 101 | "source": [
|
102 |
| - "###probably should change this to the PFA one\n", |
103 | 102 | "!cat utils/oplsaa-alcohol.xml"
|
104 | 103 | ]
|
105 | 104 | },
|
|
115 | 114 | "\n",
|
116 | 115 | "Consider defining the chemical context of the atoms in a methane molecule ($CH_4$) using SMARTS. The first thing to note is that there are multiple valid SMARTS that could describe the atom. \n",
|
117 | 116 | "- For example, the simplest way to describe the carbon atom in methane would be ```[C]```. \n",
|
118 |
| - "- While in some cases such a simple definition may be sufficient, typically we wish to also define the number of bond, e.g., ```[C;X4]```. Note, ```;``` represents ```AND```, thus stating that the atom is a carbon with 4 bonds. \n", |
119 |
| - "- Often it is useful to further define the identity of those bonds. In this case, ```[C;X4](H)(H)(H)(H)```. \n", |
120 |
| - " " |
| 117 | + "- While in some cases such a simple definition may be sufficient, typically we wish to also define the number of bond, e.g., ```[C;X4]```. Note, ```;``` represents ```AND```, thus stating that the atom is a carbon AND it has 4 bonds. \n", |
| 118 | + "- Often it is useful to further define the identity of those bonds. In this case, ```[C;X4](H)(H)(H)(H)```. " |
121 | 119 | ]
|
122 | 120 | },
|
123 | 121 | {
|
|
126 | 124 | "source": [
|
127 | 125 | "### Exercise 1\n",
|
128 | 126 | "\n",
|
129 |
| - "Modify the \"forcefield_exercise1.xml\" file to define SMARTS strings to define atomtypes for simple linear alkanes, for our fictious forcefield \"mosdef_ff\". \n", |
| 127 | + "Modify the \"mff_test1.xml\" file to define SMARTS strings to define atomtypes for simple linear alkanes, for our fictious forcefield \"mosdef_ff\". \n", |
130 | 128 | "Here, the atom types for \"mosdef_ff\" are:\n",
|
131 | 129 | "\n",
|
132 | 130 | "* `mff_0`: carbon in methane (CH_4)\n",
|
133 | 131 | "* `mff_1`: carbon in a terminal methyl group of a linear chain (-CH_3)\n",
|
134 | 132 | "* `mff_2`: carbon in a middle methyl group of a linear chain (-CH_2-)\n",
|
135 | 133 | "* `mff_3`: a hydrogen atom\n",
|
136 | 134 | "\n",
|
137 |
| - "After defining the appropriate SMARTS strings, run the test suite to ensure you did it correctly" |
| 135 | + "After defining the appropriate SMARTS strings, run the test suite to ensure you did it correctly. These use pytest to compare the output of your forcefield to the atom types listed in known mol2 files for methane, ethane, and propane. " |
138 | 136 | ]
|
139 | 137 | },
|
140 | 138 | {
|
141 | 139 | "cell_type": "code",
|
142 |
| - "execution_count": null, |
| 140 | + "execution_count": 8, |
143 | 141 | "metadata": {},
|
144 |
| - "outputs": [], |
| 142 | + "outputs": [ |
| 143 | + { |
| 144 | + "name": "stdout", |
| 145 | + "output_type": "stream", |
| 146 | + "text": [ |
| 147 | + "\u001b[1m============================= test session starts ==============================\u001b[0m\n", |
| 148 | + "platform darwin -- Python 3.6.7, pytest-4.3.0, py-1.7.0, pluggy-0.8.0 -- /Users/cri/anaconda3/bin/python\n", |
| 149 | + "cachedir: .pytest_cache\n", |
| 150 | + "rootdir: /Users/cri/Projects/mosdef_tutorials, inifile:\n", |
| 151 | + "plugins: remotedata-0.3.1, openfiles-0.3.1, doctestplus-0.1.3, arraydiff-0.3\n", |
| 152 | + "collected 1 item \u001b[0m\u001b[1m\n", |
| 153 | + "\n", |
| 154 | + "mff_test1/test_atomtyping.py::test_atomtyping[mol2_file0] \u001b[33mSKIPPED\u001b[0m\u001b[36m [100%]\u001b[0m\n", |
| 155 | + "\n", |
| 156 | + "\u001b[33m=============================== warnings summary ===============================\u001b[0m\n", |
| 157 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 158 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\.'\n", |
| 159 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 160 | + "\n", |
| 161 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 162 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 163 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\d'\n", |
| 164 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 165 | + "\n", |
| 166 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 167 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 168 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\('\n", |
| 169 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 170 | + "\n", |
| 171 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 172 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 173 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\)'\n", |
| 174 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 175 | + "\n", |
| 176 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 177 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\+'\n", |
| 178 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 179 | + "\n", |
| 180 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 181 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 182 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\*'\n", |
| 183 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 184 | + "\n", |
| 185 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 186 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\#'\n", |
| 187 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 188 | + "\n", |
| 189 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 190 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\['\n", |
| 191 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 192 | + "\n", |
| 193 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 194 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\]'\n", |
| 195 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 196 | + "\n", |
| 197 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 198 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\,'\n", |
| 199 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 200 | + "\n", |
| 201 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 202 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\;'\n", |
| 203 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 204 | + "\n", |
| 205 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 206 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\&'\n", |
| 207 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 208 | + "\n", |
| 209 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 210 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\$'\n", |
| 211 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 212 | + "\n", |
| 213 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 214 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\%'\n", |
| 215 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 216 | + "\n", |
| 217 | + "/Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758\n", |
| 218 | + " /Users/cri/anaconda3/lib/python3.6/site-packages/plyplus/plyplus.py:758: DeprecationWarning: invalid escape sequence '\\!'\n", |
| 219 | + " return codecs.getdecoder('unicode_escape')(token_value)[0]\n", |
| 220 | + "\n", |
| 221 | + "-- Docs: https://docs.pytest.org/en/latest/warnings.html\n", |
| 222 | + "\u001b[33m\u001b[1m==================== 1 skipped, 19 warnings in 1.16 seconds ====================\u001b[0m\n" |
| 223 | + ] |
| 224 | + } |
| 225 | + ], |
145 | 226 | "source": [
|
146 |
| - "# !pytest -v " |
| 227 | + "!py.test -v --tb=line mff_test1/" |
147 | 228 | ]
|
148 | 229 | },
|
149 | 230 | {
|
|
309 | 390 | "display_name": "Python 3",
|
310 | 391 | "language": "python",
|
311 | 392 | "name": "python3"
|
312 |
| - }, |
313 |
| - "language_info": { |
314 |
| - "codemirror_mode": { |
315 |
| - "name": "ipython", |
316 |
| - "version": 3 |
317 |
| - }, |
318 |
| - "file_extension": ".py", |
319 |
| - "mimetype": "text/x-python", |
320 |
| - "name": "python", |
321 |
| - "nbconvert_exporter": "python", |
322 |
| - "pygments_lexer": "ipython3", |
323 |
| - "version": "3.5.5" |
324 | 393 | }
|
325 | 394 | },
|
326 | 395 | "nbformat": 4,
|
|
0 commit comments