Coder Social home page Coder Social logo

mcnpt2d's Introduction

Monte Carlo simulations in the NPT ensemble

This is actually a fork of mcfort but this version works exclusively in the NPT ensemble.

It was made for the sole purpose of computing the equation of state of fluids using the NPT ensemble method and the Monte Carlo simulation technique.

It currently has several potentials implemented, but the source code must be modified by hand to enable them.

It has basic multithreading capabilities to accelerate the energy computation.

Build

To build and use this code, first create a build directory

mkdir build

then, inside this directory run the following

cmake -GNinja ..

This command expects that you have installed the ninja build system.

Then, just run

ninja

In case you only have make just run

cmake ..

and then run

make

Either way, an executable mcnpt will be created inside the build directory. This is the main executable.

Usage

The mcnpt executable expects a file called input.in with six values in it:

  • Packing fraction, a value between strictly larger than 0 and strictly less than 1.0. Any value in between is acceptable. This value will determine the density of the system.
  • Reduced temperature.
  • Reduced pressure.
  • Volume displacement, logarithm based. This is just an initial value, as the code already handles the volume displacement automatically to set it between 15-20% acceptance.
  • Number of particles, an integer. The larger this value, the longer it will take to run a simulation.
  • Number of Monte Carlo cycles, this is the value to use in order to equilibrate and accumulate results. The default is to use half this number for equilibration and half for averaging results.

Observables

The only observable that this code computes is the average density given a value of the reduced pressure. It also provides the standard error for this average.

With both the pressure and the density, one can obtain the equation of state for a given potential.

If you are looking for a way to compute the radial distribution function or the structure factor, please do look into mcfort.

mcnpt2d's People

Contributors

edwinb-ai 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.