Documentation for module force_env_utils

Util force_env module

source: force_env_utils.F
Loading...

public Subroutines/Functions:

perform rattle (enforcing of constraints on velocities) This routine can be easily adapted to performe rattle on whatever other vector different from forces..
perform shake (enforcing of constraints)
Rescale forces if requested
Write forces
Variable precision output of the stress tensor

SUBROUTINEforce_env_rattle(force_env, dt, shake_tol, log_unit, lagrange_mult, dump_lm, vel, reset)

perform rattle (enforcing of constraints on velocities) This routine can be easily adapted to performe rattle on whatever other vector different from forces..

Arguments:
POINTER
:: force_env the force env to shake
REAL(dp),
INTENT(in),
OPTIONAL
:: dt the dt for shake (if you are not interested in the velocities it can be any positive number)
REAL(dp),
INTENT(in)
:: shake_tol the tolerance for shake
INTEGER,
INTENT(in),
OPTIONAL
:: log_unit if >0 then some information on the shake is printed, defaults to -1
INTEGER,
INTENT(in),
OPTIONAL
:: lagrange_mult ...
LOGICAL,
INTENT(in),
OPTIONAL
:: dump_lm ...
REAL(dp),
INTENT(inout),
OPTIONAL, TARGET
:: vel(:,:) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: reset ...

SUBROUTINEforce_env_shake(force_env, dt, shake_tol, log_unit, lagrange_mult, dump_lm, pos, vel, compold, reset)

perform shake (enforcing of constraints)

Arguments:
POINTER
:: force_env the force env to shake
REAL(dp),
INTENT(in),
OPTIONAL
:: dt the dt for shake (if you are not interested in the velocities it can be any positive number)
REAL(dp),
INTENT(in)
:: shake_tol the tolerance for shake
INTEGER,
INTENT(in),
OPTIONAL
:: log_unit if >0 then some information on the shake is printed, defaults to -1
INTEGER,
INTENT(in),
OPTIONAL
:: lagrange_mult ...
LOGICAL,
INTENT(in),
OPTIONAL
:: dump_lm ...
REAL(dp),
INTENT(inout),
OPTIONAL, TARGET
:: pos(:,:) ...
REAL(dp),
INTENT(inout),
OPTIONAL, TARGET
:: vel(:,:) ...
LOGICAL,
INTENT(in),
OPTIONAL
:: compold ...
LOGICAL,
INTENT(in),
OPTIONAL
:: reset ...

SUBROUTINErescale_forces(force_env)

Rescale forces if requested

Arguments:
POINTER
:: force_env the force env to shake

SUBROUTINEwrite_forces(particles, output_unit, label, ndigits, total_force, grand_total_force)

Write forces

Arguments:
POINTER
:: particles ...
INTEGER,
INTENT(in)
:: output_unit ...
CHARACTER(*),
INTENT(in)
:: label ...
INTEGER,
INTENT(in)
:: ndigits ...
REAL(dp),
INTENT(out)
:: total_force(3) ...
REAL(dp),
INTENT(inout),
OPTIONAL
:: grand_total_force(3) ...

SUBROUTINEwrite_stress_tensor(pv_virial, output_unit, cell, ndigits, numerical)

Variable precision output of the stress tensor

Arguments:
REAL(dp),
INTENT(in)
:: pv_virial(3,3) ...
INTEGER,
INTENT(in)
:: output_unit ...
TYPE(cell_type),
POINTER
:: cell ...
INTEGER,
INTENT(in)
:: ndigits ...
LOGICAL,
INTENT(in)
:: numerical ...