Skip to content

Commit cdf4e0e

Browse files
committed
improved figures tutorial 1
1 parent 900fcc4 commit cdf4e0e

File tree

8 files changed

+25
-85
lines changed

8 files changed

+25
-85
lines changed

docs/sphinx/source/tutorials/figures/level1/breaking-a-carbon-nanotube/energy-breakable-pyplot.ipynb

Lines changed: 9 additions & 50 deletions
Large diffs are not rendered by default.

docs/sphinx/source/tutorials/figures/level1/lennard-jones-fluid/energy-pyplot.ipynb

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@
55
"execution_count": 1,
66
"id": "7c8c9669",
77
"metadata": {},
8-
"outputs": [
9-
{
10-
"name": "stderr",
11-
"output_type": "stream",
12-
"text": [
13-
"/home/simon/.local/lib/python3.12/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available.\n",
14-
" warnings.warn(\"Unable to import Axes3D. This may be due to multiple versions of \"\n"
15-
]
16-
}
17-
],
8+
"outputs": [],
189
"source": [
1910
"import numpy as np\n",
2011
"import sys, os, git, lammps_logfile\n",
@@ -62,17 +53,16 @@
6253
"log = lammps_logfile.File(data_path + \"log.lammps\")\n",
6354
"timestep = 0.005\n",
6455
"Time_EM = log.get(\"Step\", run_num = 0)*timestep\n",
65-
"PotEng_EM = log.get(\"PotEng\", run_num = 0)\n",
66-
"KinEng_EM = log.get(\"KinEng\", run_num = 0)\n",
56+
"PotEng_EM = log.get(\"TotEng\", run_num = 0) # its the same if Kin En = 0\n",
6757
"Time_MD = log.get(\"Step\", run_num = 1)*timestep\n",
6858
"PotEng_MD = log.get(\"PotEng\", run_num = 1)\n",
6959
"KinEng_MD = log.get(\"KinEng\", run_num = 1)"
7060
]
7161
},
7262
{
7363
"cell_type": "code",
74-
"execution_count": 4,
75-
"id": "90ba3a69",
64+
"execution_count": 7,
65+
"id": "5b2dc55f",
7666
"metadata": {},
7767
"outputs": [
7868
{
@@ -103,7 +93,7 @@
10393
" myplt.prepare_figure(fig_size = (18,10), dark_mode = dark_mode,\n",
10494
" transparency = True, use_serif=True, n_line=2)\n",
10595
" myplt.add_panel()\n",
106-
" myplt.add_plot(x = Time_EM, y = PotEng_EM, type = \"plot\", linewidth_data = 3,\n",
96+
" myplt.add_plot(x = Time_EM, y = PotEng_EM, linewidth_data = 3,\n",
10797
" marker = \"-\", data_color = 1, markersize = 12,\n",
10898
" data_label = r'$E_{12}$')\n",
10999
" myplt.add_plot(x = Time_MD, y = PotEng_MD, type = \"plot\", linewidth_data = 3,\n",
@@ -114,7 +104,7 @@
114104
" myplt.set_boundaries(x_ticks=np.arange(0, 25, 5), x_boundaries=(-0.5, 20.5),\n",
115105
" y_ticks=np.arange(-1, 0.2, 0.2), y_boundaries=(-1, 0.1))\n",
116106
" myplt.add_panel()\n",
117-
" myplt.add_plot(x = Time_EM, y = KinEng_EM, type = \"plot\", linewidth_data = 3,\n",
107+
" myplt.add_plot(x = Time_EM, y = PotEng_EM*0, type = \"plot\", linewidth_data = 3,\n",
118108
" marker = \"-\", data_color = 1, markersize = 12,\n",
119109
" data_label = r'$\\mathrm{Energy~Minimization}$')\n",
120110
" myplt.add_plot(x = Time_MD, y = KinEng_MD, type = \"plot\", linewidth_data = 3,\n",
Loading

docs/sphinx/source/tutorials/figures/level1/lennard-jones-fluid/lennard-jones-pyplot.ipynb

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.
Loading
Loading

docs/sphinx/source/tutorials/figures/level1/lennard-jones-fluid/mixing-pyplot.ipynb

Lines changed: 3 additions & 12 deletions
Large diffs are not rendered by default.
Loading

0 commit comments

Comments
 (0)