Skip to content

Commit 30df470

Browse files
committed
added GUI possibility to tutorial 1
1 parent 826a4b9 commit 30df470

File tree

5 files changed

+185
-117
lines changed

5 files changed

+185
-117
lines changed

docs/sphinx/source/_static/custom.css

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
content: ''; /* No icon needed, as there's no title */
6767
}
6868

69+
70+
6971
:root { /*https://fontawesomeicons.com/svg/icons/info*/
7072
--icon--patreon: url('data:image/svg+xml;charset=utf-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <g> <path fill="none" d="M0 0h24v24H0z"/> <path d="M15 17a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zM2 2h4v20H2V2z"/> </g> </svg>')
7173
}
@@ -133,6 +135,23 @@
133135
mask-image: var(--icon--solution);
134136
}
135137

138+
:root {
139+
--icon--gui: url('data:image/svg+xml;charset=utf-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4.5 0A1.5 1.5 0 0 0 3 1.5v13A1.5 1.5 0 0 0 4.5 16h7a1.5 1.5 0 0 0 1.5-1.5v-13A1.5 1.5 0 0 0 11.5 0h-7zM4 1.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-13zM7.5 14a.5.5 0 1 0 1 0 .5.5 0 0 0-1 0z"/></svg>')
140+
}
141+
142+
.admonition.gui > .admonition-title {
143+
background-color: #2962ff10;
144+
border-color: #2963ff;
145+
font-size: 13pt;
146+
}
147+
148+
.admonition.gui > .admonition-title::before {
149+
background-color: #2963ff;
150+
-webkit-mask-image: var(--icon--gui);
151+
mask-image: var(--icon--gui);
152+
}
153+
154+
136155
a:link {
137156
text-decoration: none;
138157
}
@@ -150,14 +169,3 @@ a:active {
150169
section {
151170
text-align: justify;
152171
}
153-
154-
155-
/* Add more specific parent selectors */
156-
body .sphinx-tabs .tab-button {
157-
background-color: red !important;
158-
}
159-
160-
/* If tabs are inside a specific section or container */
161-
section div.sphinx-tabs .tab-button {
162-
background-color: red !important;
163-
}

docs/sphinx/source/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
extensions = ['sphinx_togglebutton',
77
'sphinx_favicon',
8-
'sphinxcontrib.bibtex',
9-
'sphinx_tabs.tabs']
8+
'sphinxcontrib.bibtex']
109

1110
templates_path = ['_templates']
1211

docs/sphinx/source/journal-article.bib

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ @misc{lammps_run_basics
1717
note = {Accessed: 2025-03-22}
1818
}
1919

20+
@misc{lammps_gui_docs,
21+
title = {{LAMMPS-GUI} Online Documentation for latest stable version},
22+
howpublished = {\url{https://docs.lammps.org/stable/Howto_lammps_gui.html}},
23+
note = {Accessed: 2024-07-15}
24+
}
25+
2026
@article{gravelle2025tutorials,
2127
author = {Simon Gravelle and Jacob R. Gissinger and Axel Kohlmeyer},
2228
title = {A Set of Tutorials for the LAMMPS Simulation Package},
@@ -322,6 +328,36 @@ @book{van1995python
322328
publisher={Centrum voor Wiskunde en Informatica Amsterdam}
323329
}
324330
331+
@misc{vmd_home,
332+
title = {{VMD} Homepage},
333+
howpublished = {\url{https://www.ks.uiuc.edu/Research/vmd}},
334+
note = {Accessed: 2024-07-15}
335+
}
336+
337+
@misc{ovito_home,
338+
title = {{OVITO} Homepage},
339+
howpublished = {\url{https://ovito.org}},
340+
note = {Accessed: 2024-07-15}
341+
}
342+
343+
@article{ovito_paper,
344+
Author = {Stukowski, Alexander},
345+
Title = {{Visualization and analysis of atomistic simulation data with OVITO - the
346+
Open Visualization Tool}},
347+
Journal = {Modelling and Simulation in Materials Science and Engineering},
348+
Year = {{2010}},
349+
Volume = {{18}},
350+
Number = {{1}},
351+
pages = {015012},
352+
DOI = {{10.1088/0965-0393/18/1/015012}},
353+
Article-Number = {{015012}},
354+
ISSN = {{0965-0393}},
355+
EISSN = {{1361-651X}},
356+
ResearcherID-Numbers = {{Stukowski, Alexander/G-9695-2017}},
357+
ORCID-Numbers = {{Stukowski, Alexander/0000-0001-6750-3401}},
358+
Unique-ID = {{ISI:000272791800012}},
359+
}
360+
325361
@article{humphrey1996vmd,
326362
title={{{VMD}}: visual molecular dynamics},
327363
author={Humphrey, William and Dalke, Andrew and Schulten, Klaus},

docs/sphinx/source/tutorial1/exercises.rst

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,42 @@
1-
21
Going further with exercises
32
============================
43

4+
Experiments
5+
-----------
6+
7+
Here are some suggestions for further experiments with this system that
8+
may lead to additional insights into how different systems are configured
9+
and how various features function:
10+
11+
- Use a Nosé-Hoover thermostat (*fix nvt*) instead of a Langevin thermostat
12+
(*fix nve* + *fix langevin*).
13+
- Omit the energy minimization step before starting the MD simulation using either
14+
the Nosé-Hoover or the Langevin thermostat.
15+
- Apply a thermostat to only one type of atoms and observe the
16+
temperature for each type separately.
17+
- Append an NVE run (i.e., without any thermostat) and observe the energy levels.
18+
19+
.. admonition:: If you are using LAMMPS-GUI
20+
:class: gui
21+
22+
An useful experiment is coloring the atoms in the *Slide Show* according
23+
to an observable, such as their respective coordination numbers. To do this,
24+
replace the *dump* and *dump_modify* commands with the following lines:
25+
26+
.. code-block:: lammps
27+
28+
variable coor12 atom (type==1)*(c_coor12)+(type==2)*-1
29+
dump viz all image 1000 myimage-*.ppm v_coor12 type &
30+
shiny 0.1 box no 0.01 view 0 0 zoom 1.8 fsaa yes size 800 800
31+
dump_modify viz adiam 1 1 adiam 2 3 backcolor white &
32+
amap -1 2 ca 0.0 4 min royalblue 0 turquoise 1 yellow max red
33+
34+
Run LAMMPS again. Atoms of type 1 are now colored based on the value
35+
of *c_coor12*, which is mapped continuously from turquoise to yellow
36+
and red for atoms with the highest coordination.
37+
In the definition of the variable *v_coor12*, atoms of type 2 are
38+
all assigned a value of -1, and will therefore always be colored their default blue.
39+
540
Solve Lost atoms error
641
----------------------
742

0 commit comments

Comments
 (0)