Monte Carlo simulations of an Isobaric-Isothermal Lennard-Jones system (constant N, P, T) in Fortran.
The partition function of the ensemble is:
The code uses the Metropolis method to sample the configuration space of the system. For more details regarding Monte Carlo simulations, the Fortran implementation, reduced units and the computation of relevant quantities such as the energy and virial pressure, see questions.pdf.
[ferxinii@mb ~/mc-NPT]$ make
[ferxinii@mb ~/mc-NPT]$ ./main
The executable mc_sampling is called by main, and is responsible for sampling a single configuration of (N, P, T) by reading the configuration file config.dat. The executable main is responsible for managing the sweep of parameters explored (varying P), updating config.dat, calling mc_sampling and saving the correct results.
Results are saved in results/. Auxiliary files are stored in tmp/.
To produce the plots, once main has finished the sweep:
[ferxinii@mb ~/mc-NPT]$ gnuplot plot.gnu
The following are the results for the simulation of a system of Argon particle, characterized by the following parameters:
Mass (uma) | ε/k_B (K) | σ (Å) |
---|---|---|
39.948 | 119.8 | 3.405 |