GithubHelp home page GithubHelp logo

c2jeremy / atomify Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andeplane/atomify

0.0 0.0 0.0 245.88 MB

Real time molecular dynamics in the browser using LAMMPS

License: GNU General Public License v3.0

JavaScript 92.38% C++ 4.49% Python 0.03% Perl 0.08% TypeScript 1.10% CSS 0.42% Makefile 0.07% HTML 0.08% Jupyter Notebook 1.15% POV-Ray SDL 0.09% Roff 0.10%

atomify's Introduction

Atomify - real time molecular dynamics simulations in the browser

Deploy

TL;DR:

  • Run molecular dynamics (LAMMPS) in the browser
  • Upload your own scripts or run one of the built-in examples
  • Watch the simulation while it happens and view plots of real time physical quantities such as temperature and pressure
  • Analyze the simulation in a Jupyter notebook

⚛️ Try it in your browser ⚛️

➡️ https://andeplane.github.io/atomify

➡️ Customize Atomify with your own simulations for e.g. teaching (this only takes a few minutes if you have simulations).

To see the latest changes, please check the change log.

Atomify

The typical workflow when developing scripts for LAMMPS includes working with several programs. A text editor is needed to modify the scripts, the terminal to run LAMMPS, and programs like VMD or Ovito reading trajectories from a file dumped to the disk to visualize the system over time. If physical quantities are computed with LAMMPS, the data is often plotted with MATLAB or Python. This is a tedious process, especially for teaching purposes and for people who are new to LAMMPS.

We here introduce Atomify, a web editor running LAMMPS with real time visualization with stunning graphics, access to real time plotting of physical quantities and much more. After a simulation is finished, all files are available in a jupyter notebook that also runs in the browser.

How does it work?

LAMMPS is compiled to Webassembly using Emscripten so it can run in the browser. It runs with about 50% of the speed of natively compiled LAMMPS (single threaded). The visualization is built on top of three.js, with specialized high performance rendering of spheres and cylinders. The Jupyter notebook is Jupyterlite, and uses Pyodide, a Python runtime running entirely in the browser.

Customize example simulations

You can use this Github template to create your own set of simulations and Jupyter notebook analysis using Atomify. This does not require your own build or deployment of Atomify.

How to build and run locally

Prerequisites

  • NodeJS to install packages and run locally
  • Emscripten to compile LAMMPS to webassembly (optional)
  • Python to run build script (optional)

Run locally

Clone the repository

git clone https://github.com/andeplane/atomify

Install packages with NPM

npm install

Compile LAMMPS (Optional if you don't need to modify LAMMPS installation)

Ensure that em++ is in your path.

cd cpp
python build.py
cd ..

Run locally

npm run start and open http://localhost:3000/atomify/ (remember the slash at the end)

atomify's People

Contributors

andeplane avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.