Skip to content

lammps/lammps-web

 
 

Repository files navigation

Atomify LAMMPS Online

A web version of Atomify LAMMPS powered by Emscripten, Codemirror and three.js. You can try it here or here.

What is LAMMPS?

LAMMPS (lammps.sandia.gov, github.com/lammps/lammps) is a high performance molecular dynamics code written in C++. It is an acronym for Large-scale Atomic/Molecular Massively Parallel Simulator. With Emscripten, an LLVM-to-JavaScript Compiler, it isn't too hard to compile LAMMPS into asm.js (a subset of Javascript) so it can run in any browser.

What is Atomify LAMMPS?

Atomify LAMMPS (ovilab.net/atomify, github.com/computationalphysics/atomify-lammps) is an editor for LAMMPS with realtime visualization of atom positions and live plotting of physical quantities.

Requirements

To run the precompiled version, you only need a simple web server. An example is i.e. Node.js and the server.js file in the web directory. See instructions below.

How to run using Node.js

A precompiled version is already in the web directory.

  • Install Node.js and npm

  • Install bower

    npm install -g bower
  • Open the web directory in a terminal and install build prerequisites

cd web/
npm install

Build instructions

You will need the Emscripten compiler (instructions in the link). Once you have that, just open the directory containing this README.md file and run

./build.sh

This will clone LAMMPS from github.com/lammps/lammps, compile it and copy the new version of LAMMPS into the web directory.

Build instructions with Docker

# build the container
./build_container.sh

# compile in container
./build_in_container.sh

To view the generated site, you can use any simple webserver to host the web/_site folder.

cd web/_site
python3 -m http.server

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 73.2%
  • C++ 10.7%
  • HTML 7.2%
  • CoffeeScript 3.3%
  • CSS 2.7%
  • CMake 1.5%
  • Other 1.4%