From 1fcc4b5be27a5e157fdf6d2d6a79d3a2c06aec2b Mon Sep 17 00:00:00 2001 From: Michael-P-Allen Date: Thu, 22 Aug 2024 10:08:31 +0100 Subject: [PATCH] Small presentational change: programs now report Fortran/Python/NumPy version numbers --- adjust.f90 | 14 +++++++++++--- averages_module.f90 | 2 +- bd_nvt_lj.f90 | 8 ++++++-- cluster.f90 | 12 ++++++++++-- config_io_module.f90 | 2 +- corfun.f90 | 11 ++++++++--- diffusion.f90 | 12 ++++++++++-- diffusion_test.f90 | 13 +++++++++---- dpd.f90 | 19 ++++++++++++------- eos_hs.f90 | 9 ++++++++- eos_lj.f90 | 14 +++++++++++--- error_calc.f90 | 12 ++++++++++-- ewald.f90 | 14 +++++++++++--- fft3dwrap.f90 | 9 ++++++++- grint.f90 | 14 +++++++++++--- hit_and_miss.f90 | 12 +++++++++++- initialize.f90 | 21 +++++++++++++-------- maths_module.f90 | 2 +- mc_chain_nvt_cbmc_lj.f90 | 15 ++++++++++----- mc_chain_nvt_sw.f90 | 18 +++++++++++------- mc_chain_wl_sw.f90 | 18 +++++++++++------- mc_gibbs_lj.f90 | 21 +++++++++++++-------- mc_npt_hs.f90 | 21 +++++++++++++-------- mc_npt_lj.f90 | 19 ++++++++++++------- mc_npt_sc.f90 | 21 +++++++++++++-------- mc_nvt_hs.f90 | 21 +++++++++++++-------- mc_nvt_lj.f90 | 19 ++++++++++++------- mc_nvt_lj_re.f90 | 22 ++++++++++++++-------- mc_nvt_poly_lj.f90 | 19 ++++++++++++------- mc_nvt_sc.f90 | 21 +++++++++++++-------- mc_zvt_lj.f90 | 21 +++++++++++++-------- md_chain_mts_lj.f90 | 17 +++++++++++------ md_chain_nve_lj.f90 | 20 ++++++++++++-------- md_lj_mts.f90 | 17 +++++++++++------ md_npt_lj.f90 | 19 ++++++++++++------- md_nve_hs.f90 | 17 +++++++++++------ md_nve_lj.f90 | 17 +++++++++++------ md_nvt_lj.f90 | 19 ++++++++++++------- md_nvt_lj_le.f90 | 17 +++++++++++------ md_nvt_poly_lj.f90 | 19 ++++++++++++------- mesh.f90 | 8 ++++++-- pair_distribution.f90 | 12 ++++++++++-- python_examples/adjust.py | 7 +++++++ python_examples/bd_nvt_lj.py | 4 ++++ python_examples/cluster.py | 6 ++++++ python_examples/corfun.py | 6 ++++++ python_examples/diffusion.py | 5 +++++ python_examples/diffusion_test.py | 6 ++++++ python_examples/dpd.py | 4 ++++ python_examples/eos_hs.py | 7 +++++++ python_examples/eos_lj.py | 7 +++++++ python_examples/error_calc.py | 5 +++++ python_examples/ewald.py | 8 +++++++- python_examples/fft3dwrap.py | 5 +++++ python_examples/grint.py | 8 +++++++- python_examples/hit_and_miss.py | 7 +++++++ python_examples/initialize.py | 4 ++++ python_examples/mc_chain_nvt_cbmc_lj.py | 4 ++++ python_examples/mc_chain_nvt_sw.py | 4 ++++ python_examples/mc_chain_wl_sw.py | 4 ++++ python_examples/mc_gibbs_lj.py | 4 ++++ python_examples/mc_npt_hs.py | 4 ++++ python_examples/mc_npt_lj.py | 4 ++++ python_examples/mc_npt_sc.py | 4 ++++ python_examples/mc_nvt_hs.py | 4 ++++ python_examples/mc_nvt_lj.py | 4 ++++ python_examples/mc_nvt_lj_re.py | 6 +++++- python_examples/mc_nvt_poly_lj.py | 4 ++++ python_examples/mc_nvt_sc.py | 4 ++++ python_examples/mc_zvt_lj.py | 4 ++++ python_examples/md_chain_mts_lj.py | 4 ++++ python_examples/md_chain_nve_lj.py | 4 ++++ python_examples/md_npt_lj.py | 4 ++++ python_examples/md_nve_hs.py | 4 ++++ python_examples/md_nve_lj.py | 4 ++++ python_examples/md_nvt_lj.py | 4 ++++ python_examples/md_nvt_lj_le.py | 4 ++++ python_examples/md_nvt_poly_lj.py | 4 ++++ python_examples/mesh.py | 7 +++++++ python_examples/pair_distribution.py | 8 +++++++- python_examples/qmc_pi_lj.py | 4 ++++ python_examples/qmc_pi_sho.py | 6 ++++++ python_examples/qmc_walk_sho.py | 6 ++++++ python_examples/sample_mean.py | 7 +++++++ python_examples/smc_nvt_lj.py | 4 ++++ python_examples/t_tensor.py | 4 ++++ python_examples/test_pot_atom.py | 5 +++++ python_examples/test_pot_linear.py | 5 +++++ python_examples/wl_hist.py | 7 +++++++ qmc_pi_lj.f90 | 19 ++++++++++++------- qmc_pi_sho.f90 | 13 +++++++++---- qmc_walk_sho.f90 | 17 +++++++++++------ sample_mean.f90 | 12 +++++++++++- smc_nvt_lj.f90 | 19 ++++++++++++------- t_tensor.f90 | 8 ++++++-- test_pot_atom.f90 | 14 +++++++++++--- test_pot_linear.f90 | 14 +++++++++++--- wl_hist.f90 | 9 ++++++++- 98 files changed, 756 insertions(+), 245 deletions(-) diff --git a/adjust.f90 b/adjust.f90 index dd666ca..3a7abd6 100644 --- a/adjust.f90 +++ b/adjust.f90 @@ -36,9 +36,11 @@ PROGRAM adjust ! There is nothing here specific to Lennard-Jones ! We assume unit mass and adjust only the translational kinetic energy - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, read_cnf_mols, write_cnf_atoms, write_cnf_mols - USE maths_module, ONLY : lowercase + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, read_cnf_mols, write_cnf_atoms, write_cnf_mols + USE maths_module, ONLY : lowercase IMPLICIT NONE @@ -68,6 +70,12 @@ PROGRAM adjust NAMELIST /nml/ delta_rho, delta_kin, velocities, molecules + WRITE ( unit=output_unit, fmt='(a)' ) 'adjust' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Adjusts kinetic energy and/or density of configuration' + ! Set default parameters velocities = .FALSE. ! By default, assume MC configuration molecules = 'atom' ! Options are 'atom', 'chain', 'linear', 'nonlinear' diff --git a/averages_module.f90 b/averages_module.f90 index c1aa531..da74206 100644 --- a/averages_module.f90 +++ b/averages_module.f90 @@ -25,7 +25,7 @@ MODULE averages_module ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit, error_unit IMPLICIT NONE PRIVATE diff --git a/bd_nvt_lj.f90 b/bd_nvt_lj.f90 index 044de58..75c3c6c 100644 --- a/bd_nvt_lj.f90 +++ b/bd_nvt_lj.f90 @@ -43,7 +43,8 @@ PROGRAM bd_nvt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add @@ -72,7 +73,10 @@ PROGRAM bd_nvt_lj NAMELIST /nml/ nblock, nstep, r_cut, dt, gamma, temperature - WRITE ( unit=output_unit, fmt='(a)' ) 'bd_nvt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'bd_nvt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Brownian dynamics, constant-NVT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass m=1 throughout' CALL introduction diff --git a/cluster.f90 b/cluster.f90 index 0c498a6..9052931 100644 --- a/cluster.f90 +++ b/cluster.f90 @@ -36,8 +36,10 @@ PROGRAM cluster ! Reference: SD Stoddard J Comp Phys, 27, 291 (1978) ! This simple algorithm does not scale well to large N - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms IMPLICIT NONE @@ -53,6 +55,12 @@ PROGRAM cluster NAMELIST /nml/ r_cl + WRITE ( unit=output_unit, fmt='(a)' ) 'cluster' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Identifies clusters in configuration' + r_cl = 1.5 ! default value READ ( unit=input_unit, nml=nml, iostat=ioerr ) ! namelist input diff --git a/config_io_module.f90 b/config_io_module.f90 index 425202b..1461b76 100644 --- a/config_io_module.f90 +++ b/config_io_module.f90 @@ -26,7 +26,7 @@ MODULE config_io_module !------------------------------------------------------------------------------------------------! USE, INTRINSIC :: iso_fortran_env, ONLY : error_unit, iostat_end, iostat_eor - + IMPLICIT NONE PRIVATE diff --git a/corfun.f90 b/corfun.f90 index 09c30b5..62f93ea 100644 --- a/corfun.f90 +++ b/corfun.f90 @@ -39,9 +39,11 @@ PROGRAM corfun ! Advantage can be taken of the fact that the data is real, but for clarity ! we just use the complex FFT with imaginary parts of the data set to zero - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE, INTRINSIC :: iso_c_binding - USE maths_module, ONLY : random_normal, expm1 + + USE maths_module, ONLY : random_normal, expm1 IMPLICIT NONE INCLUDE 'fftw3.f03' @@ -80,7 +82,10 @@ PROGRAM corfun NAMELIST /nml/ nt, origin_interval, nstep, nequil, delta, temperature - WRITE( unit=output_unit, fmt='(a)' ) 'corfun' + WRITE ( unit=output_unit, fmt='(a)' ) 'corfun' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE( unit=output_unit, fmt='(a)' ) 'Illustrates methods for calculating time correlation functions' WRITE( unit=output_unit, fmt='(a)' ) 'using synthetic data from a generalized Langevin equation' diff --git a/diffusion.f90 b/diffusion.f90 index e50e00f..669fb88 100644 --- a/diffusion.f90 +++ b/diffusion.f90 @@ -48,8 +48,10 @@ PROGRAM diffusion ! Although a default value of delta=0.05 is supplied, it is really only a place-holder ! for the correct user-supplied value (time interval between configurations) - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms IMPLICIT NONE @@ -80,6 +82,12 @@ PROGRAM diffusion NAMELIST /nml/ nt, origin_interval, delta + WRITE ( unit=output_unit, fmt='(a)' ) 'diffusion' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Calculates diffusion correlations from sequence of configurations' + ! Example default values nt = 500 ! Max correlation time (as a multiple of interval between configurations) origin_interval = 10 ! We only take time origins at these intervals, for efficiency diff --git a/diffusion_test.f90 b/diffusion_test.f90 index 73466bb..edf878c 100644 --- a/diffusion_test.f90 +++ b/diffusion_test.f90 @@ -38,9 +38,11 @@ PROGRAM diffusion_test ! are given in simulation units defined by the model ! We assume mass m=1 throughout - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : write_cnf_atoms - USE maths_module, ONLY : random_normals + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : write_cnf_atoms + USE maths_module, ONLY : random_normals IMPLICIT NONE @@ -62,7 +64,10 @@ PROGRAM diffusion_test NAMELIST /nml/ n, nblock, nstep, dt, gamma, temperature, box - WRITE ( unit=output_unit, fmt='(a)' ) 'diffusion_test' + WRITE ( unit=output_unit, fmt='(a)' ) 'diffusion_test' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Brownian dynamics without interactions, constant-NVT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass m=1 throughout' diff --git a/dpd.f90 b/dpd.f90 index 9db1b0f..881fc99 100644 --- a/dpd.f90 +++ b/dpd.f90 @@ -45,12 +45,14 @@ PROGRAM dpd ! We recommend a somewhat smaller timestep than their 0.04. ! They also give an approximate expression for the pressure, written out at the end for comparison - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : lowercase - USE dpd_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, lowe, shardlow, p_approx, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : lowercase + USE dpd_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, lowe, shardlow, p_approx, r, v, f, n, potential_type IMPLICIT NONE @@ -78,7 +80,10 @@ PROGRAM dpd NAMELIST /nml/ nblock, nstep, dt, temperature, a, gamma, method - WRITE ( unit=output_unit, fmt='(a)' ) 'dpd' + WRITE ( unit=output_unit, fmt='(a)' ) 'dpd' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Dissipative particle dynamics, constant-NVT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 and cutoff=1 throughout' CALL introduction diff --git a/eos_hs.f90 b/eos_hs.f90 index cbe087e..189754c 100644 --- a/eos_hs.f90 +++ b/eos_hs.f90 @@ -30,7 +30,8 @@ PROGRAM eos_hs ! That paper also gives references to previous approximate equations of state (such as the ! venerable Carnahan-Starling equation). - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE maths_module, ONLY : polyval @@ -47,6 +48,12 @@ PROGRAM eos_hs NAMELIST /nml/ density + WRITE ( unit=output_unit, fmt='(a)' ) 'eos_hs' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Approximate hard sphere pressure at given density' + ! Set sensible default values density = 0.75 diff --git a/eos_lj.f90 b/eos_lj.f90 index 6b8b7e8..7c2839e 100644 --- a/eos_lj.f90 +++ b/eos_lj.f90 @@ -35,9 +35,11 @@ PROGRAM eos_lj ! Formulae for P, E/N etc in terms of the scaled free energy derivatives a_res(0,1) etc ! may be found in the above papers - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE lrc_module, ONLY : potential_lrc, pressure_lrc, pressure_delta - USE eos_lj_module, ONLY : a_res_full, a_res_cutshift + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE lrc_module, ONLY : potential_lrc, pressure_lrc, pressure_delta + USE eos_lj_module, ONLY : a_res_full, a_res_cutshift IMPLICIT NONE @@ -50,6 +52,12 @@ PROGRAM eos_lj NAMELIST /nml/ temperature, density + WRITE ( unit=output_unit, fmt='(a)' ) 'eos_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Approximate Lennard-Jones EOS data at given density, temperature' + ! Set sensible default values temperature = 1.0 density = 0.75 diff --git a/error_calc.f90 b/error_calc.f90 index aba620e..cb52e76 100644 --- a/error_calc.f90 +++ b/error_calc.f90 @@ -31,8 +31,10 @@ PROGRAM error_calc ! See G Ciccotti and JP Ryckaert Mol Phys 40 141 (1980) ! and AD Baczewski and SD Bond J Chem Phys 139 044107 (2013) - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE maths_module, ONLY : random_normal, expm1 + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE maths_module, ONLY : random_normal, expm1 IMPLICIT NONE @@ -53,6 +55,12 @@ PROGRAM error_calc NAMELIST /nml/ nstep, nequil, n_repeat, delta, variance, average + WRITE ( unit=output_unit, fmt='(a)' ) 'error_calc' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Error estimation in average of correlated synthetic data series' + ! Example default values nstep = 2**16 ! Number of steps, about 60,000 for example nequil = 10000 ! Number of equilibration timesteps diff --git a/ewald.f90 b/ewald.f90 index a40f043..15bbe93 100644 --- a/ewald.f90 +++ b/ewald.f90 @@ -32,9 +32,11 @@ PROGRAM ewald ! Compares with brute force summation in real space over shells of periodic boxes ! Leave namelist empty to accept supplied defaults - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms - USE ewald_module, ONLY : pot_r_ewald, pot_k_ewald, pot_k_pm_ewald + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms + USE ewald_module, ONLY : pot_r_ewald, pot_k_ewald, pot_k_pm_ewald IMPLICIT NONE @@ -52,6 +54,12 @@ PROGRAM ewald NAMELIST /nml/ kappa, nk, nbox + WRITE ( unit=output_unit, fmt='(a)' ) 'ewald' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Energy of system of charges by Ewald summation' + ! Sensible default values kappa = 6.0 nk = 8 diff --git a/fft3dwrap.f90 b/fft3dwrap.f90 index c08e2b1..1050899 100644 --- a/fft3dwrap.f90 +++ b/fft3dwrap.f90 @@ -30,7 +30,8 @@ PROGRAM fft3dwrap ! We assume that compiler flags are set such that real and integer Fortran variables ! have the appropriate precision to match their C counterparts - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE, INTRINSIC :: iso_c_binding IMPLICIT NONE @@ -56,6 +57,12 @@ PROGRAM fft3dwrap NAMELIST /nml/ sc2, box + WRITE ( unit=output_unit, fmt='(a)' ) 'fft3dwrap' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Illustrates calling of functions from FFTW library' + ! Set sensible default values for testing sc2 = 2**6 ! Not essential to be a power of 2, but usually more efficient box = 6.0 ! Large enough to accommodate the chosen 3D Gaussian, for good comparison with analytical result diff --git a/grint.f90 b/grint.f90 index 9f26559..bf31ec1 100644 --- a/grint.f90 +++ b/grint.f90 @@ -49,9 +49,11 @@ PROGRAM grint ! Values of basic parameters are read from standard input using a namelist nml - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms - USE grint_module, ONLY : fit + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms + USE grint_module, ONLY : fit IMPLICIT NONE @@ -95,6 +97,12 @@ PROGRAM grint NAMELIST /nml/ dz, dr, z_mid, nz, nc, nr, zskip, cskip, iz_max + WRITE ( unit=output_unit, fmt='(a)' ) 'grint' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Pair distribution functions at a planar interface' + ! Example default values dz = 0.2 ! Spacing in z-direction nz = 15 ! Number of z-points relative to interface location (-nz:+nz) diff --git a/hit_and_miss.f90 b/hit_and_miss.f90 index 022b172..aa22180 100644 --- a/hit_and_miss.f90 +++ b/hit_and_miss.f90 @@ -25,7 +25,10 @@ PROGRAM hit_and_miss ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit + ! No parameters need be supplied by the user. The exact value of the integral is 5/3. + ! For details, see Chapter 4 of the text. + + USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit, COMPILER_VERSION, COMPILER_OPTIONS IMPLICIT NONE @@ -35,6 +38,12 @@ PROGRAM hit_and_miss REAL, PARAMETER :: v_0 = PRODUCT(r_0) INTEGER :: tau, tau_shot, tau_hit + WRITE ( unit=output_unit, fmt='(a)' ) 'hit_and_miss' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Estimates integral by crude hit-and-miss Monte Carlo' + CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator tau_hit = 0 tau_shot = 1000000 @@ -49,5 +58,6 @@ PROGRAM hit_and_miss END DO v = v_0 * REAL ( tau_hit ) / REAL ( tau_shot ) WRITE ( unit=output_unit, fmt='(a,f10.5)' ) 'Estimate = ', v + WRITE ( unit=output_unit, fmt='(a,f10.5)' ) 'Exact = ', 5.0/3.0 END PROGRAM hit_and_miss diff --git a/initialize.f90 b/initialize.f90 index 7cd6610..301631e 100644 --- a/initialize.f90 +++ b/initialize.f90 @@ -28,13 +28,15 @@ PROGRAM initialize ! Reads several variables and options from standard input using a namelist nml ! Leave namelist empty to accept supplied defaults - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : write_cnf_atoms, write_cnf_mols - USE maths_module, ONLY : lowercase - USE initialize_module, ONLY : allocate_arrays, deallocate_arrays, & - & fcc_positions, ran_positions, ran_velocities, & - & chain_positions, chain_velocities, & - & n, r, e, v, w + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : write_cnf_atoms, write_cnf_mols + USE maths_module, ONLY : lowercase + USE initialize_module, ONLY : allocate_arrays, deallocate_arrays, & + & fcc_positions, ran_positions, ran_velocities, & + & chain_positions, chain_velocities, & + & n, r, e, v, w IMPLICIT NONE @@ -63,7 +65,10 @@ PROGRAM initialize NAMELIST /nml/ nc, n, temperature, inertia, density, length, velocities, molecules, lattice, soft, constraints - WRITE ( unit=output_unit, fmt='(a)' ) 'initialize' + WRITE ( unit=output_unit, fmt='(a)' ) 'initialize' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Sets up initial configuration file for various simulations' WRITE ( unit=output_unit, fmt='(a)' ) 'Options for molecules are "atom", "linear", "nonlinear", "chain"' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass m=1 throughout' diff --git a/maths_module.f90 b/maths_module.f90 index 437102c..6add4ed 100644 --- a/maths_module.f90 +++ b/maths_module.f90 @@ -25,7 +25,7 @@ MODULE maths_module ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : error_unit IMPLICIT NONE PRIVATE diff --git a/mc_chain_nvt_cbmc_lj.f90 b/mc_chain_nvt_cbmc_lj.f90 index 17a89ac..88e9ac5 100644 --- a/mc_chain_nvt_cbmc_lj.f90 +++ b/mc_chain_nvt_cbmc_lj.f90 @@ -41,10 +41,12 @@ PROGRAM mc_chain_nvt_cbmc_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, regrow, n, r + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, regrow, n, r IMPLICIT NONE @@ -66,7 +68,10 @@ PROGRAM mc_chain_nvt_cbmc_lj NAMELIST /nml/ nblock, nstep, m_max, k_max, temperature, k_spring - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_nvt_cbmc_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_nvt_cbmc_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT ensemble, CBMC, chain molecule' WRITE ( unit=output_unit, fmt='(a)' ) 'Simulation uses full nonbonded potential (no cutoff)' CALL introduction diff --git a/mc_chain_nvt_sw.f90 b/mc_chain_nvt_sw.f90 index 5dc5dd7..0f4d4b9 100644 --- a/mc_chain_nvt_sw.f90 +++ b/mc_chain_nvt_sw.f90 @@ -42,11 +42,13 @@ PROGRAM mc_chain_nvt_sw ! Configurational weights are calculated on the basis of the athermal interactions ! only, i.e. weight=1 if no overlap, weight=0 if any overlap - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & regrow, crank, pivot, qcount, weight, n, r + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & regrow, crank, pivot, qcount, weight, n, r IMPLICIT NONE @@ -85,7 +87,10 @@ PROGRAM mc_chain_nvt_sw NAMELIST /nml/ nblock, nstep, m_max, k_max, crank_max, crank_fraction, pivot_max, pivot_fraction, & & temperature, range - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_nvt_sw' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_nvt_sw' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT ensemble, chain molecule, square wells' CALL introduction @@ -286,7 +291,6 @@ SUBROUTINE update_histogram END SUBROUTINE update_histogram SUBROUTINE write_histogram ( filename ) - USE, INTRINSIC :: iso_fortran_env, ONLY : iostat_end, iostat_eor IMPLICIT NONE CHARACTER(len=*), INTENT(in) :: filename diff --git a/mc_chain_wl_sw.f90 b/mc_chain_wl_sw.f90 index d752679..04f4165 100644 --- a/mc_chain_wl_sw.f90 +++ b/mc_chain_wl_sw.f90 @@ -50,11 +50,13 @@ PROGRAM mc_chain_wl_sw ! The model is the same one studied by ! MP Taylor, W Paul, K Binder, J Chem Phys, 131, 114907 (2009) - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & regrow, crank, pivot, qcount, weight, n, r + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & regrow, crank, pivot, qcount, weight, n, r IMPLICIT NONE @@ -99,7 +101,10 @@ PROGRAM mc_chain_wl_sw NAMELIST /nml/ nstep, nstage, m_max, k_max, crank_max, crank_fraction, pivot_max, pivot_fraction, & & range, flatness - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_wl_sw' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_chain_wl_sw' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, Wang-Landau method, chain molecule, square wells' CALL introduction @@ -340,7 +345,6 @@ FUNCTION histogram_flat ( flatness ) RESULT ( flat ) END FUNCTION histogram_flat SUBROUTINE write_histogram ( filename ) - USE, INTRINSIC :: iso_fortran_env, ONLY : iostat_end, iostat_eor IMPLICIT NONE CHARACTER(len=*), INTENT(in) :: filename diff --git a/mc_gibbs_lj.f90 b/mc_gibbs_lj.f90 index 93b91e6..f5b1bf4 100644 --- a/mc_gibbs_lj.f90 +++ b/mc_gibbs_lj.f90 @@ -45,12 +45,14 @@ PROGRAM mc_gibbs_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_integer, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & potential_1, potential, move, swap, n, r, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_integer, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & potential_1, potential, move, swap, n, r, potential_type IMPLICIT NONE @@ -86,8 +88,11 @@ PROGRAM mc_gibbs_lj NAMELIST /nml/ nblock, nstep, nswap, temperature, r_cut, dr_max, dv_max - WRITE( unit=output_unit, fmt='(a)' ) 'mc_gibbs_lj' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, Gibbs ensemble' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_gibbs_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, Gibbs ensemble' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/mc_npt_hs.f90 b/mc_npt_hs.f90 index b5c3cba..cfeef10 100644 --- a/mc_npt_hs.f90 +++ b/mc_npt_hs.f90 @@ -41,12 +41,14 @@ PROGRAM mc_npt_hs ! The logarithm of the box length is sampled uniformly - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & overlap_1, overlap, n, r + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & overlap_1, overlap, n, r IMPLICIT NONE @@ -67,8 +69,11 @@ PROGRAM mc_npt_hs NAMELIST /nml/ nblock, nstep, dr_max, db_max, pressure - WRITE( unit=output_unit, fmt='(a)' ) 'mc_npt_hs' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NPT' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_npt_hs' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NPT' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/mc_npt_lj.f90 b/mc_npt_lj.f90 index 0c2e81b..f794453 100644 --- a/mc_npt_lj.f90 +++ b/mc_npt_lj.f90 @@ -49,12 +49,14 @@ PROGRAM mc_npt_lj ! The logarithm of the box length is sampled uniformly - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & box_check, potential_1, potential, move, n, r, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & box_check, potential_1, potential, move, n, r, potential_type IMPLICIT NONE @@ -80,7 +82,10 @@ PROGRAM mc_npt_lj NAMELIST /nml/ nblock, nstep, temperature, pressure, r_cut, dr_max, db_max - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_npt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_npt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NPT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Simulation uses cut (but not shifted) potential' CALL introduction diff --git a/mc_npt_sc.f90 b/mc_npt_sc.f90 index 41f64c1..296e503 100644 --- a/mc_npt_sc.f90 +++ b/mc_npt_sc.f90 @@ -39,12 +39,14 @@ PROGRAM mc_npt_sc ! Despite the program name, there is nothing here specific to spherocylinders ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_rotate_vector, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & overlap_1, overlap, n, r, e + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_rotate_vector, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & overlap_1, overlap, n, r, e IMPLICIT NONE @@ -66,8 +68,11 @@ PROGRAM mc_npt_sc NAMELIST /nml/ nblock, nstep, dr_max, de_max, db_max, pressure - WRITE( unit=output_unit, fmt='(a)' ) 'mc_npt_sc' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NPT, hard linear molecules' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_npt_sc' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NPT, hard linear molecules' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/mc_nvt_hs.f90 b/mc_nvt_hs.f90 index bc5f7ce..4ee6adf 100644 --- a/mc_nvt_hs.f90 +++ b/mc_nvt_hs.f90 @@ -39,12 +39,14 @@ PROGRAM mc_nvt_hs ! are given in simulation units defined by the model, ! in this case, for hard spheres, sigma = 1 - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & overlap_1, overlap, n, r + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & overlap_1, overlap, n, r IMPLICIT NONE @@ -64,8 +66,11 @@ PROGRAM mc_nvt_hs NAMELIST /nml/ nblock, nstep, dr_max, eps_box - WRITE( unit=output_unit, fmt='(a)' ) 'mc_nvt_hs' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_hs' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/mc_nvt_lj.f90 b/mc_nvt_lj.f90 index 25ae5d3..bbbdd59 100644 --- a/mc_nvt_lj.f90 +++ b/mc_nvt_lj.f90 @@ -41,12 +41,14 @@ PROGRAM mc_nvt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & potential_1, potential, move, n, r, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & potential_1, potential, move, n, r, potential_type IMPLICIT NONE @@ -70,7 +72,10 @@ PROGRAM mc_nvt_lj NAMELIST /nml/ nblock, nstep, temperature, r_cut, dr_max - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT' WRITE ( unit=output_unit, fmt='(a)' ) 'Simulation uses cut (but not shifted) potential' CALL introduction diff --git a/mc_nvt_lj_re.f90 b/mc_nvt_lj_re.f90 index a9e8b62..25ab80a 100644 --- a/mc_nvt_lj_re.f90 +++ b/mc_nvt_lj_re.f90 @@ -59,13 +59,16 @@ PROGRAM mc_nvt_lj_re ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & potential_1, potential, move, n, r, potential_type - USE mpi + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & potential_1, potential, move, n, r, potential_type + + USE mpi IMPLICIT NONE @@ -116,7 +119,10 @@ PROGRAM mc_nvt_lj_re WRITE(m_tag,fmt='(i2.2)') m ! Convert rank into character form cnf_prefix(4:5) = m_tag ! Insert process rank into configuration filename - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_lj_re' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_lj_re' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT, replica exchange' WRITE ( unit=output_unit, fmt='(a)' ) 'Simulation uses cut (but not shifted) potential' CALL introduction diff --git a/mc_nvt_poly_lj.f90 b/mc_nvt_poly_lj.f90 index 07b38ac..9719752 100644 --- a/mc_nvt_poly_lj.f90 +++ b/mc_nvt_poly_lj.f90 @@ -41,12 +41,14 @@ PROGRAM mc_nvt_poly_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model (including the cutoff distance) is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_rotate_quaternion, random_translate_vector, q_to_a - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & potential_1, potential, n, na, db, r, e, d, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_rotate_quaternion, random_translate_vector, q_to_a + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & potential_1, potential, n, na, db, r, e, d, potential_type IMPLICIT NONE @@ -73,7 +75,10 @@ PROGRAM mc_nvt_poly_lj NAMELIST /nml/ nblock, nstep, temperature, dr_max, de_max - WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_poly_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_poly_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT ensemble, polyatomic molecule' CALL introduction diff --git a/mc_nvt_sc.f90 b/mc_nvt_sc.f90 index 8f3c4d8..a6dfbf5 100644 --- a/mc_nvt_sc.f90 +++ b/mc_nvt_sc.f90 @@ -39,12 +39,14 @@ PROGRAM mc_nvt_sc ! Despite the program name, there is nothing here specific to spherocylinders ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : random_rotate_vector, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & overlap_1, overlap, n, r, e + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : random_rotate_vector, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & overlap_1, overlap, n, r, e IMPLICIT NONE @@ -65,8 +67,11 @@ PROGRAM mc_nvt_sc NAMELIST /nml/ nblock, nstep, dr_max, de_max, eps_box - WRITE( unit=output_unit, fmt='(a)' ) 'mc_nvt_sc' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT, hard linear molecules' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_nvt_sc' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-NVT, hard linear molecules' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/mc_zvt_lj.f90 b/mc_zvt_lj.f90 index 00f71eb..4332a04 100644 --- a/mc_zvt_lj.f90 +++ b/mc_zvt_lj.f90 @@ -44,12 +44,14 @@ PROGRAM mc_zvt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in mc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_integer, random_translate_vector - USE mc_module, ONLY : introduction, conclusion, allocate_arrays, extend_arrays, deallocate_arrays, & - & potential_1, potential, move, create, destroy, n, r, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_integer, random_translate_vector + USE mc_module, ONLY : introduction, conclusion, allocate_arrays, extend_arrays, deallocate_arrays, & + & potential_1, potential, move, create, destroy, n, r, potential_type IMPLICIT NONE @@ -75,8 +77,11 @@ PROGRAM mc_zvt_lj NAMELIST /nml/ nblock, nstep, temperature, activity, prob_move, r_cut, dr_max - WRITE( unit=output_unit, fmt='(a)' ) 'mc_zvt_lj' - WRITE( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-zVT ensemble' + WRITE ( unit=output_unit, fmt='(a)' ) 'mc_zvt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Monte Carlo, constant-zVT ensemble' CALL introduction CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator diff --git a/md_chain_mts_lj.f90 b/md_chain_mts_lj.f90 index 135099b..16d8ee0 100644 --- a/md_chain_mts_lj.f90 +++ b/md_chain_mts_lj.f90 @@ -40,11 +40,13 @@ PROGRAM md_chain_mts_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & zero_cm, force, spring, worst_bond, r, v, f, g, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & zero_cm, force, spring, worst_bond, r, v, f, g, n, potential_type IMPLICIT NONE @@ -67,7 +69,10 @@ PROGRAM md_chain_mts_lj NAMELIST /nml/ nblock, nstep, dt, k_spring, n_mts - WRITE ( unit=output_unit, fmt='(a)' ) 'md_chain_mts_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_chain_mts_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVE ensemble, chain molecule, multiple time steps' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' WRITE ( unit=output_unit, fmt='(a)' ) 'No periodic boundaries' diff --git a/md_chain_nve_lj.f90 b/md_chain_nve_lj.f90 index bfa678a..c091ba0 100644 --- a/md_chain_nve_lj.f90 +++ b/md_chain_nve_lj.f90 @@ -40,13 +40,14 @@ PROGRAM md_chain_nve_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : lowercase - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & zero_cm, force, worst_bond, r, r_old, v, f, n, potential_type, & - & milcshake_a, milcshake_b, rattle_a, rattle_b + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : lowercase + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, zero_cm, force, worst_bond, & + & r, r_old, v, f, n, potential_type, milcshake_a, milcshake_b, rattle_a, rattle_b IMPLICIT NONE @@ -71,7 +72,10 @@ PROGRAM md_chain_nve_lj NAMELIST /nml/ nblock, nstep, dt, constraints - WRITE ( unit=output_unit, fmt='(a)' ) 'md_chain' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_chain' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVE ensemble, chain molecule' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' WRITE ( unit=output_unit, fmt='(a)' ) 'No periodic boundaries' diff --git a/md_lj_mts.f90 b/md_lj_mts.f90 index a18c84a..2308abb 100644 --- a/md_lj_mts.f90 +++ b/md_lj_mts.f90 @@ -46,11 +46,13 @@ PROGRAM md_lj_mts ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, v, f, n, potential_type IMPLICIT NONE @@ -80,7 +82,10 @@ PROGRAM md_lj_mts NAMELIST /nml/ nblock, nstep, r_cut, lambda, dt1, n_mts - WRITE ( unit=output_unit, fmt='(a)' ) 'md_lj_mts' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_lj_mts' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVE ensemble, multiple time steps' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' CALL introduction diff --git a/md_npt_lj.f90 b/md_npt_lj.f90 index 7ddd154..75259bb 100644 --- a/md_npt_lj.f90 +++ b/md_npt_lj.f90 @@ -45,12 +45,14 @@ PROGRAM md_npt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE maths_module, ONLY : random_normal, random_normals - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE maths_module, ONLY : random_normal, random_normals + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, v, f, n, potential_type IMPLICIT NONE @@ -89,7 +91,10 @@ PROGRAM md_npt_lj NAMELIST /nml/ nblock, nstep, r_cut, dt, temperature, pressure, tau, tau_baro - WRITE ( unit=output_unit, fmt='(a)' ) 'md_npt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_npt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NPT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' CALL introduction diff --git a/md_nve_hs.f90 b/md_nve_hs.f90 index ba9bb17..3091aa4 100644 --- a/md_nve_hs.f90 +++ b/md_nve_hs.f90 @@ -41,11 +41,13 @@ PROGRAM md_nve_hs ! However, input configuration, output configuration, most calculations, and all results ! are given in units sigma = 1, mass = 1 - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & update, overlap, collide, n, r, v, coltime, partner, gt, lt + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & update, overlap, collide, n, r, v, coltime, partner, gt, lt IMPLICIT NONE @@ -67,7 +69,10 @@ PROGRAM md_nve_hs NAMELIST /nml/ nblock, nstep, dt - WRITE ( unit=output_unit, fmt='(a)' ) 'md_nve_hs' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_nve_hs' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVE, hard spheres' CALL introduction diff --git a/md_nve_lj.f90 b/md_nve_lj.f90 index cfbe375..4ef1119 100644 --- a/md_nve_lj.f90 +++ b/md_nve_lj.f90 @@ -41,11 +41,13 @@ PROGRAM md_nve_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, v, f, n, potential_type IMPLICIT NONE @@ -67,7 +69,10 @@ PROGRAM md_nve_lj NAMELIST /nml/ nblock, nstep, r_cut, dt - WRITE ( unit=output_unit, fmt='(a)' ) 'md_nve_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_nve_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVE ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' CALL introduction diff --git a/md_nvt_lj.f90 b/md_nvt_lj.f90 index 7108721..9085a54 100644 --- a/md_nvt_lj.f90 +++ b/md_nvt_lj.f90 @@ -45,12 +45,14 @@ PROGRAM md_nvt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE maths_module, ONLY : random_normals - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE maths_module, ONLY : random_normals + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, v, f, n, potential_type IMPLICIT NONE @@ -79,7 +81,10 @@ PROGRAM md_nvt_lj NAMELIST /nml/ nblock, nstep, r_cut, dt, temperature, tau - WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' CALL introduction diff --git a/md_nvt_lj_le.f90 b/md_nvt_lj_le.f90 index 1516f9c..e36e247 100644 --- a/md_nvt_lj_le.f90 +++ b/md_nvt_lj_le.f90 @@ -41,11 +41,13 @@ PROGRAM md_nvt_lj_le ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, v, f, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, v, f, n, potential_type IMPLICIT NONE @@ -70,7 +72,10 @@ PROGRAM md_nvt_lj_le NAMELIST /nml/ nblock, nstep, dt, strain_rate - WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_lj_le' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_lj_le' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVT ensemble, Lees-Edwards' WRITE ( unit=output_unit, fmt='(a)' ) 'Particle mass=1 throughout' CALL introduction diff --git a/md_nvt_poly_lj.f90 b/md_nvt_poly_lj.f90 index 9612612..b2acf83 100644 --- a/md_nvt_poly_lj.f90 +++ b/md_nvt_poly_lj.f90 @@ -44,12 +44,14 @@ PROGRAM md_nvt_poly_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in md_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : q_to_a - USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, r, e, d, v, ell, f, tau, n, na, db, inertia, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_mols, write_cnf_mols + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : q_to_a + USE md_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, r, e, d, v, ell, f, tau, n, na, db, inertia, potential_type IMPLICIT NONE @@ -74,7 +76,10 @@ PROGRAM md_nvt_poly_lj NAMELIST /nml/ nblock, nstep, dt, temperature, t_interval - WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_poly_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'md_nvt_poly_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular dynamics, constant-NVT/NVE ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Molecular mass=1 throughout' diff --git a/mesh.f90 b/mesh.f90 index a117b33..1c73b8f 100644 --- a/mesh.f90 +++ b/mesh.f90 @@ -30,7 +30,8 @@ PROGRAM mesh ! The charges are positioned in a box of unit length. ! The charge mesh is indexed from 0 to sc-1 in each coordinate direction - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE mesh_module, ONLY : mesh_function @@ -47,7 +48,10 @@ PROGRAM mesh NAMELIST /nml/ n, sc - WRITE ( unit=output_unit, fmt='(a)' ) 'mesh' + WRITE ( unit=output_unit, fmt='(a)' ) 'mesh' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) '3-D mesh assignment of charges' WRITE ( unit=output_unit, fmt='(a)' ) 'Unit box length, coordinates in range (0,1)' diff --git a/pair_distribution.f90 b/pair_distribution.f90 index 5cd4b32..98fd916 100644 --- a/pair_distribution.f90 +++ b/pair_distribution.f90 @@ -44,8 +44,10 @@ PROGRAM pair_distribution ! Results are written to a file 'pair_distribution.out' with diagnostics to standard output - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms IMPLICIT NONE @@ -69,6 +71,12 @@ PROGRAM pair_distribution NAMELIST /nml/ dr + WRITE ( unit=output_unit, fmt='(a)' ) 'pair_distribution' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Computes pair distribution function from set of configurations' + ! Example default values dr = 0.02 diff --git a/python_examples/adjust.py b/python_examples/adjust.py index 983fd3f..5ab56b5 100755 --- a/python_examples/adjust.py +++ b/python_examples/adjust.py @@ -29,8 +29,15 @@ import json import sys import numpy as np +from platform import python_version from config_io_module import read_cnf_atoms, read_cnf_mols, write_cnf_atoms, write_cnf_mols +print('adjust') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Adjusts kinetic energy and/or density of configuration') + # Takes in a configuration of atoms or molecules # positions, possibly orientations, and optionally, velocities and angular velocities # Cubic periodic boundary conditions diff --git a/python_examples/bd_nvt_lj.py b/python_examples/bd_nvt_lj.py index b99b46c..e4ce83c 100755 --- a/python_examples/bd_nvt_lj.py +++ b/python_examples/bd_nvt_lj.py @@ -147,6 +147,7 @@ def o_propagator ( t ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_lj_module import introduction, conclusion, force, PotentialType @@ -157,6 +158,9 @@ def o_propagator ( t ): sav_tag = 'sav' print('bd_nvt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Brownian dynamics, constant-NVT ensemble') print('Particle mass=1 throughout') introduction() diff --git a/python_examples/cluster.py b/python_examples/cluster.py index 4e86b9a..3db2a9a 100755 --- a/python_examples/cluster.py +++ b/python_examples/cluster.py @@ -40,9 +40,15 @@ def in_range ( j, k ): import json import sys import numpy as np +from platform import python_version from config_io_module import read_cnf_atoms print('cluster') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Identifies clusters in configuration') + # Read parameters in JSON format try: nml = json.load(sys.stdin) diff --git a/python_examples/corfun.py b/python_examples/corfun.py index 5dcef48..14bd35e 100755 --- a/python_examples/corfun.py +++ b/python_examples/corfun.py @@ -62,8 +62,14 @@ def c_exact(t): import numpy as np import math import time +from platform import python_version print('corfun') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Illustrates methods for calculating time correlation functions') +print('using synthetic data from a generalized Langevin equation') # Read parameters in JSON format try: diff --git a/python_examples/diffusion.py b/python_examples/diffusion.py index 6b53ef3..0527ac4 100755 --- a/python_examples/diffusion.py +++ b/python_examples/diffusion.py @@ -46,9 +46,14 @@ def unfold ( r_old, r ): import sys import os import numpy as np +from platform import python_version from config_io_module import read_cnf_atoms print('diffusion') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Calculates diffusion correlations from sequence of configurations') # Reads a trajectory from a sequence of configuration files # Calculates velocity autocorrelation function, mean square displacement, diff --git a/python_examples/diffusion_test.py b/python_examples/diffusion_test.py index cb03dd0..682d2a3 100755 --- a/python_examples/diffusion_test.py +++ b/python_examples/diffusion_test.py @@ -56,9 +56,15 @@ def o_propagator ( t, v ): import sys import numpy as np import math +from platform import python_version from config_io_module import write_cnf_atoms print('diffusion_test') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Brownian dynamics without interactions, constant-NVT ensemble') +print('Particle mass m=1 throughout') # Read parameters in JSON format try: diff --git a/python_examples/dpd.py b/python_examples/dpd.py index 5ecf6fe..1b0c617 100755 --- a/python_examples/dpd.py +++ b/python_examples/dpd.py @@ -119,6 +119,7 @@ def kick_propagator ( t ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from dpd_module import introduction, conclusion, force, lowe, shardlow, p_approx, PotentialType @@ -129,6 +130,9 @@ def kick_propagator ( t ): sav_tag = 'sav' print('dpd') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Dissipative particle dynamics, constant-NVT ensemble') print('Particle mass=1 and cutoff=1 throughout') diff --git a/python_examples/eos_hs.py b/python_examples/eos_hs.py index f39bf57..0be116d 100755 --- a/python_examples/eos_hs.py +++ b/python_examples/eos_hs.py @@ -30,12 +30,19 @@ import sys import numpy as np from numpy.polynomial.polynomial import polyval +from platform import python_version # This program uses the function derived by H Hansen-Goos, J Chem Phys, 16, 164506 (2016) # which is claimed to be an excellent fit to simulation data over the whole fluid density range # That paper also gives references to previous approximate equations of state (such as the # venerable Carnahan-Starling equation). +print('eos_hs') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Approximate hard sphere pressure at given density') + # The coefficients appear in Table I of Hansen-Goos (2016) a = 8.0 diff --git a/python_examples/eos_lj.py b/python_examples/eos_lj.py index 2870fb7..dd5ca5d 100755 --- a/python_examples/eos_lj.py +++ b/python_examples/eos_lj.py @@ -29,6 +29,7 @@ import json import sys import numpy as np +from platform import python_version from eos_lj_module import a_res_full, a_res_cutshift from lrc_module import potential_lrc, pressure_lrc, pressure_delta @@ -42,6 +43,12 @@ # Formulae for P, E/N etc in terms of the scaled free energy derivatives a_res(0,1) etc # may be found in the above papers +print('eos_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Approximate Lennard-Jones EOS data at given density, temperature') + r_cut = 2.5 # Read parameters in JSON format diff --git a/python_examples/error_calc.py b/python_examples/error_calc.py index 731c83d..c7e3345 100755 --- a/python_examples/error_calc.py +++ b/python_examples/error_calc.py @@ -36,8 +36,13 @@ import sys import numpy as np import math +from platform import python_version print('error_calc') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Error estimation in average of correlated synthetic data series') # Read parameters in JSON format try: diff --git a/python_examples/ewald.py b/python_examples/ewald.py index b933ad3..2cd60aa 100755 --- a/python_examples/ewald.py +++ b/python_examples/ewald.py @@ -29,7 +29,8 @@ import json import sys import numpy as np -from itertools import product +from itertools import product +from platform import python_version from config_io_module import read_cnf_atoms from ewald_module import pot_r_ewald, pot_k_ewald, pot_k_pm_ewald @@ -40,6 +41,11 @@ # Compares with brute force summation in real space over shells of periodic boxes print('ewald') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Energy of system of charges by Ewald summation') + # Read parameters in JSON format try: nml = json.load(sys.stdin) diff --git a/python_examples/fft3dwrap.py b/python_examples/fft3dwrap.py index cea22fe..922f9e8 100755 --- a/python_examples/fft3dwrap.py +++ b/python_examples/fft3dwrap.py @@ -30,8 +30,13 @@ import sys import numpy as np import math +from platform import python_version print('fft3dwrap') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Illustrates calling of functions from FFTW library') # Read parameters in JSON format try: diff --git a/python_examples/grint.py b/python_examples/grint.py index 5dc3146..b2fc5eb 100755 --- a/python_examples/grint.py +++ b/python_examples/grint.py @@ -67,7 +67,8 @@ def f2tanh ( z, z_gl, z_lg, width, rho_g, rho_l ): import json import sys import numpy as np -from scipy.optimize import curve_fit +from scipy.optimize import curve_fit +from platform import python_version from config_io_module import read_cnf_atoms import os.path @@ -96,6 +97,11 @@ def f2tanh ( z, z_gl, z_lg, width, rho_g, rho_l ): # Values of basic parameters are read from standard input using JSON format print('grint') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Pair distribution functions at a planar interface') + # Read parameters in JSON format try: nml = json.load(sys.stdin) diff --git a/python_examples/hit_and_miss.py b/python_examples/hit_and_miss.py index 2c08cc3..8db5e46 100755 --- a/python_examples/hit_and_miss.py +++ b/python_examples/hit_and_miss.py @@ -30,8 +30,14 @@ # For details, see Chapter 4 of the text. import numpy as np +from platform import python_version print('hit_and_miss') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Estimates integral by crude hit-and-miss Monte Carlo') + np.random.seed() r_0 = np.array([1.0,2.0,3.0],dtype=np.float64) @@ -48,4 +54,5 @@ v = v_0 * tau_hit / tau_shot print ( "{}{:10.5f}".format('Estimate =', v) ) +print ( "{}{:10.5f}".format('Exact =', 5/3) ) diff --git a/python_examples/initialize.py b/python_examples/initialize.py index 63d0e6b..27e4d6a 100755 --- a/python_examples/initialize.py +++ b/python_examples/initialize.py @@ -416,6 +416,7 @@ def chain_overlap ( ri, r ): import sys import numpy as np import math +from platform import python_version from config_io_module import write_cnf_atoms, write_cnf_mols filename = 'cnf.inp' @@ -423,6 +424,9 @@ def chain_overlap ( ri, r ): tol = 1.e-6 print('initialize') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Sets up initial configuration file for various simulations') print('Options for molecules are "atom", "linear", "nonlinear", "chain"') print('Particle mass m=1 throughout') diff --git a/python_examples/mc_chain_nvt_cbmc_lj.py b/python_examples/mc_chain_nvt_cbmc_lj.py index 1d0c947..be1390f 100755 --- a/python_examples/mc_chain_nvt_cbmc_lj.py +++ b/python_examples/mc_chain_nvt_cbmc_lj.py @@ -91,6 +91,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from mc_chain_lj_module import introduction, conclusion, regrow @@ -101,6 +102,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_chain_nvt_cbmc_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble, CBMC, chain molecule') print('Simulation uses full nonbonded potential (no cutoff)') diff --git a/python_examples/mc_chain_nvt_sw.py b/python_examples/mc_chain_nvt_sw.py index 45b0b3b..eb9e6c9 100755 --- a/python_examples/mc_chain_nvt_sw.py +++ b/python_examples/mc_chain_nvt_sw.py @@ -101,6 +101,7 @@ def update_histogram(q,q_min,q_max): import json import sys import numpy as np +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from mc_chain_sw_module import introduction, conclusion, regrow, crank, pivot, qcount, weight @@ -114,6 +115,9 @@ def update_histogram(q,q_min,q_max): sav_tag = 'sav' print('mc_chain_nvt_sw') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble, chain molecule, square wells') # Read parameters in JSON format diff --git a/python_examples/mc_chain_wl_sw.py b/python_examples/mc_chain_wl_sw.py index 24e9948..2f20da4 100755 --- a/python_examples/mc_chain_wl_sw.py +++ b/python_examples/mc_chain_wl_sw.py @@ -170,6 +170,7 @@ def write_results(): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from mc_chain_sw_module import introduction, conclusion, regrow, crank, pivot, qcount, weight @@ -183,6 +184,9 @@ def write_results(): sav_tag = 'sav' print('mc_chain_nvt_sw') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, Wang-Landau method, chain molecule, square wells') # Read parameters in JSON format diff --git a/python_examples/mc_gibbs_lj.py b/python_examples/mc_gibbs_lj.py index 7a9705c..7549d5d 100755 --- a/python_examples/mc_gibbs_lj.py +++ b/python_examples/mc_gibbs_lj.py @@ -109,6 +109,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -121,6 +122,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_gibbs_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, Gibbs ensemble') print('Simulation uses cut (but not shifted) potential') diff --git a/python_examples/mc_npt_hs.py b/python_examples/mc_npt_hs.py index 6d3e0a3..bde20eb 100755 --- a/python_examples/mc_npt_hs.py +++ b/python_examples/mc_npt_hs.py @@ -79,6 +79,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -90,6 +91,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_npt_hs') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NPT ensemble') # Read parameters in JSON format diff --git a/python_examples/mc_npt_lj.py b/python_examples/mc_npt_lj.py index f64e5d2..7c37ca6 100755 --- a/python_examples/mc_npt_lj.py +++ b/python_examples/mc_npt_lj.py @@ -136,6 +136,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -147,6 +148,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_npt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NPT ensemble') print('Simulation uses cut (but not shifted) potential') diff --git a/python_examples/mc_npt_sc.py b/python_examples/mc_npt_sc.py index 5f2fd0b..ac4b8c1 100755 --- a/python_examples/mc_npt_sc.py +++ b/python_examples/mc_npt_sc.py @@ -83,6 +83,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_mols, write_cnf_mols from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, random_rotate_vector, metropolis @@ -94,6 +95,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_nvt_sc') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble') # Read parameters in JSON format diff --git a/python_examples/mc_nvt_hs.py b/python_examples/mc_nvt_hs.py index 5b86ec8..e222a93 100755 --- a/python_examples/mc_nvt_hs.py +++ b/python_examples/mc_nvt_hs.py @@ -78,6 +78,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector @@ -89,6 +90,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_nvt_hs') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble') # Read parameters in JSON format diff --git a/python_examples/mc_nvt_lj.py b/python_examples/mc_nvt_lj.py index a489556..f9b8b81 100755 --- a/python_examples/mc_nvt_lj.py +++ b/python_examples/mc_nvt_lj.py @@ -109,6 +109,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -120,6 +121,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_nvt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble') print('Simulation uses cut (but not shifted) potential') diff --git a/python_examples/mc_nvt_lj_re.py b/python_examples/mc_nvt_lj_re.py index cfe2e5a..fa22897 100755 --- a/python_examples/mc_nvt_lj_re.py +++ b/python_examples/mc_nvt_lj_re.py @@ -128,7 +128,8 @@ def calc_variables ( ): import os import numpy as np import math -from mpi4py import MPI +from mpi4py import MPI +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -146,6 +147,9 @@ def calc_variables ( ): msg1_id, msg2_id, msg3_id, msg4_id = 999, 888, 777, 666 # MPI message identifiers print('mc_nvt_lj_re') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT, replica exchange') print('Simulation uses cut (but not shifted) potential') print( "{:40}{:15d}".format('This is process rank', m) ) diff --git a/python_examples/mc_nvt_poly_lj.py b/python_examples/mc_nvt_poly_lj.py index 5b66b9e..c1eacc3 100755 --- a/python_examples/mc_nvt_poly_lj.py +++ b/python_examples/mc_nvt_poly_lj.py @@ -84,6 +84,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_mols, write_cnf_mols from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis, random_rotate_quaternion, q_to_a @@ -95,6 +96,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_nvt_poly_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble, polyatomic molecule') print('Simulation uses cut-and-shifted potential') diff --git a/python_examples/mc_nvt_sc.py b/python_examples/mc_nvt_sc.py index 819855f..5a912e8 100755 --- a/python_examples/mc_nvt_sc.py +++ b/python_examples/mc_nvt_sc.py @@ -85,6 +85,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_mols, write_cnf_mols from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, random_rotate_vector @@ -96,6 +97,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_nvt_sc') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-NVT ensemble') # Read parameters in JSON format diff --git a/python_examples/mc_zvt_lj.py b/python_examples/mc_zvt_lj.py index 6f6bf32..b7a365a 100755 --- a/python_examples/mc_zvt_lj.py +++ b/python_examples/mc_zvt_lj.py @@ -117,6 +117,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -128,6 +129,9 @@ def calc_variables ( ): sav_tag = 'sav' print('mc_zvt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Monte Carlo, constant-zVT ensemble') print('Simulation uses cut (but not shifted) potential') diff --git a/python_examples/md_chain_mts_lj.py b/python_examples/md_chain_mts_lj.py index 4afabdd..8860c45 100755 --- a/python_examples/md_chain_mts_lj.py +++ b/python_examples/md_chain_mts_lj.py @@ -91,6 +91,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_chain_lj_module import introduction, conclusion, zero_cm, force, spring, worst_bond, PotentialType @@ -101,6 +102,9 @@ def calc_variables ( ): sav_tag = 'sav' print('md_chain_mts_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVE ensemble, chain molecule, multiple time steps') print('Particle mass=1 throughout') print('No periodic boundaries') diff --git a/python_examples/md_chain_nve_lj.py b/python_examples/md_chain_nve_lj.py index ce0162d..874b102 100755 --- a/python_examples/md_chain_nve_lj.py +++ b/python_examples/md_chain_nve_lj.py @@ -92,6 +92,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_chain_lj_module import introduction, conclusion, zero_cm, force, worst_bond, PotentialType @@ -102,6 +103,9 @@ def calc_variables ( ): sav_tag = 'sav' print('md_chain_nve_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVE ensemble, chain molecule') print('Particle mass=1 throughout') print('No periodic boundaries') diff --git a/python_examples/md_npt_lj.py b/python_examples/md_npt_lj.py index c00bce7..19689c0 100755 --- a/python_examples/md_npt_lj.py +++ b/python_examples/md_npt_lj.py @@ -241,6 +241,7 @@ def u4_propagator ( t, j_list ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_lj_module import introduction, conclusion, force, PotentialType @@ -252,6 +253,9 @@ def u4_propagator ( t, j_list ): m = 3 # Number of Nose-Hoover chain variables print('md_npt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NPT ensemble') print('Particle mass=1 throughout') diff --git a/python_examples/md_nve_hs.py b/python_examples/md_nve_hs.py index b51f18d..ae31c0f 100755 --- a/python_examples/md_nve_hs.py +++ b/python_examples/md_nve_hs.py @@ -88,6 +88,7 @@ def advance ( t, box, t_now, coltime, r, v ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_nve_hs_module import introduction, conclusion, update, dndate, collide, overlap @@ -98,6 +99,9 @@ def advance ( t, box, t_now, coltime, r, v ): sav_tag = 'sav' print('md_nve_hs') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVE, hard spheres') print('Particle mass=1 throughout') diff --git a/python_examples/md_nve_lj.py b/python_examples/md_nve_lj.py index e842330..19f9bbc 100755 --- a/python_examples/md_nve_lj.py +++ b/python_examples/md_nve_lj.py @@ -108,6 +108,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_lj_module import introduction, conclusion, force, PotentialType @@ -118,6 +119,9 @@ def calc_variables ( ): sav_tag = 'sav' print('md_nve_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVE ensemble') print('Particle mass=1 throughout') diff --git a/python_examples/md_nvt_lj.py b/python_examples/md_nvt_lj.py index a93310c..bb1666e 100755 --- a/python_examples/md_nvt_lj.py +++ b/python_examples/md_nvt_lj.py @@ -182,6 +182,7 @@ def u4_propagator ( t, j_list ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_lj_module import introduction, conclusion, force, PotentialType @@ -193,6 +194,9 @@ def u4_propagator ( t, j_list ): m = 3 # Number of Nose-Hoover chain variables print('md_nvt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVT ensemble') print('Particle mass=1 throughout') diff --git a/python_examples/md_nvt_lj_le.py b/python_examples/md_nvt_lj_le.py index 08f807e..2142a2d 100755 --- a/python_examples/md_nvt_lj_le.py +++ b/python_examples/md_nvt_lj_le.py @@ -148,6 +148,7 @@ def b2_propagator ( t ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from md_lj_le_module import introduction, conclusion, force, PotentialType @@ -159,6 +160,9 @@ def b2_propagator ( t ): tol = 1.0e-6 print('md_nvt_lj_le') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVT ensemble, Lees-Edwards') print('Particle mass=1 throughout') diff --git a/python_examples/md_nvt_poly_lj.py b/python_examples/md_nvt_poly_lj.py index 3f5af71..0d2bc64 100755 --- a/python_examples/md_nvt_poly_lj.py +++ b/python_examples/md_nvt_poly_lj.py @@ -174,6 +174,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_mols, write_cnf_mols from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import q_to_a @@ -185,6 +186,9 @@ def calc_variables ( ): sav_tag = 'sav' print('md_nvt_poly_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Molecular dynamics, constant-NVT/NVE ensemble') print('Molecular mass=1 throughout') diff --git a/python_examples/mesh.py b/python_examples/mesh.py index d5c8a83..e63296d 100755 --- a/python_examples/mesh.py +++ b/python_examples/mesh.py @@ -34,9 +34,16 @@ import json import sys import numpy as np +from platform import python_version from mesh_module import mesh_function print('mesh') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('3-D mesh assignment of charges') +print('Unit box length, coordinates in range (0,1)') + # Read parameters in JSON format try: nml = json.load(sys.stdin) diff --git a/python_examples/pair_distribution.py b/python_examples/pair_distribution.py index 22fddb2..4c857c0 100755 --- a/python_examples/pair_distribution.py +++ b/python_examples/pair_distribution.py @@ -30,10 +30,16 @@ import sys import numpy as np import math -from config_io_module import read_cnf_atoms import os.path +from platform import python_version +from config_io_module import read_cnf_atoms print('pair_distribution') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Computes pair distribution function from set of configurations') + # Read parameters in JSON format try: nml = json.load(sys.stdin) diff --git a/python_examples/qmc_pi_lj.py b/python_examples/qmc_pi_lj.py index 54d4767..f7f928e 100755 --- a/python_examples/qmc_pi_lj.py +++ b/python_examples/qmc_pi_lj.py @@ -135,6 +135,7 @@ def rad_gyr ( r ): import json import sys import numpy as np +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import random_translate_vector, metropolis @@ -146,6 +147,9 @@ def rad_gyr ( r ): sav_tag = 'sav' print('qmc_pi_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Path-integral Monte Carlo, constant-NVT ensemble') print('Simulation uses cut (but not shifted) potential') diff --git a/python_examples/qmc_pi_sho.py b/python_examples/qmc_pi_sho.py index 22d5703..065c1dd 100755 --- a/python_examples/qmc_pi_sho.py +++ b/python_examples/qmc_pi_sho.py @@ -133,10 +133,16 @@ def e_pi_sho ( p, beta ): import sys import numpy as np import math +from platform import python_version from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import metropolis print('qmc_pi_sho') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Path Integral Monte Carlo simulation of a quantum oscillator') +print('Results in atomic units') # Read parameters in JSON format try: diff --git a/python_examples/qmc_walk_sho.py b/python_examples/qmc_walk_sho.py index 26e481d..c0e670b 100755 --- a/python_examples/qmc_walk_sho.py +++ b/python_examples/qmc_walk_sho.py @@ -52,8 +52,14 @@ import sys import importlib import numpy as np +from platform import python_version print('qmc_walk_sho') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Diffusion Monte Carlo simulation of a quantum oscillator') +print('Results in atomic units') # Read parameters in JSON format try: diff --git a/python_examples/sample_mean.py b/python_examples/sample_mean.py index 5972744..61e255b 100755 --- a/python_examples/sample_mean.py +++ b/python_examples/sample_mean.py @@ -30,8 +30,14 @@ # For details, see Chapter 4 of the text. import numpy as np +from platform import python_version print('sample_mean') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Estimates integral by sample-mean Monte Carlo') + np.random.seed() r_0 = np.array([1.0,2.0],dtype=np.float64) @@ -48,4 +54,5 @@ v = a_0 * f / tau_max print ( "{}{:10.5f}".format('Estimate =', v) ) +print ( "{}{:10.5f}".format('Exact =', 5/3) ) diff --git a/python_examples/smc_nvt_lj.py b/python_examples/smc_nvt_lj.py index 1f34b8d..3b9b969 100755 --- a/python_examples/smc_nvt_lj.py +++ b/python_examples/smc_nvt_lj.py @@ -114,6 +114,7 @@ def calc_variables ( ): import sys import numpy as np import math +from platform import python_version from config_io_module import read_cnf_atoms, write_cnf_atoms from averages_module import run_begin, run_end, blk_begin, blk_end, blk_add from maths_module import metropolis @@ -125,6 +126,9 @@ def calc_variables ( ): sav_tag = 'sav' print('smc_nvt_lj') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Smart Monte Carlo, constant-NVT ensemble') # Read parameters in JSON format diff --git a/python_examples/t_tensor.py b/python_examples/t_tensor.py index f4ae037..de0bbf4 100755 --- a/python_examples/t_tensor.py +++ b/python_examples/t_tensor.py @@ -156,9 +156,13 @@ def skew ( a ): import json import sys import numpy as np +from platform import python_version from maths_module import random_vector print('t_tensor') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() print('Calculation of electrostatic interactions between linear molecules') print('using T-tensors and Euler angles') diff --git a/python_examples/test_pot_atom.py b/python_examples/test_pot_atom.py index 81631b9..8e27388 100755 --- a/python_examples/test_pot_atom.py +++ b/python_examples/test_pot_atom.py @@ -58,8 +58,13 @@ def random_positions(n): import sys import importlib import numpy as np +from platform import python_version print('test_pot_atom') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Tests potential and forces for atoms') # Read parameters in JSON format try: diff --git a/python_examples/test_pot_linear.py b/python_examples/test_pot_linear.py index 1bf7e7d..a8a4259 100755 --- a/python_examples/test_pot_linear.py +++ b/python_examples/test_pot_linear.py @@ -67,9 +67,14 @@ def random_orientations(n): import sys import importlib import numpy as np +from platform import python_version from maths_module import rotate_vector print('test_pot_linear') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Tests potential, forces, and torques, for linear molecules') # Read parameters in JSON format try: diff --git a/python_examples/wl_hist.py b/python_examples/wl_hist.py index f8cca43..867b96e 100755 --- a/python_examples/wl_hist.py +++ b/python_examples/wl_hist.py @@ -35,6 +35,13 @@ import sys import numpy as np import math +from platform import python_version + +print('wl_hist') +print('Python: '+python_version()) +print('NumPy: '+np.__version__) +print() +print('Processes histograms generated by mc_chain_wl_sw') hist_file = input("Enter histogram file name: ") print('Reading histograms from '+hist_file) diff --git a/qmc_pi_lj.f90 b/qmc_pi_lj.f90 index 7a56bfd..855c725 100644 --- a/qmc_pi_lj.f90 +++ b/qmc_pi_lj.f90 @@ -46,12 +46,14 @@ PROGRAM qmc_pi_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in qmc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis, random_translate_vector - USE qmc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & potential_1, spring_1, potential, spring, n, p, r, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis, random_translate_vector + USE qmc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & potential_1, spring_1, potential, spring, n, p, r, potential_type IMPLICIT NONE @@ -80,7 +82,10 @@ PROGRAM qmc_pi_lj NAMELIST /nml/ nblock, nstep, p, temperature, r_cut, dr_max, dc_max, lambda - WRITE ( unit=output_unit, fmt='(a)' ) 'qmc_pi_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'qmc_pi_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Path-integral Monte Carlo, constant-NVT ensemble' WRITE ( unit=output_unit, fmt='(a)' ) 'Simulation uses cut (but not shifted) potential' CALL introduction diff --git a/qmc_pi_sho.f90 b/qmc_pi_sho.f90 index 325b9e2..c577b91 100644 --- a/qmc_pi_sho.f90 +++ b/qmc_pi_sho.f90 @@ -41,9 +41,11 @@ PROGRAM qmc_pi_sho ! Reads several variables and options from standard input using a namelist nml ! Leave namelist empty to accept supplied defaults - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : metropolis + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : metropolis IMPLICIT NONE @@ -64,7 +66,10 @@ PROGRAM qmc_pi_sho NAMELIST /nml/ p, temperature, nstep, nblock, nequil, dx_max - WRITE ( unit=output_unit, fmt='(a)' ) 'qmc_pi_sho' + WRITE ( unit=output_unit, fmt='(a)' ) 'qmc_pi_sho' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Path Integral Monte Carlo simulation of a quantum oscillator' WRITE ( unit=output_unit, fmt='(a)' ) 'Results in atomic units' diff --git a/qmc_walk_sho.f90 b/qmc_walk_sho.f90 index fe7ee75..4bd5f81 100644 --- a/qmc_walk_sho.f90 +++ b/qmc_walk_sho.f90 @@ -47,9 +47,11 @@ PROGRAM qmc_walk_sho ! Many of the parameters, and the updating scheme for et, are taken from the following paper: ! I Kostin, B Faber and K Schulten, Amer J Phys, 64, 633 (1996) - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE averages_module, ONLY : time_stamp - USE maths_module, ONLY : random_normal + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE averages_module, ONLY : time_stamp + USE maths_module, ONLY : random_normal IMPLICIT NONE @@ -70,9 +72,12 @@ PROGRAM qmc_walk_sho NAMELIST /nml/ production_steps, equilibration_steps, output_interval, x_max, et, ds, n_bin, n_max, n_target - WRITE ( unit=output_unit, fmt='(a)') 'qmc_walk_sho' - WRITE ( unit=output_unit, fmt='(a)') 'Diffusion Monte Carlo simulation of a quantum oscillator' - WRITE ( unit=output_unit, fmt='(a)') 'Results in atomic units' + WRITE ( unit=output_unit, fmt='(a)' ) 'qmc_walk_sho' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Diffusion Monte Carlo simulation of a quantum oscillator' + WRITE ( unit=output_unit, fmt='(a)' ) 'Results in atomic units' CALL time_stamp ! Set up default parameters for the simulation diff --git a/sample_mean.f90 b/sample_mean.f90 index 04995fb..1d1ddab 100644 --- a/sample_mean.f90 +++ b/sample_mean.f90 @@ -25,7 +25,10 @@ PROGRAM sample_mean ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit + ! No parameters need be supplied by the user. The exact value of the integral is 5/3. + ! For details, see Chapter 4 of the text. + + USE, INTRINSIC :: iso_fortran_env, ONLY : output_unit, COMPILER_VERSION, COMPILER_OPTIONS IMPLICIT NONE @@ -35,6 +38,12 @@ PROGRAM sample_mean REAL, PARAMETER :: a_0 = PRODUCT(r_0) INTEGER :: tau, tau_max + WRITE ( unit=output_unit, fmt='(a)' ) 'sample_mean' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Estimates integral by sample-mean Monte Carlo' + CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator tau_max = 1000000 @@ -48,5 +57,6 @@ PROGRAM sample_mean END DO v = a_0 * f / REAL ( tau_max ) WRITE ( unit=output_unit, fmt='(a,f10.5)' ) 'Estimate = ', v + WRITE ( unit=output_unit, fmt='(a,f10.5)' ) 'Exact = ', 5.0/3.0 END PROGRAM sample_mean diff --git a/smc_nvt_lj.f90 b/smc_nvt_lj.f90 index 1055fd2..402755b 100644 --- a/smc_nvt_lj.f90 +++ b/smc_nvt_lj.f90 @@ -46,12 +46,14 @@ PROGRAM smc_nvt_lj ! Despite the program name, there is nothing here specific to Lennard-Jones ! The model is defined in smc_module - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms - USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add - USE maths_module, ONLY : random_normals, metropolis, lowercase - USE smc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & - & force, force_1, r, r_old, zeta, v, move, n, potential_type + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE config_io_module, ONLY : read_cnf_atoms, write_cnf_atoms + USE averages_module, ONLY : run_begin, run_end, blk_begin, blk_end, blk_add + USE maths_module, ONLY : random_normals, metropolis, lowercase + USE smc_module, ONLY : introduction, conclusion, allocate_arrays, deallocate_arrays, & + & force, force_1, r, r_old, zeta, v, move, n, potential_type IMPLICIT NONE @@ -77,7 +79,10 @@ PROGRAM smc_nvt_lj NAMELIST /nml/ nblock, nstep, r_cut, dt, single_atom, temperature, fraction - WRITE ( unit=output_unit, fmt='(a)' ) 'smc_nvt_lj' + WRITE ( unit=output_unit, fmt='(a)' ) 'smc_nvt_lj' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Smart Monte Carlo, constant-NVT ensemble' CALL introduction diff --git a/t_tensor.f90 b/t_tensor.f90 index f14774b..0b4ccb2 100644 --- a/t_tensor.f90 +++ b/t_tensor.f90 @@ -42,7 +42,8 @@ PROGRAM t_tensor ! NB in the text, eqn (1.15), the signs of the odd-rank terms in the energy are wrong. ! See https://github.com/Allen-Tildesley/corrections. The correct formulae are used here. - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS USE maths_module, ONLY : random_vector, outer_product, cross_product @@ -60,7 +61,10 @@ PROGRAM t_tensor NAMELIST /nml/ d_min, d_max, mu1_mag, mu2_mag, quad1_mag, quad2_mag - WRITE ( unit=output_unit, fmt='(a)' ) 'T-tensor' + WRITE ( unit=output_unit, fmt='(a)' ) 't_tensor' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + WRITE ( unit=output_unit, fmt='(a)' ) 'Calculation of electrostatic interactions between linear molecules' WRITE ( unit=output_unit, fmt='(a)' ) 'using T-tensors and Euler angles' diff --git a/test_pot_atom.f90 b/test_pot_atom.f90 index dedf931..99bdcfd 100644 --- a/test_pot_atom.f90 +++ b/test_pot_atom.f90 @@ -25,9 +25,11 @@ PROGRAM test_pot_atom ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE test_pot_module, ONLY : n, force - USE maths_module, ONLY : cross_product + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE test_pot_module, ONLY : n, force + USE maths_module, ONLY : cross_product IMPLICIT NONE @@ -46,6 +48,12 @@ PROGRAM test_pot_atom NAMELIST /nml/ delta, d_min, d_max, pot_max, ntry, npos + WRITE ( unit=output_unit, fmt='(a)' ) 'test_pot_atom' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Tests potential and forces for atoms' + CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator ! Default values: any of the following could be empirically adjusted diff --git a/test_pot_linear.f90 b/test_pot_linear.f90 index 43953fd..ba10853 100644 --- a/test_pot_linear.f90 +++ b/test_pot_linear.f90 @@ -25,9 +25,11 @@ PROGRAM test_pot_linear ! the software, you should not imply endorsement by the authors or publishers. ! !------------------------------------------------------------------------------------------------! - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor - USE test_pot_module, ONLY : n, force - USE maths_module, ONLY : rotate_vector, cross_product + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS + + USE test_pot_module, ONLY : n, force + USE maths_module, ONLY : rotate_vector, cross_product IMPLICIT NONE @@ -49,6 +51,12 @@ PROGRAM test_pot_linear NAMELIST /nml/ delta, d_min, d_max, pot_max, ntry, npos + WRITE ( unit=output_unit, fmt='(a)' ) 'test_pot_linear' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Tests potential, forces, and torques, for linear molecules' + CALL RANDOM_INIT ( .FALSE., .TRUE. ) ! Initialize random number generator ! Default values: any of the following could be empirically adjusted diff --git a/wl_hist.f90 b/wl_hist.f90 index 3a15e39..36d6a25 100644 --- a/wl_hist.f90 +++ b/wl_hist.f90 @@ -31,7 +31,8 @@ PROGRAM wl_hist ! number of atoms in chain (solely to make PE and Cv intensive) ! one temperature per line (as many lines as you like) - USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor + USE, INTRINSIC :: iso_fortran_env, ONLY : input_unit, output_unit, error_unit, iostat_end, iostat_eor, & + & COMPILER_VERSION, COMPILER_OPTIONS IMPLICIT NONE @@ -45,6 +46,12 @@ PROGRAM wl_hist REAL :: t, s_max, norm, g_avg, e_avg, e_msd CHARACTER(len=20) :: hist_file + WRITE ( unit=output_unit, fmt='(a)' ) 'wl_hist' + WRITE ( unit=output_unit, fmt='(2a)' ) 'Compiler: ', COMPILER_VERSION() + WRITE ( unit=output_unit, fmt='(2a/)' ) 'Options: ', COMPILER_OPTIONS() + + WRITE ( unit=output_unit, fmt='(a)' ) 'Processes histograms generated by mc_chain_wl_sw' + ! Read histogram filename READ ( unit=input_unit, fmt='(a)' ) hist_file WRITE ( unit=output_unit, fmt='(a,a)' ) 'Reading histograms from ', hist_file