Documentation for module tmc_calculations

calculation section for TreeMonteCarlo

source: tmc_calculations.F
Loading...

public Subroutines/Functions:

FUNCTION
REAL(dp)
calc_e_kin (vel, atoms)
routine calculates the kinetic energy, using the velocities and atom mass, both in atomic units
start the calculation of the energy (distinguish between exact and approximate)
calculate the center of mass of an amount of atoms array size should be multiple of dim_per_elem
extimates the probability of acceptance considering the intermetiate step energies
calculate the geometrical center of an amount of atoms array size should be multiple of dim_per_elem
handles properties and calculations of a scaled cell
handles properties and calculations of a scaled cell
calculated the rate of used tree elements to created tree elements for every temperature
routine sets initial velocity, using the Box-Muller Method for Normal (Gaussian) Deviates
FUNCTION
REAL(dp)
nearest_distance (x1, x2, cell, box_scale)
neares distance of atoms within the periodic boundary condition

FUNCTIONcalc_e_kin(vel, atoms)

routine calculates the kinetic energy, using the velocities and atom mass, both in atomic units

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
POINTER
:: vel(:) ...
POINTER
:: atoms(:) ...

SUBROUTINEcalc_potential_energy(conf, env_id, exact_approx_pot, tmc_env)

start the calculation of the energy (distinguish between exact and approximate)

Arguments:
TYPE(tree_type),
POINTER
:: conf actual configurations to calculate potential energy
INTEGER
:: env_id f77_interface env id
LOGICAL
:: exact_approx_pot flag if result should be stores in exact or approx energy variable
POINTER
:: tmc_env TMC environment parameters

SUBROUTINEcenter_of_mass(pos, atoms, center)

calculate the center of mass of an amount of atoms array size should be multiple of dim_per_elem

Arguments:
REAL(dp)
:: pos(:) ...
OPTIONAL
:: atoms(:) ...
REAL(dp),
POINTER
:: center(:) ...

FUNCTIONcompute_estimated_prob(elem_old, elem_new, e_classical_diff, rnd_nr, beta, tmc_params)

extimates the probability of acceptance considering the intermetiate step energies

Return Value ::
REAL(dp)
estimated acceptance probability
Arguments:
TYPE(tree_type),
POINTER
:: elem_old old/parent sub tree element
TYPE(tree_type),
POINTER
:: elem_new new/actual sub tree element, which schould be checked
REAL(dp)
:: e_classical_diff difference in the classical energy of the old and new configuration
REAL(dp)
:: rnd_nr random number acceptance check will be done with
REAL(dp)
:: beta 1/(kB*T) can differ for different acceptance checks
POINTER
:: tmc_params TMC environment parameters

SUBROUTINEgeometrical_center(pos, center)

calculate the geometrical center of an amount of atoms array size should be multiple of dim_per_elem

Arguments:
REAL(dp)
:: pos(:) list of atoms
REAL(dp),
POINTER
:: center(:) return value, the geometrical center

SUBROUTINEget_cell_scaling(cell, scaled_hmat, box_scale)

handles properties and calculations of a scaled cell

Arguments:
TYPE(cell_type),
INTENT(in),
POINTER
:: cell original cell
REAL(dp),
INTENT(in)
:: scaled_hmat(3,3) returns the scaled h matrix (matrix of cell vectors)
REAL(dp),
INTENT(out)
:: box_scale(:) scaling factors for each direction

SUBROUTINEget_scaled_cell(cell, box_scale, scaled_hmat, scaled_cell, vol, abc, vec)

handles properties and calculations of a scaled cell

Arguments:
TYPE(cell_type),
INTENT(in),
POINTER
:: cell original cell
REAL(dp),
POINTER
:: box_scale(:) scaling factors for each direction
REAL(dp),
OPTIONAL
:: scaled_hmat(3,3) returns the scaled h matrix (matrix of cell vectors)
TYPE(cell_type),
OPTIONAL, POINTER
:: scaled_cell ...
REAL(dp),
OPTIONAL
:: vol returns the cell volume
REAL(dp),
INTENT(out),
OPTIONAL
:: abc(3) ...
REAL(dp),
OPTIONAL
:: vec(3) a vector, which will be folded (pbc) in the cell

SUBROUTINEget_subtree_efficiency(tmc_env, eff)

calculated the rate of used tree elements to created tree elements for every temperature

Arguments:
POINTER
:: tmc_env TMC environment variables
REAL(dp),
POINTER
:: eff(:) result efficiency

SUBROUTINEinit_vel(vel, atoms, temerature, rng_stream, rnd_seed)

routine sets initial velocity, using the Box-Muller Method for Normal (Gaussian) Deviates

Arguments:
REAL(dp),
POINTER
:: vel(:) ...
POINTER
:: atoms(:) ...
REAL(dp)
:: temerature ...
POINTER
:: rng_stream ...
REAL(dp)
:: rnd_seed(3,2,3) ...

FUNCTIONnearest_distance(x1, x2, cell, box_scale)

neares distance of atoms within the periodic boundary condition

Return Value ::
REAL(dp)
Arguments:
REAL(dp)
:: x1(:) ...
REAL(dp)
:: x2(:) ...
TYPE(cell_type),
POINTER
:: cell ...
REAL(dp),
OPTIONAL, POINTER
:: box_scale(:) ...