Git Product home page Git Product logo

rens's Introduction


Logo

Replica Exchange With Non-Equilibrium Switches

An enhanced-sampling algorithm that increases acceptance probability by perfomring non-equilibrium work simulations.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Systems
  4. Roadmap
  5. License
  6. Contact
  7. Acknowledgments

About The Project

This repository was made with the intention of implementing a Molecular Dynamics algorithm written in 2009 by Prof. Jarzynski and Mr. Andrew Ballard, titled "Replica Exchange with Non-Equilibrium Switches". It eventually became a module which not only did that, but also as a framework for attempting molecular dynamics simulations on any toy system.

(back to top)

Getting Started

  • Clone the repository :

    git clone https://github.com/shaunak-badani/1D_MD.git
    
  • Install anaconda or miniconda to manage the packages required to run this code.

  • Use the MD.yml environment file to create an environment MD which contains all the packages required to run this module, and activate it. Some of the packages in the environment may not be required, like openmm, so you can manually remove them if there are space constraints.

    conda env create -f MD.yml
    conda activate MD
    
  • Copy the following into a file nve.json :

    {
        "num_particles": 10,
        "num_steps": 10000,
        "run_type": "nve",
        "files" : "."
    }
    
  • Run the code with the json file, in the Basic directory :

    cd Basic
    python3 main.py -c nve.json
    
  • This creates a folder in the directory Basic/, by the name of the json file, nve.

  • The folder contains the following files :

    nve
    ├── end.rst
    ├── p.txt
    ├── scalars.txt
    └── v.txt
    
  • The above mentioned folder contains data about the simulation that was just performed. More details on it are given below. Furthermore, analysis of the simulation can be performed using the following command :

    cd Basic
    python3 analyze.py -c nve.json
    
  • This creates a bunch of plots in analysis_plots folder, which help in analyzing the simulation. For the NVE run, it is sufficient to see the energies plot and check whether the total energy remained constant or not.

  • Further options for the json file are given in the README in Basic.

Systems

The module implements a couple of interesting toy systems on which MD is performed.

1-Dimensional Leach

This system contains a single particle moving in 1 direction, along the x-axis. It is a continuous version of the potential function as described in chapter 13 of Leach. Its potential, at any given point, is calculated using the graph below :

1D_U

This graph has three local minima, transitions between which are of great interest in studying Molecular Dynamics Algorithms.

If a system were to include multiple particles at once, they would be considered non-interacting particles, and the potential energy of the system would be the sum of potential energies of all particles on the surface.

2-Dimensional Muller Brown Potential

The Muller Brown potential is a combination of multiple gaussians in the 2-D plane. Its potential energy surface, or PES, looks like the following :

2D_U

There are two valleys separated by an energy barrier, which again makes this system of great interest.

Tests :

  • Running individual tests :

    cd Basic
    python -m unittest -v tests.test_nh
    python -m unittest -v tests.test_leach
    
  • Running all tests :

    python -m unittest discover -v
    

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Acknowledgments

rens's People

Contributors

shaunak-badani avatar

Stargazers

 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.