Giter VIP home page Giter VIP logo

langevin's Introduction

Langevin

Simple Langevin Dynamics simulator for a particle in a 2D potential

Build Status


Installation

Dependencies

Tested on Linux with gcc-4.8+ and clang-3.6.

The Langevin simulator uses 2D interpolation functions from version 2.1 of the GNU Scientific Library, so please make sure you use the latest version. You can install it by running install-gsl.sh in the terminal.

This project also uses the HDF5 format to load and save potentials and trajectories.

Building from source

To build the library, unpack the source and cd into the unpacked directory, then type make:

$ tar -xzf langevin.tar.gz
$ cd langevin
$ make

This will generate a C++ library called liblangevin.so, as well as a standalone program called langevin.

Usage

Python

from pylangevin import Langevin

simulation = pylangevin.Langevin(options)
simulation.run(outputfilename, nsteps, nsnapshots)

Standalone

The single-threaded standalone program is useful for running on HPC systems, for example when you want to carry out repeated runs with the same set of parameters.

$ # For detailed guidance on parameters
$ ./langevin --usage
$
$ # Example usage
$ ./langevin -o tests/test_trajectory.h5 -p tests/test_potential.h5 \
             -c 0.,1.,0.,1. -s 0.5,0.0 -g 10 -m 63.456 -l 2.45 \
             -t 500 -d 0.5 -n 10000000 -i 10000

You can also specify a random seed using the flag -r [seed].

Generating your own potentials

Will be expanded on here.

Tasks

  • Write simple test function
  • Generating potentials

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.