Code Monkey home page Code Monkey logo

mdsim's Introduction

Molecular Dynamics Simulations

The program MDS_init.f90 generates the initial positions for a 3D cube of atoms, and MDS_EOM.f90 computes the Equations Of Motion of said cube via Verlet algorithm, taking Lennard-Jones interactions into account.

Download the last version from:
https://github.com/pablogila/Molecular_Dynamics_Sim

Instructions

Compile the program and execute as follows:

First, we assign the initial positions, creataing the initial files for the cube
gfortran tipos.f90 MDS_init.f90
./a.out

Next we execute the Equations Of Motion
gfortran tipos.f90 MDS_EOM.f90
./a.out

Visualization

Visualize initial cube
xmakemol -f fort.3

Plot histogram of velocities
gnuplot
> plot 'fort.7' u 1:2 w l

Plot histogram of positions
gnuplot
> plot 'fort.8' u 1:2 w l

Plot the kinetic, potential and total energies
gnuplot
> plot "fort.10" u 2:3 w l, "fort.10" u 2:4 w l, "fort.10" u 2:5 w l

Visualize the simulation
xmakemol -f fort.11

Files created

fort.3 - initial positions in xyz, for xmakemol
fort.4 - initial positions
fort.7 - histogram of velocities
fort.8 - histogram of positions
fort.9 - initial velocities
fort.10 - energies at each time step
fort.11 - positions at each time step

mdsim's People

Contributors

pablogila avatar

Watchers

 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.