MCMC2 (version 1.1.2): A Monte Carlo code for multiply charged clusters
详细信息    查看全文
文摘
This version of the MCMC2 program corrects several glitches of earlier versions and adapts the keyword environment of radial, angular, and evaporation histograms to remove some useless columns in the data files or simply prevent their creation, when desired. Although most of the fixed bugs only resulted in warnings at compiling, one of them, related to an incorrect array reinitialization, was identified to be the main source of instabilities of earlier versions of the program when compiled with the ifort compiler. The setup keywords altered to take into account the aforementioned corrections and improvements are detailed at the end of the manuscript.

New version program summary

Program title: MCMC2.

Program Files doi: 10.17632/yr35brx38n.1

Licensing provisions: GNU General Public License (GPL) version 3.

Programming language: fortran 90 with MPI extensions for parallelization.

Journal reference of previous version: Comput. Phys. Comm. 196 (2015) 614

Nature of problem: We provide a general parallel code to investigate structural and thermodynamic properties of multiply charged clusters.

Solution method: Same as in the previous version.

Reasons for the new version:

Several glitches that may result in warnings at compiling or instabilities at the execution stage have been corrected. In particular, one of these glitches related to an incorrect array reinitialization might lead to crashes of the program. This bug is deemed to be the source of the instabilities denoted in earlier versions of the code when they were compiled with the ifort compiler. We also take advantage of this new version to improve the definition of the keywords devoted to the generation of histograms and we correct some comments throughout the program files.

Summary of revisions

1.

Additional features of MCMC2 version 1.1.2: Same as in the previous version.

2.

Modifications or corrections to MCMC2 version 1.1.1:

(a)

Major glitch correction. One major glitch related to an improper reinitialization of the logical array lpsim_swap devoted to the storage of rejection and acceptance decisions after Parallel Tempering (PT) or Parallel Charging (PC) configuration swap attempts has been corrected. In some cases, especially for the replica of higher number, the program attempted to reinitialize a component of the array lpsim_swap   that exceeded the array dimension which might cause memory errors. We performed several simulations of 1010 Monte Carlo (MC) steps on small clusters (100 particles) and large clusters (1000 particles) to ensure that the program was stable when compiling the code with several versions of the gfortran and ifort compilers. Former instabilities of the MC simulations attributed to possible issues with the ifort compilers [2] were probably a manifestation of this glitch.

Amended subroutines: simulate_nopol in lib4-nopol.f90, simulate_pol in lib4-pol.f90, and simulate_dampol in lib4-dampol.f90.

(b)

Correction of minor glitches. Recent gfortran and ifort compilers might generate some warnings at compiling MCMC2 version 1.1.1. Several subroutines have been slightly modified to remove these warnings.

i.

Alterations in lib1.f90: The integer iout is no longer defined as a parameter in the subroutine vranf (main routine of the lagged Fibonacci random number generator). It is also declared as INTENT(INOUT) instead of INTENT(IN) in the subroutines xuinit and xuwarm.

ii.

Alterations in lib4-nopol.f90: A dummy value “0” used in the call of the subroutine dLJ_nopol is replaced by an array called dummy   (of dimension N_part and declared as real) in the subroutine simulate_nopol.

iii.

Alterations in lib4-pol.f90 and lib4-dampol.f90: A dummy value “0” used in the call of the subroutine dLJ_pol (respectively dLJ_dampol) is replaced by an array called dummy   (of dimension N_part and declared as real) in the subroutine simulate_pol (respectively simulate_dampol). The arrays dr   (of type vector and dimension N_part×N_part) and dist   (of type real and dimension N_part×N_part) are declared as INTENT(INOUT) instead of INTENT(IN) in the subroutine LJ_pol2 (respectively LJ_dampol2).

(c)

Other minor corrections.

i.

The arrays racc and rrej used to evaluate the acceptance and rejection rates on each replica after PT or PC configuration swap attempts are converted into double precision reals since only one component of these arrays needs to be known per replica. This should save a small amount of memory.

Amended subroutines: simulate_nopol in lib4-nopol.f90, simulate_pol in lib4-pol.f90, simulate_dampol in lib4-dampol.f90, ptswap, pcswap_nopol, pcswap_pol, pcswap_dampol, ptswap2, pcswap2_nopol, pcswap2_pol, and pcswap2_dampol in lib5.f90.

ii.

A comment in the main file (main.f90) was incomplete: The second stage of the equilibration phase can be PT or PC depending on the setup file entries, and not PT only.

iii.

The dimension of revap, array that stores the number of evaporated particles, was incorrectly fixed to 3 instead of 5 in printin_stats_nopol (lib3-nopol.f90) which altered the intermediate files created at the end of each stage of a split simulation [2] involving charged particles.

iv.

The dimension of N_pol and N_nopol arrays is set to 4 instead of 2 in printout_evap_pol (lib3-pol.f90) to comply with their initial declaration in the module config (lib2.f90) although the two last components of these vectors are not currently used in printout_evap_pol.

(d)

Improvement of the evaporation histograms.

i.

A logical levap is added to enable the user not to generate the evaporation histograms.

ii.

A logical levap2 is added to enable the user to reinitialize to zero the evaporation histograms during split simulations.

iii.

Some comments are now printed in the output file to indicate whether the generation of evaporation histograms is deactivated.

Amended subroutines and modules: run_params in lib2.f90, read_setup in read_setup.f90, evap_nopol in lib3-nopol.f90, evap_pol in lib3-pol.f90, simulate_nopol in lib4-nopol.f90, simulate_pol in lib4-pol.f90, and simulate_dampol in lib4-dampol.f90.

