Documentation for module mc_moves

the various moves in Monte Carlo (MC) simulations, including change of internal conformation, translation of a molecule, rotation of a molecule, and changing the size of the simulation box

source: mc_moves.F
Loading...

public Subroutines/Functions:

performs either a bond or angle change move for a given molecule
translates the cluster randomly in either the x,y, or z direction
performs either a bond or angle change move for a given molecule
performs a hybrid Monte Carlo move that runs a short MD sequence
rotates the given molecule randomly around the x,y, or z axis... only works for water at the moment
translates the given molecule randomly in either the x,y, or z direction
performs a Monte Carlo move that alters the volume of the simulation box

SUBROUTINEmc_avbmc_move(mc_par, force_env, bias_env, moves, energy_check, r_old, old_energy, start_atom_swap, target_atom, molecule_type, box_number, bias_energy_old, last_bias_energy, move_type, rng_stream)

performs either a bond or angle change move for a given molecule

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment used in the move
POINTER
:: bias_env the force environment used to bias the move, if any (it may be null if lbias=.false. in mc_par)
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
REAL(dp),
INTENT(inout)
:: energy_check the running energy difference between now and the inital energy
REAL(dp),
INTENT(inout)
:: r_old(:,:) the coordinates of force_env before the move
REAL(dp),
INTENT(inout)
:: old_energy the energy of the force_env before the move
INTEGER,
INTENT(in)
:: start_atom_swap the number of the swap molecule's first atom, assuming the rest of the atoms follow sequentially
INTEGER,
INTENT(in)
:: target_atom the number of the target atom for swapping
INTEGER,
INTENT(in)
:: molecule_type the molecule type for the atom we're swapping
INTEGER,
INTENT(in)
:: box_number the number of the box we're doing this move in
REAL(dp),
INTENT(inout)
:: bias_energy_old the biased energy of the system before the move
REAL(dp),
INTENT(inout)
:: last_bias_energy the last biased energy of the system
CHARACTER(*),
INTENT(in)
:: move_type dictates if we're moving to an "in" or "out" region
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_cluster_translation(mc_par, force_env, bias_env, moves, move_updates, box_number, bias_energy, lreject, rng_stream)

translates the cluster randomly in either the x,y, or z direction

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment used in the move
POINTER
:: bias_env the force environment used to bias the move, if any (it may be null if lbias=.false. in mc_par)
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
INTEGER,
INTENT(in)
:: box_number ...
REAL(dp),
INTENT(inout)
:: bias_energy the biased energy of the system before the move
LOGICAL,
INTENT(out)
:: lreject set to .true. if there is an overlap
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_conformation_change(mc_par, force_env, bias_env, moves, move_updates, start_atom, molecule_type, box_number, bias_energy, move_type, lreject, rng_stream)

performs either a bond or angle change move for a given molecule

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment used in the move
POINTER
:: bias_env the force environment used to bias the move, if any (it may be null if lbias=.false. in mc_par)
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
INTEGER,
INTENT(in)
:: start_atom the number of the molecule's first atom, assuming the rest of the atoms follow sequentially
INTEGER,
INTENT(in)
:: molecule_type the type of the molecule we're moving
INTEGER,
INTENT(in)
:: box_number the box the molecule is in
REAL(dp),
INTENT(inout)
:: bias_energy the biased energy of the system before the move
CHARACTER(*),
INTENT(in)
:: move_type dictates what kind of conformational change we do
LOGICAL,
INTENT(out)
:: lreject set to .true. if there is an overlap
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_hmc_move(mc_par, force_env, globenv, moves, move_updates, old_energy, box_number, energy_check, r_old, rng_stream)

performs a hybrid Monte Carlo move that runs a short MD sequence

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment whose cell we're changing
POINTER
:: globenv ...
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
REAL(dp),
INTENT(inout)
:: old_energy the energy of the last accepted move involving an unbiased calculation
INTEGER,
INTENT(in)
:: box_number the box we're changing the volume of
REAL(dp),
INTENT(inout)
:: energy_check the running total of how much the energy has changed since the initial configuration
REAL(dp),
INTENT(inout)
:: r_old(:,:) the coordinates of the last accepted move involving an unbiased calculation
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_molecule_rotation(mc_par, force_env, bias_env, moves, move_updates, box_number, start_atom, molecule_type, bias_energy, lreject, rng_stream)

rotates the given molecule randomly around the x,y, or z axis... only works for water at the moment

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment used in the move
POINTER
:: bias_env the force environment used to bias the move, if any (it may be null if lbias=.false. in mc_par)
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
INTEGER,
INTENT(in)
:: box_number the box the molecule is in
INTEGER,
INTENT(in)
:: start_atom the number of the molecule's first atom, assuming the rest of the atoms follow sequentially
INTEGER,
INTENT(in)
:: molecule_type the type of molecule we're moving
REAL(dp),
INTENT(inout)
:: bias_energy the biased energy of the system before the move
LOGICAL,
INTENT(out)
:: lreject set to .true. if there is an overlap
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_molecule_translation(mc_par, force_env, bias_env, moves, move_updates, start_atom, box_number, bias_energy, molecule_type, lreject, rng_stream)

translates the given molecule randomly in either the x,y, or z direction

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment used in the move
POINTER
:: bias_env the force environment used to bias the move, if any (it may be null if lbias=.false. in mc_par)
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
INTEGER,
INTENT(in)
:: start_atom the number of the molecule's first atom, assuming the rest of the atoms follow sequentially
INTEGER,
INTENT(in)
:: box_number the box the molecule is in
REAL(dp),
INTENT(inout)
:: bias_energy the biased energy of the system before the move
INTEGER,
INTENT(in)
:: molecule_type the type of molecule we're moving
LOGICAL,
INTENT(out)
:: lreject set to .true. if there is an overlap
POINTER
:: rng_stream the random number stream that we draw from

SUBROUTINEmc_volume_move(mc_par, force_env, moves, move_updates, old_energy, box_number, energy_check, r_old, iw, discrete_array, rng_stream)

performs a Monte Carlo move that alters the volume of the simulation box

Arguments:
POINTER
:: mc_par the mc parameters for the force env
POINTER
:: force_env the force environment whose cell we're changing
POINTER
:: moves the structure that keeps track of how many moves have been accepted/rejected
POINTER
:: move_updates the structure that keeps track of how many moves have been accepted/rejected since the last time the displacements were updated
REAL(dp),
INTENT(inout)
:: old_energy the energy of the last accepted move involving an unbiased calculation
INTEGER,
INTENT(in)
:: box_number the box we're changing the volume of
REAL(dp),
INTENT(inout)
:: energy_check the running total of how much the energy has changed since the initial configuration
REAL(dp),
INTENT(inout)
:: r_old(:,:) the coordinates of the last accepted move involving an unbiased calculation
INTEGER,
INTENT(in)
:: iw the unit number that writes to the screen
INTEGER,
INTENT(inout)
:: discrete_array(1:3,1:2) tells use which volumes we can do for the discrete case
POINTER
:: rng_stream the random number stream that we draw from