Giter Club home page Giter Club logo

lj-demo's Introduction

lj-demo

A 2D simulation of circular atoms with a Lennard-Jones potential, a simple model system for molecular dynamics.

Lennard-Jones potential

The Lennard-Jones potential is a force field meant to simulate in a simple way the forces between atoms. The force, instead of being all proportional to the inverse of the square of the distance (like it would happen for a Coulomb-like force) is composed of two components: one, attractive, proportional to the inverse of the distance to the seventh power, and one, repulsive, proportional to the inverse of the distance to the thirteenth power. This makes it so that atoms repel each other if they're very close, but attract each other when they're far, which crudely simulates real-life behaviour. In this simulation, the LJ potential can be controlled by two parameters:

  • Radius of attraction, controlling the equilibrium distance at which the two forces balance each other;
  • Strength, controlling the overall intensity of the forces

Langevin thermostat

In order to control the temperature of the system, the simulation also uses a Langevin thermostat. This means that the dynamics aren't "true" Newtonian dynamics; the atoms act as if a fluid, or some radiation, continuously exchanged energy with them, cooling or heating them as necessary to bring them to the required equilibrium temperature. This is achieved through the combination of two forces - a viscous friction force that tends to slow down the atoms, and a random force proportional to the desired temperature. The parameters that control the thermostat are two:

  • Temperature, desired temperature for the atoms to tend to;
  • Acclimatation, the damping 'gamma' factor of Langevin dynamics, which controls how quickly the atoms will tend to reach that temperature.

lj-demo's People

Contributors

stur86 avatar

Watchers

 avatar  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.