This is a list of the Fortran code examples appearing in the text, in order, indicating the corresponding online program files. The online GUIDE provides more information about running these programs, but there they are grouped together by system studied, for easier comparison of the typical test results. Although links are provided here to the individual files, it is expected that you will have downloaded them all together.
Not all the examples have online files: in some cases the code was provided in the text.
The utility module files averages_module.f90, config_io_module.f90, and maths_module.f90, and a small module containing long-range-correction formulae lrc_lj_module.f90 are widely used by the simulation programs. They are not explicitly listed in most cases below: the SConstruct file gives a full list of the build dependencies in each case.
Several other small programs are not described in the text, but are mentioned in the online GUIDE:
An additional molecular dynamics program using quaternions md_nvt_poly_lj.f90 and md_poly_lj_module.f90 is described in the online GUIDE, but does not appear in the text.
This code snippet appears in the text, not online. However working examples of a similar kind may be found in mc_lj_module.f90 and md_lj_module.f90.
This code snippet appears in the text, not online. However a working example of a similar kind may be found in mc_poly_lj_module.f90.
This code snippet appears in the text, not online.
This code snippet appears in the text, not online.
This code snippet appears in the text, not online.
This code snippet appears in the text, not online. However a working example of a similar kind may be found in md_nve_lj.f90, and in several other MD program files.
This code snippet appears in the text, not online.
This code snippet appears in the text, not online.
md_nve_lj.f90 and md_lj_module.f90.
md_chain_nve_lj.f90 and md_chain_lj_module.f90.
md_chain_mts_lj.f90 and md_chain_lj_module.f90.
md_nve_hs.f90 and md_nve_hs_module.f90.
md_nvt_lj.f90 and md_lj_module.f90.
md_npt_lj.f90 and md_lj_module.f90.
hit_and_miss.f90 (also appears in full in the text).
sample_mean.f90 (also appears in full in the text).
mc_nvt_lj.f90 and mc_lj_module.f90.
mc_nvt_hs.f90 and mc_hs_module.f90. We also supply a constant-pressure version mc_npt_hs.f90.
mc_npt_lj.f90 and mc_lj_module.f90.
mc_zvt_lj.f90 and mc_lj_module.f90.
mc_nvt_poly_lj.f90 and mc_poly_lj_module.f90. We also supply a molecular dynamics program md_nvt_poly_lj.f90 and md_poly_lj_module.f90 to simulate the same model.
mc_nvt_sc.f90 and mc_sc_module.f90. We also supply a constant-pressure version mc_npt_sc.f90.
md_lj_vl_module.f90 and verlet_list_module.f90. These may be used instead of md_lj_module.f90 in combination with md_nve_lj.f90.
This code snippet appears in the text, not online. However a working version of a similar kind may be found in link_list_module.f90 of Code 5.3.
md_lj_ll_module.f90 and link_list_module.f90. These may be used instead of md_lj_module.f90 in combination with md_nve_lj.f90 or md_nvt_lj.f90.
mc_lj_ll_module.f90 and link_list_module.f90. These may be used instead of mc_lj_module.f90 in combination with mc_nvt_lj.f90, mc_npt_lj.f90, or mc_zvt_lj.f90. However, for simplicity the routines have not been designed to be especially robust against large changes in system dimensions or number of particles: this could be fixed by including some memory reallocation statements in the Fortran.
md_lj_mts.f90 and md_lj_mts_module.f90.
initialize.f90 and initialize_module.f90. This program also has options to initialize a random configuration, and a chain of atoms.
ewald.f90 with ewald_module.f90 and mesh_module.f90. As well as the real-space and reciprocal-space routines mentioned in the text, we also illustrate the particle-mesh-Ewald method.
mesh.f90 and mesh_module.f90.
This code snippet appears in the text, not online. However a working example of a similar kind may be found in md_lj_omp_module.f90 of Code 7.2.
md_lj_omp_module.f90. This may be used instead of md_lj_module.f90 in combination with md_nve_lj.f90.
mc_nvt_lj_re.f90 and mc_lj_module.f90.
pair_distribution.f90. Part of the code also appears in the text.
This code snippet appears in the text, not online. However working examples of a similar kind may be found in diffusion.f90 of Code 8.3 and corfun.f90 of Code 8.4.
diffusion.f90. Also supplied is a program diffusion_test.f90 to generate test data.
mc_chain_wl_sw.f90 and mc_chain_sw_module.f90. Also provided is a small program wl_hist.f90 to do post-processing of the histograms produced by the Wang-Landau simulation and, for comparison, a constant-temperature MC program mc_chain_nvt_sw.f90.
mc_chain_nvt_cbmc_lj.f90 and mc_chain_lj_module.f90.
mc_gibbs_lj.f90 and mc_gibbs_lj_module.f90.
md_nvt_lj_le.f90 and md_lj_le_module.f90.
md_lj_llle_module.f90 and link_list_module.f90. These may be used instead of md_lj_le_module.f90 in combination with md_nvt_lj_le.f90.
bd_nvt_lj.f90 and md_lj_module.f90.
smc_nvt_lj.f90 and smc_lj_module.f90.
dpd.f90 and dpd_module.f90.
qmc_pi_sho.f90 for the simple harmonic oscillator. qmc_pi_lj.f90 and qmc_pi_lj_module.f90 for Lennard-Jones.
This code snippet appears in the text, not online. However, a working example of the density profile calculation may be found in grint.f90 of Code 14.2.
grint.f90 and grint_module.f90.
We also provide a (comparatively large) file grint_data.zip
containing test data
in the Data repository.
cluster.f90. We also provide a test configuration file cluster.inp.
averages_module.f90, config_io_module.f90, and maths_module.f90, used by many of the programs listed above.
test_pot_atom.f90 together with any one of test_pot_at.f90, test_pot_bend.f90, or test_pot_twist.f90.
test_pot_linear.f90 together with any one of test_pot_dd.f90, test_pot_dq.f90, test_pot_qq.f90, or test_pot_gb.f90.
This code snippet appears in the text, not online. However, a working example may be found in mc_nvt_lj.f90 and its module mc_lj_module.f90.
This code snippet appears in the text, not online. However, a working example may be found in md_nve_lj.f90 and its module md_lj_module.f90.