(git:6a2e663)
mc_misc Module Reference

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

Functions/Subroutines

subroutine, public mc_averages_create (averages)
 initializes the structure that holds running averages of MC variables More...
 
subroutine, public mc_averages_release (averages)
 deallocates the structure that holds running averages of MC variables More...
 
subroutine, public final_mc_write (mc_par, all_moves, iw, energy_check, initial_energy, final_energy, averages)
 writes a bunch of simulation data to the specified unit More...
 
subroutine, public mc_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. More...
 

Detailed Description

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

Author
MJM

Function/Subroutine Documentation

◆ mc_averages_create()

subroutine, public mc_misc::mc_averages_create ( type(mc_averages_type), pointer  averages)

initializes the structure that holds running averages of MC variables

Parameters
averagesthe mc_averages strucutre you want to initialize

Suitable for parallel.

Author
MJM

Definition at line 45 of file mc_misc.F.

Here is the caller graph for this function:

◆ mc_averages_release()

subroutine, public mc_misc::mc_averages_release ( type(mc_averages_type), pointer  averages)

deallocates the structure that holds running averages of MC variables

Parameters
averagesthe mc_averages strucutre you want to release

Suitable for parallel.

Author
MJM

Definition at line 76 of file mc_misc.F.

Here is the caller graph for this function:

◆ final_mc_write()

subroutine, public mc_misc::final_mc_write ( type(mc_simpar_type), pointer  mc_par,
type(mc_moves_p_type), dimension(:), pointer  all_moves,
integer, intent(in)  iw,
real(kind=dp), intent(in)  energy_check,
real(kind=dp), intent(in)  initial_energy,
real(kind=dp), intent(in)  final_energy,
type(mc_averages_type), pointer  averages 
)

writes a bunch of simulation data to the specified unit

Parameters
mc_parthe mc parameters for the simulation
all_movesthe structure that holds data on how many moves are accepted/rejected
iwthe unit to write to
energy_checkthe sum of the energy changes of each move
initial_energythe initial unbiased energy of the system
final_energythe final unbiased energy of the system
averagesthe structure that holds computed average properties for the simulation

Only use in serial.

Author
MJM

Definition at line 113 of file mc_misc.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mc_make_dat_file_new()

subroutine, public mc_misc::mc_make_dat_file_new ( real(kind=dp), dimension(:, :), intent(inout)  coordinates,
character(len=*), dimension(:), intent(in)  atom_names,
integer, intent(in)  nunits_tot,
real(kind=dp), dimension(1:3), intent(in)  box_length,
character(len=*), intent(in)  filename,
integer, dimension(:), intent(in)  nchains,
type(mc_input_file_type), pointer  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.

box_length and coordinates should be passed in a.u.

Parameters
coordinatesthe coordinates of the atoms in the force_env (a.u.)
atom_names...
nunits_totthe total number of atoms
box_lengththe length of all sides of the simulation box (angstrom)
filenamethe name of the file to write to
nchains...
mc_input_file...
Author
MJM
Note
Only use in serial.

Definition at line 459 of file mc_misc.F.

Here is the call graph for this function:
Here is the caller graph for this function: