(git:6a2e663)
tmc_calculations Module Reference

calculation section for TreeMonteCarlo More...

Functions/Subroutines

subroutine, public calc_potential_energy (conf, env_id, exact_approx_pot, tmc_env)
 start the calculation of the energy (distinguish between exact and approximate) More...
 
subroutine, public get_scaled_cell (cell, box_scale, scaled_hmat, scaled_cell, vol, abc, vec)
 handles properties and calculations of a scaled cell More...
 
subroutine, public get_cell_scaling (cell, scaled_hmat, box_scale)
 handles properties and calculations of a scaled cell More...
 
real(kind=dp) function, public nearest_distance (x1, x2, cell, box_scale)
 neares distance of atoms within the periodic boundary condition More...
 
subroutine, public geometrical_center (pos, center)
 calculate the geometrical center of an amount of atoms array size should be multiple of dim_per_elem More...
 
subroutine, public center_of_mass (pos, atoms, center)
 calculate the center of mass of an amount of atoms array size should be multiple of dim_per_elem More...
 
subroutine, public init_vel (vel, atoms, temerature, rng_stream, rnd_seed)
 routine sets initial velocity, using the Box-Muller Method for Normal (Gaussian) Deviates More...
 
real(kind=dp) function, public calc_e_kin (vel, atoms)
 routine calculates the kinetic energy, using the velocities and atom mass, both in atomic units More...
 
real(kind=dp) function, public compute_estimated_prob (elem_old, elem_new, E_classical_diff, rnd_nr, beta, tmc_params)
 extimates the probability of acceptance considering the intermetiate step energies More...
 
subroutine, public get_subtree_efficiency (tmc_env, eff)
 calculated the rate of used tree elements to created tree elements for every temperature More...
 

Detailed Description

calculation section for TreeMonteCarlo

History
11.2012 created [Mandes Schoenherr]
Author
Mandes

Function/Subroutine Documentation

◆ calc_potential_energy()

subroutine, public tmc_calculations::calc_potential_energy ( type(tree_type), pointer  conf,
integer  env_id,
logical  exact_approx_pot,
type(tmc_env_type), pointer  tmc_env 
)

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

Parameters
confactual configurations to calculate potential energy
env_idf77_interface env id
exact_approx_potflag if result should be stores in exact or approx energy variable
tmc_envTMC environment parameters
Author
Mandes 01.2013

Definition at line 65 of file tmc_calculations.F.

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

◆ get_scaled_cell()

subroutine, public tmc_calculations::get_scaled_cell ( type(cell_type), intent(in), pointer  cell,
real(kind=dp), dimension(:), pointer  box_scale,
real(kind=dp), dimension(3, 3), optional  scaled_hmat,
type(cell_type), optional, pointer  scaled_cell,
real(kind=dp), optional  vol,
real(kind=dp), dimension(3), intent(out), optional  abc,
real(kind=dp), dimension(3), optional  vec 
)

handles properties and calculations of a scaled cell

Parameters
celloriginal cell
box_scalescaling factors for each direction
scaled_hmatreturns the scaled h matrix (matrix of cell vectors)
scaled_cell...
volreturns the cell volume
abc...
veca vector, which will be folded (pbc) in the cell
Author
Mandes 11.2012

Definition at line 151 of file tmc_calculations.F.

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

◆ get_cell_scaling()

subroutine, public tmc_calculations::get_cell_scaling ( type(cell_type), intent(in), pointer  cell,
real(kind=dp), dimension(3, 3), intent(in)  scaled_hmat,
real(kind=dp), dimension(:), intent(out)  box_scale 
)

handles properties and calculations of a scaled cell

Parameters
celloriginal cell
scaled_hmatreturns the scaled h matrix (matrix of cell vectors)
box_scalescaling factors for each direction
Author
Mandes 11.2012

Definition at line 201 of file tmc_calculations.F.

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

◆ nearest_distance()

real(kind=dp) function, public tmc_calculations::nearest_distance ( real(kind=dp), dimension(:)  x1,
real(kind=dp), dimension(:)  x2,
type(cell_type), pointer  cell,
real(kind=dp), dimension(:), optional, pointer  box_scale 
)

neares distance of atoms within the periodic boundary condition

Parameters
x1...
x2...
cell...
box_scale...
Returns
...
Author
Mandes 11.2012

Definition at line 232 of file tmc_calculations.F.

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

◆ geometrical_center()

subroutine, public tmc_calculations::geometrical_center ( real(kind=dp), dimension(:)  pos,
real(kind=dp), dimension(:), pointer  center 
)

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

Parameters
poslist of atoms
centerreturn value, the geometrical center
Author
Mandes 11.2012

Definition at line 267 of file tmc_calculations.F.

Here is the caller graph for this function:

◆ center_of_mass()

subroutine, public tmc_calculations::center_of_mass ( real(kind=dp), dimension(:)  pos,
type(tmc_atom_type), dimension(:), optional  atoms,
real(kind=dp), dimension(:), pointer  center 
)

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

Parameters
pos...
atoms...
center...

Definition at line 300 of file tmc_calculations.F.

Here is the caller graph for this function:

◆ init_vel()

subroutine, public tmc_calculations::init_vel ( real(kind=dp), dimension(:), pointer  vel,
type(tmc_atom_type), dimension(:), pointer  atoms,
real(kind=dp)  temerature,
type(rng_stream_type), intent(inout)  rng_stream,
real(kind=dp), dimension(3, 2, 3)  rnd_seed 
)

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

Parameters
vel...
atoms...
temerature...
rng_stream...
rnd_seed...
Author
Mandes 11.2012

Definition at line 347 of file tmc_calculations.F.

Here is the caller graph for this function:

◆ calc_e_kin()

real(kind=dp) function, public tmc_calculations::calc_e_kin ( real(kind=dp), dimension(:), pointer  vel,
type(tmc_atom_type), dimension(:), pointer  atoms 
)

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

Parameters
vel...
atoms...
Returns
...
Author
Mandes 11.2012

Definition at line 384 of file tmc_calculations.F.

Here is the caller graph for this function:

◆ compute_estimated_prob()

real(kind=dp) function, public tmc_calculations::compute_estimated_prob ( type(tree_type), pointer  elem_old,
type(tree_type), pointer  elem_new,
real(kind=dp)  E_classical_diff,
real(kind=dp)  rnd_nr,
real(kind=dp)  beta,
type(tmc_param_type), pointer  tmc_params 
)

extimates the probability of acceptance considering the intermetiate step energies

Parameters
elem_oldold/parent sub tree element
elem_newnew/actual sub tree element, which schould be checked
E_classical_diffdifference in the classical energy of the old and new configuration
rnd_nrrandom number acceptance check will be done with
beta1/(kB*T) can differ for different acceptance checks
tmc_paramsTMC environment parameters
Returns
estimated acceptance probability
Author
Mandes 12.2012

Definition at line 520 of file tmc_calculations.F.

Here is the caller graph for this function:

◆ get_subtree_efficiency()

subroutine, public tmc_calculations::get_subtree_efficiency ( type(tmc_env_type), pointer  tmc_env,
real(kind=dp), dimension(:), pointer  eff 
)

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

Parameters
tmc_envTMC environment variables
effresult efficiency
Author
Mandes 01.2013

Definition at line 601 of file tmc_calculations.F.

Here is the caller graph for this function: