If you want customize the examples in Atomify for e.g. teaching, you can use this GitHub template (Click the green Use this template button in the top of the repository). You can specify simulations and Python notebooks to perform analysis of the simulations.
The configuration is a file (examples.json) that you can provide in the Atomify URL. The examples page in Atomify will then show your examples. The format of this file is
{
"baseUrl": "https://raw.githubusercontent.com/andeplane/atomify-examples-template/main",
"title": "Examples",
"descriptionFile": "diffusion.md",
"examples": [
{
"id": "diffusion",
"title": "2D diffusion",
"description": "We measure the diffusion coefficient",
"analysisDescription": "This markdown formatted text appears in the default analyze notebook.",
"imageUrl": "2d-msd-diffusion/2d-msd-diffusion.png",
"inputScript": "2d-msd-diffusion.in",
"analysisScript": "2d-msd-diffusion.ipynb",
"keywords": [
"lennard jones",
"diffusion"
],
"files": [
{
"fileName": "2d-msd-diffusion.in",
"url": "2d-msd-diffusion/2d-msd-diffusion.in"
},
{
"fileName": "2d-msd-diffusion.ipynb",
"url": "2d-msd-diffusion/2d-msd-diffusion.ipynb"
}
]
}
]
}
baseUrl
is the prefix of all the file url's. This is typically on the formathttps://raw.githubusercontent.com/{user}/{repository}/main
. When you are creating examples locally, you can puthttp://localhost:8000
and runpython server.py
to test.title
is the title that appears on top of the examples page in AtomifydescriptionFile
is the filename of an (optional) markdown formatted file that appears on top of the examples. Use this to e.g. tell your students what this is about.examples
is an array of the examples.
The examples are on the format
id
id of a simulation. This will be used as folder name for both LAMMPS the Jupyter notebook.title
title of the simulationdescription
description of the simulationanalysisDescription (optional)
markdown formatted string that appears in the default analysis notebookimageUrl
url to the image. Full url becomes{baseUrl}/{imageUrl}
inputScript
file name of the input scriptanalysisScript
file name of a notebook that is the entry point of simulation analysiskeywords
list of keywords that can be used to filter a larger set of simulationsfiles
list of files needed for simulation and analysis. A file is an object with the two propertiesfileName
andurl
. Full url becomes{baseUrl}/{url}
When you are creating a new set of examples, you can point Atomify to a local server. You need to update the baseUrl
to be http://localhost:8000
in examples.json
. Run the server with
python server.py
and open https://andeplane.github.io/atomify?examplesUrl=http://localhost:8000/examples.json