Giter Club home page Giter Club logo

hsa_ns's Introduction

hans

Implementation of a nested sampling algorithm taking advantage of a slightly modified version of David Quigley's hs_alkane package.

One can run a nested sampling calculation of chains using hard sphere potentials, using the hs_alkane package to perform Monte Carlo (MC) moves as well as store the particle positions. One can run a nested sampling calculation in command line as follows:

python hans [options]

using appropriate values for the arguments.

  -h, --help            show this help message and exit
  -i --iterations,      ITERATIONS
                        Number of iterations to run
  -t --time             TIME
                        How much time has been allocated for the program to run
  -w --nwalkers,        NWALKERS
                        Number of walkers to use
  -c --nchains,         NCHAINS
                        Number of chains in the simulation box
  -b --nbeads,          NBEADS
                        Number of beads in each chain
  -l --walklength,      WALKLENGTH
                        Number of sweep for each random walk step
  -p --processes        PROCESSES
                        Number of processes to use in parallel when performing random walks
  -d --bondlength       BONDLENGTH
                        Distance between hard spheres in a chain


  -R, --restart,        Whether or not to restart from a previous attempt
  
  -f --restart_folder,  RESTART_FOLDER
                        Folder where the restart file is located. In the folder, a restart.hdf5 file must be present in order to resume the simulation.

Running the program will generate a folder which contains: a restart.hdf5 file, allowing simulations to be restarted from from previous runs, an energies.txt file which is compatible for use with ns_analyse from the pymatnest package, and a traj.extxyz file, allowing one to view the trajectory with the largest volume after every 1000 iterations.

Note that the energies.txt needs the option s -1 when using ns_analyse as the first line contains metadata about the system, such as the number of beads per chain and the number of walkers. as the system is athermal, the output isn't truly an energy, but a volume, and therefore it may be more accurate when performing analysis to examine the packing fraction of the chains. For this purpose, the intersecting spheres notebook has been written, which demonstrates how to obtain the volume for a chain, as well as an equation that one can use to calculate the volume for a chain of length N.

NS_hsa.py is a module which also grants the ability to construct slightly different calculations using python, as well as provide some other useful functionalities which a user may require.

hsa_ns's People

Contributors

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