Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 2.58 KB

README.rst

File metadata and controls

76 lines (53 loc) · 2.58 KB

README

Use extrapolation of Mayer-sampling Monte Carlo to obtain virial coefficients over large ranges of parameter values.

The manuscript which describes this method is https://doi.org/10.1063/1.5016165

Note that this example code is only for Lennard-Jones particles, but Mayer-sampling for more complicated molecules is also part of the Free Energy and Advanced Sampling Simulation Toolkit (FEASST):

https://github.com/usnistgov/feasst

https://doi.org/10.18434/M3S095

https://doi.org/10.6028/jres.123.004

Prerequisites

This code uses Python 2 and 3 and tested with the libraries available in Anaconda version 4.3.1 (see DISCLAIMER.rst).

https://docs.anaconda.com/anaconda/install/

Usage

To run a Mayer-sampling Monte Carlo simulation in order to generate the Taylor series coefficients:

python plot.py --simulate

To generate a plot from the files generated by the Mayer-sampling simulation:

python plot.py

To see options available at command line:

[user@host mayer-extrapolation] python plot.py -h
usage: plot.py [-h] [--series_filename SERIES_FILENAME]
           [--metadata_filename METADATA_FILENAME] [--simulate]
           [--series_type SERIES_TYPE] [--beta0 BETA0]
           [--num_tune NUM_TUNE] [--num_prod NUM_PROD]
           [--freq_tune FREQ_TUNE] [--freq_print FREQ_PRINT]

optional arguments:
  -h, --help            show this help message and exit
  --series_filename SERIES_FILENAME, -s SERIES_FILENAME
                        csv format file containing taylor series
  --metadata_filename METADATA_FILENAME, -m METADATA_FILENAME
                        json format file containing mayer sampling MC
                        parameters
  --simulate            perform Mayer-sampling Monte Carlo to generate taylor
                        series
  --series_type SERIES_TYPE
                        Pade approximate (pade) or Taylor series (taylor)
  --beta0 BETA0, -b BETA0
                        inverse temperature at which to perform Mayer-sampling
                        Monte Carlo
  --num_tune NUM_TUNE   number of trials to tune max move
  --num_prod NUM_PROD   number of total trials in Mayer-sampling Monte Carlo
  --freq_tune FREQ_TUNE
                        number of trials between each tune
  --freq_print FREQ_PRINT
                        number of trials before printing status