Documentation for module mc_misc

contains miscellaneous subroutines used in the Monte Carlo runs, mostly I/O stuff

source: mc_misc.F
Loading...

public Subroutines/Functions:

writes a bunch of simulation data to the specified unit
initializes the structure that holds running averages of MC variables
deallocates the structure that holds running averages of MC variables
writes a new input file that CP2K can read in for when we want to change a force env (change molecule number)...this is much simpler than the version I had used to have, and also more flexible (in a way). It assumes that &CELL comes before &COORDS, and &COORDS comes before &TOPOLOGY, and &TOPOLOGY comes before &GLOBAL (which comes before MC). It also assumes that you use &MOL_SET in &TOPOLOGY. Still, many fewer assumptions than before.

SUBROUTINEfinal_mc_write(mc_par, all_moves, iw, energy_check, initial_energy, final_energy, averages)

writes a bunch of simulation data to the specified unit

Arguments:
POINTER
:: mc_par the mc parameters for the simulation
POINTER
:: all_moves(:) the structure that holds data on how many moves are accepted/rejected
INTEGER,
INTENT(in)
:: iw the unit to write to
REAL(dp),
INTENT(in)
:: energy_check the sum of the energy changes of each move
REAL(dp),
INTENT(in)
:: initial_energy the initial unbiased energy of the system
REAL(dp),
INTENT(in)
:: final_energy the final unbiased energy of the system
POINTER
:: averages the structure that holds computed average properites for the simulation

SUBROUTINEmc_averages_create(averages)

initializes the structure that holds running averages of MC variables

Arguments:
POINTER
:: averages the mc_averages strucutre you want to initialize

SUBROUTINEmc_averages_release(averages)

deallocates the structure that holds running averages of MC variables

Arguments:
POINTER
:: averages the mc_averages strucutre you want to release

SUBROUTINEmc_make_dat_file_new(coordinates, atom_names, nunits_tot, box_length, filename, nchains, mc_input_file)

writes a new input file that CP2K can read in for when we want to change a force env (change molecule number)...this is much simpler than the version I had used to have, and also more flexible (in a way). It assumes that &CELL comes before &COORDS, and &COORDS comes before &TOPOLOGY, and &TOPOLOGY comes before &GLOBAL (which comes before MC). It also assumes that you use &MOL_SET in &TOPOLOGY. Still, many fewer assumptions than before.

Arguments:
REAL(dp),
INTENT(inout)
:: coordinates(:,:) the coordiantes of the atoms in the force_env (a.u.)
CHARACTER(*),
INTENT(in)
:: atom_names(:) ...
INTEGER,
INTENT(in)
:: nunits_tot the total number of atoms
REAL(dp),
INTENT(in)
:: box_length(1:3) the length of all sides of the simulation box (angstrom)
CHARACTER(*),
INTENT(in)
:: filename the name of the file to write to
INTEGER,
INTENT(in)
:: nchains(:) ...
POINTER
:: mc_input_file ...