Skip to content

Commit

Permalink
Clearing notebook contents
Browse files Browse the repository at this point in the history
  • Loading branch information
WardLT committed Nov 1, 2023
1 parent b1937b4 commit 935abad
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 978 deletions.
74 changes: 19 additions & 55 deletions notebooks/0_get-exact-answer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "06732ce7-a249-448d-8b77-bd7974f83c59",
"metadata": {
"tags": []
Expand Down Expand Up @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "1abbc967-a788-4a2d-8342-6a88c75cebec",
"metadata": {
"tags": [
Expand All @@ -74,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "aeebbc77-70e4-4709-90a0-b9aaf54d4cd9",
"metadata": {},
"outputs": [],
Expand All @@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "d52bd814-a353-467f-99a6-02201a64416e",
"metadata": {
"tags": []
Expand Down Expand Up @@ -128,7 +128,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "02010c51-39a9-42e6-a4c8-f03d447267ff",
"metadata": {
"tags": []
Expand All @@ -149,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "7073bdd7-9ee6-45bf-a401-93cfe122413a",
"metadata": {
"tags": []
Expand All @@ -164,26 +164,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "ef903a43-5d6c-47fb-a500-837599c95f91",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Step[ FC] Time Energy fmax\n",
"*Force-consistent energies used in optimization.\n",
"BFGSLineSearch: 0[ 0] 13:34:20 3.054451* 39.6081\n",
"BFGSLineSearch: 1[ 1] 13:34:20 -2.442459* 1.4363\n",
"BFGSLineSearch: 2[ 3] 13:34:20 -2.504294* 0.3803\n",
"BFGSLineSearch: 3[ 5] 13:34:20 -2.506296* 0.0708\n",
"BFGSLineSearch: 4[ 6] 13:34:20 -2.506439* 0.0029\n",
"CPU times: user 35.5 ms, sys: 20.8 ms, total: 56.3 ms\n",
"Wall time: 342 ms\n"
]
}
],
"outputs": [],
"source": [
"%%time\n",
"atoms.calc = calc\n",
Expand All @@ -202,7 +186,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "a695054d-a768-466e-9771-54395a3c2b81",
"metadata": {
"tags": []
Expand All @@ -215,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "16317d90-cb1d-4347-9eca-4ba3123bdf4b",
"metadata": {
"tags": []
Expand All @@ -236,7 +220,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "857e38e3-8b92-4246-8469-5ce6f381d56b",
"metadata": {
"tags": []
Expand All @@ -249,21 +233,12 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "73b9b8bb-1d32-4e29-9380-95002bb1081e",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 26.8 ms, sys: 42.5 ms, total: 69.4 ms\n",
"Wall time: 782 ms\n"
]
}
],
"outputs": [],
"source": [
"%%time\n",
"finite_diff_time = perf_counter()\n",
Expand All @@ -282,7 +257,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "588b0344-ad43-4a6b-b57b-03782327f1e7",
"metadata": {
"tags": []
Expand All @@ -304,23 +279,12 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"id": "450b9a10-5c0b-434a-8b20-fedf5f1b1f48",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"0.4429860245936006"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"vib_data.get_zero_point_energy()"
]
Expand All @@ -336,7 +300,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"id": "da5a4aea-134d-4950-8dbd-df83338983a8",
"metadata": {
"tags": []
Expand Down Expand Up @@ -369,7 +333,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"id": "273b5116-06ec-4098-8b20-537d1f9d7e84",
"metadata": {
"tags": []
Expand Down Expand Up @@ -409,7 +373,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.17"
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "c6a28419-6831-4197-8973-00c5591e19cb",
"metadata": {
"tags": []
Expand All @@ -38,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "52252ee2-315c-48bb-8cba-07620e6e2faa",
"metadata": {
"tags": [
Expand All @@ -62,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "0b6794cd-477f-45a1-b96f-2332804ddb20",
"metadata": {},
"outputs": [],
Expand All @@ -82,23 +82,12 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "ad9fd725-b1ba-4fec-ae41-959be0e540b3",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"Atoms(symbols='OH2', pbc=False, forces=..., calculator=SinglePointCalculator(...))"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"atoms = read(starting_geometry)\n",
"atoms"
Expand All @@ -123,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "23502eea-0974-4248-8f19-e85447069c61",
"metadata": {
"tags": []
Expand All @@ -136,7 +125,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "bf1366fc-d9a7-4a98-b9c9-cb3a0209b406",
"metadata": {
"tags": []
Expand All @@ -156,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "d4f21e81-5ec3-4877-a4d1-402077be2ee8",
"metadata": {
"tags": []
Expand All @@ -178,20 +167,12 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "0915595d-133a-43df-84fc-4ff6a3b538ea",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Threads set to 1 by Python driver.\n"
]
}
],
"outputs": [],
"source": [
"calc = make_calculator(method, basis, threads=threads)"
]
Expand All @@ -206,20 +187,12 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "e2a28593-2634-4bb7-ae5b-8f557937bda1",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Need to run 55 calculations for full accuracy.\n"
]
}
],
"outputs": [],
"source": [
"n_atoms = len(atoms)\n",
"to_compute = 3 * n_atoms + 3 * n_atoms * (3 * n_atoms + 1) // 2 + 1\n",
Expand All @@ -228,20 +201,12 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"id": "8bf40523-dcaa-4046-a9c6-74e35178e87f",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Already done 1. 54 left to do.\n"
]
}
],
"outputs": [],
"source": [
"with connect(db_path) as db:\n",
" done = len(db)\n",
Expand All @@ -250,32 +215,10 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "a6fa1b33-defc-4b35-895d-052eb64453fb",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
" 0%| | 0/55 [00:00<?, ?it/s]"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" Threads set to 1 by Python driver.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 55/55 [00:40<00:00, 1.30it/s]"
]
}
],
"outputs": [],
"source": [
"pbar = tqdm(total=to_compute)\n",
"pbar.update(done)\n",
Expand Down
Loading

0 comments on commit 935abad

Please sign in to comment.