(e)

Improvement of the angular distributions. The angular distributions represent the angles between the radius vectors of charge carriers. In earlier versions of the code the angular distributions were systematically evaluated for all the charge carriers within the cluster and for the charge carriers located at the cluster surface, whatever the cluster composition. In particular, the angular distribution files were filled with zeros when the cluster was neutral. In this case, the calculation of the angular distributions is now automatically deactivated by setting the input parameter cos_every to zero. A warning is added in the output file to inform the user of this reinitialization.

Amended routines and subroutines: main program MCMC2 in main.f90, print_surf, printin_surf and readin_surf in lib3.f90, histo_surf_nopol in lib3-nopol.f90, histo_surf_pol in lib3-pol.f90, simulate_nopol in lib4-nopol.f90, simulate_pol in lib4-pol.f90, and simulate_dampol in lib4-dampol.f90.

(f)

Improvement of the radial histograms.

i.

We remove the possibility to set radtyp=0, where radtyp is the parameter to select the type of radial histograms to be computed. This parameterization was redundant with the subkeyword USE of keyword RADIAL that was introduced in version 1.1 [3] to enable the deactivation of the calculation of radial histograms. The remaining integral values allowed for radtyp, namely 1−4, are subsequently shifted to 0−3.

ii.

radtyp=1 (i.e., generation of radial distributions for charged particles) is forbidden when the cluster is neutral. radtyp is then reinitialized to zero (default value).

iii.

radtyp=2 (i.e., generation of radial distributions for neutral particles) is forbidden when all the particles are charged. radtyp is then reinitialized to zero.

iv.

radtyp=3 (i.e., generation of radial distributions for all the particles, for charged particles, and for neutral particles) is forbidden when the cluster is neutral, only composed of positively charged particles, or only composed of negatively charged particles. In these three cases radtyp is reinitialized to zero.

These reinitializations of radtyp aimed to prevent the production of useless columns in the data files. Their omission in previous versions of the MCMC2 program did not affect the accuracy of the MC results. Amended routines and subroutines: main program MCMC2 in main.f90, read_setup in read_setup.f90, inhisto, inhisto_split, normhisto, printin_histo, readin_histo in lib3.f90, calhisto_nopol in lib4-nopol.f90, calhisto_pol in lib4-pol.f90

(g)

Modified comments. Some comments and column headers of the data files have been corrected.

3.

Modified setup keywords

RADIAL USE lrad GRIDRCOM deltagridstepgrid PARTICLE radtyp: Setting parameters for generating one-particle radial histograms. lrad indicates whether the user wants (lrad=.true.) or does not want (lrad=.false.) the calculation of radial histograms. These histograms cannot extend beyond the radius of the Monte Carlo container but, for graphical purposes, the user is allowed to add a small distance deltagrid to the grid size (=radius+deltagrid). stepgrid is the grid step for one-particle radial histograms with respect to the cluster center of mass. The grid origin is hardcoded to zero since these histograms are calculated with respect to the cluster center of mass. The number Ngrid of grid points is automatically determined in the code from the grid size and the grid step. radtyp enables the user to specify the type of particles to be considered in the radial histograms (0=all the particles without any distinction, 1=charged particles only, 2=neutral particles only, 3=all the previous histograms (3=0+1+2)). In case of inconsistency between the input configurations and the value of radtyp, this parameter is reinitialized to zero.

Default: lrad=.false., deltagrid=0, stepgrid=0.1, radtyp=0.

EVAPORATION USE levap PARTNB Npart_evap GRIDNB Nsamp_evap: Setting of parameters for defining the evaporation criterion and related histograms. levap indicates whether the user wants (levap=.true.) or does not want (levap=.false.) the calculation of evaporation histograms. Npart_evap defines the number of particles above which evaporation is assumed to be prominent during a MC sweep. Nsamp_evap is the bin size (in number of particles) selected for plotting the distribution of evaporated particles.

Default: levap=.false., Npart_evap=1 and Nsamp_evap=1.

SPLITSIM USE lsplitisplitnsplit ANALYSIS lsurflrad2langlevap2: Setting of parameters for running split MC simulations. lsplit indicates whether the user wants (lsplit=.true.) or does not want (lsplit=.false.) to run a split simulation. Each split simulation is composed of several stages where isplit is the number of the current stage and nsplit is the total number of stages. lsurf, lrad2, lang, and levap2 enable the user to reset the arrays for surface particle distributions, radial histograms, angular distributions of charged particles, and evaporation histograms (lsurf=.true., lrad2=.true., lang=.true., and levap2=.true.) or to use intermediate files (i.e., output files from the previous stage) as starting point of the next stage (lsurf=.false., lrad2=.false., lang=.false., and levap2=.false.).

Default: lsplit=.false., isplit=1, nsplit=2, lsurf=.false., lrad2=.false., lang=.false., levap2=.false.

[1]

D. A. Bonhommeau, MCMC2 (version 1.1.1): A Monte Carlo code for multiply charged clusters, Comput. Phys. Commun. 196 (2015) 614–616.

[2]

D. A. Bonhommeau, M.-P. Gaigeot, MCMC2: A Monte Carlo code for multiply-charged clusters, Comput. Phys. Commun. 184 (2013) 873–884.

[3]

D. A. Bonhommeau, M. Lewerenz, M.-P. Gaigeot, MCMC2 (version 1.1): A Monte Carlo code for multiply-charged clusters, Comput. Phys. Commun. 185 (2014) 1188–1191.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700