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
9 changes: 5 additions & 4 deletions examples/classical/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
"pairs = nbList.pairs\n",
"nbfunc = potentials[-1]\n",
"energy = nbfunc(positions, box, pairs, ff.getGenerators()[-1].params)\n",
"print(energy)"
"print(energy)\n",
"print(pairs)"
]
},
{
Expand Down Expand Up @@ -198,9 +199,9 @@
"hash": "44fe82502fda871be637af1aa98d2b3ddaac01204dd30f1519cbec4e95000815"
},
"kernelspec": {
"display_name": "dmff",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "dmff"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -212,7 +213,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down
20 changes: 15 additions & 5 deletions examples/fluctuated_leading_term_waterff/demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
" dScales\n",
" )\n",
" return E_pme \n",
" return admp_calculator\n"
" return jax.jit(admp_calculator)\n"
]
},
{
Expand Down Expand Up @@ -231,20 +231,30 @@
"print(force)"
]
},
{
"cell_type": "markdown",
"id": "c74539d4",
"metadata": {},
"source": [
"The running speed of the first pass is slow because JAX is trying to track the data flow and compile the code. Once the code is compiled, it is run much faster, until the shapes of the input parameters change, trigerring a recompilation. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d7a0fd1b-a363-40a0-9017-febe0fe76f01",
"metadata": {},
"outputs": [],
"source": []
"source": [
"print(-force_fn(positions, box, pairs))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "dmff",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "dmff"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -256,7 +266,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down