Documentation for module integrator_utils

Provides integrator utility routines for the integrators

source: integrator_utils.F
Loading...

public Types:

tmp_variables_type
...
old_variables_type
...

Generic procedures:

damp_v
set
update_pv

public Subroutines/Functions:

...
allocate temporary variables to store positions and velocities used by the velocity-verlet integrator
SUBROUTINE
damp_veps (npt, gamma1, dt)
provides damping for barostat via nph_uniaxial_damped dynamics
SUBROUTINE
deallocate_old (old)
...
...
update veps using multiplier obtained from SHAKE
update positions and deallocate temporary variable
Routine to compute veps
Compute the timestep rescaling factor
First half of the velocity-verlet algorithm : update velocity by half step and positions by full step
Second half of the velocity-verlet algorithm : update velocity by half step using the new forces

public Types:

TYPE :: old_variables_type

...


REAL(dp),
POINTER, DIMENSION(:,:) :: v ...
REAL(dp),
POINTER, DIMENSION(:,:) :: r ...
REAL(dp),
POINTER, DIMENSION(:,:) :: eps ...
REAL(dp),
POINTER, DIMENSION(:,:) :: veps ...
REAL(dp),
POINTER, DIMENSION(:,:) :: h ...

TYPE :: tmp_variables_type

...


INTEGER,
POINTER :: itimes ...
REAL(dp),
POINTER, DIMENSION(:,:) :: pos ...
REAL(dp),
POINTER, DIMENSION(:,:) :: vel ...
REAL(dp),
POINTER, DIMENSION(:,:) :: shell_pos ...
REAL(dp),
POINTER, DIMENSION(:,:) :: shell_vel ...
REAL(dp),
POINTER, DIMENSION(:,:) :: core_pos ...
REAL(dp),
POINTER, DIMENSION(:,:) :: core_vel ...
REAL(dp)
:: max_vel ...
REAL(dp)
:: max_vel_sc ...
REAL(dp)
:: max_dvel ...
REAL(dp)
:: max_dvel_sc ...
REAL(dp)
:: max_dr ...
REAL(dp)
:: max_dsc ...
REAL(dp)
:: arg_r ...
REAL(dp)
:: arg_v ...
REAL(dp)
:: u ...
REAL(dp)
:: e_val ...
REAL(dp)
:: s ...
REAL(dp)
:: ds ...
REAL(dp),
DIMENSION(3) :: poly_r ...
REAL(dp),
DIMENSION(3) :: poly_v ...
REAL(dp),
DIMENSION(3) :: scale_r ...
REAL(dp),
DIMENSION(3) :: scale_v ...


Generic procedure damp_v

...

POINTER
:: molecule_kind_set(:) × ×
POINTER
:: molecule_set(:) × ×
POINTER
:: particle_set(:) × ×
POINTER
:: local_molecules × ×
REAL(dp),
INTENT(in)
:: gamma1 × ×
INTENT(in)
:: npt × ×
REAL(dp),
INTENT(in)
:: dt × ×
INTEGER,
INTENT(in)
:: group × ×
REAL(dp),
INTENT(inout)
:: vel(:,:) ×

Generic procedure set

...

POINTER
:: old × ×
POINTER
:: atomic_kind_set(:) × ×
POINTER
:: particle_set(:) × ×
POINTER
:: local_particles × ×
TYPE(cell_type),
POINTER
:: cell × ×
POINTER
:: npt(:,:) × ×
CHARACTER(*),
INTENT(in)
:: char × ×
REAL(dp),
INTENT(inout)
:: vel(:,:) ×

Generic procedure update_pv

...

POINTER
:: gci × ×
INTENT(in)
:: simpar × ×
POINTER
:: atomic_kind_set(:) × ×
POINTER
:: particle_set(:) × ×
POINTER
:: local_molecules × ×
POINTER
:: molecule_set(:) × ×
POINTER
:: molecule_kind_set(:) × ×
POINTER
:: local_particles × ×
REAL(dp),
INTENT(out)
:: kin × ×
REAL(dp),
INTENT(out)
:: pv_kin(3,3) ×
REAL(dp),
INTENT(out)
:: pv_kin(:,:) ×
INTENT(inout)
:: virial × ×
INTEGER,
INTENT(in)
:: int_group × ×
REAL(dp),
INTENT(inout)
:: vel(:,:) ×

SUBROUTINEallocate_old(old, particle_set, npt)

...

Arguments:
POINTER
:: old ...
POINTER
:: particle_set(:) ...
POINTER
:: npt(:,:) ...

SUBROUTINEallocate_tmp(md_env, tmp, nparticle, nshell, shell_adiabatic)

allocate temporary variables to store positions and velocities used by the velocity-verlet integrator

Arguments:
POINTER
:: md_env ...
POINTER
:: tmp ...
INTEGER,
INTENT(in)
:: nparticle ...
INTEGER,
INTENT(in)
:: nshell ...
LOGICAL,
INTENT(in)
:: shell_adiabatic ...

SUBROUTINEdamp_veps(npt, gamma1, dt)

provides damping for barostat via nph_uniaxial_damped dynamics

Arguments:
INTENT(inout)
:: npt ...
REAL(dp),
INTENT(in)
:: gamma1 ...
REAL(dp),
INTENT(in)
:: dt ...

SUBROUTINEdeallocate_old(old)

...

Arguments:
POINTER
:: old ...

SUBROUTINEget_s_ds(tmp, nparticle_kind, atomic_kind_set, local_particles, particle_set, dt, para_env, tmpv)

...

Arguments:
POINTER
:: tmp ...
INTEGER
:: nparticle_kind ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: local_particles ...
POINTER
:: particle_set(:) ...
REAL(dp)
:: dt ...
POINTER
:: para_env ...
LOGICAL,
INTENT(in),
OPTIONAL
:: tmpv ...

SUBROUTINErattle_roll_setup(old, gci, atomic_kind_set, particle_set, local_particles, molecule_kind_set, molecule_set, local_molecules, vel, dt, cell, npt, simpar, virial, vector_v, roll_tol, iroll, infree, first, para_env, u)

update veps using multiplier obtained from SHAKE

Arguments:
POINTER
:: old ...
POINTER
:: gci ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_particles ...
POINTER
:: molecule_kind_set(:) ...
POINTER
:: molecule_set(:) ...
POINTER
:: local_molecules ...
REAL(dp),
INTENT(inout)
:: vel(:,:) ...
REAL(dp),
INTENT(in)
:: dt ...
TYPE(cell_type),
POINTER
:: cell ...
POINTER
:: npt(:,:) ...
INTENT(in)
:: simpar ...
POINTER
:: virial ...
REAL(dp),
INTENT(in)
:: vector_v(:) ...
REAL(dp),
INTENT(out)
:: roll_tol ...
INTEGER,
INTENT(inout)
:: iroll ...
REAL(dp),
INTENT(in)
:: infree ...
LOGICAL,
INTENT(inout)
:: first ...
INTENT(in)
:: para_env ...
REAL(dp),
INTENT(in),
OPTIONAL
:: u(:,:) ...

SUBROUTINEupdate_dealloc_tmp(tmp, particle_set, shell_particle_set, core_particle_set, para_env, shell_adiabatic, pos, vel, should_deall_vel)

update positions and deallocate temporary variable

Arguments:
POINTER
:: tmp ...
POINTER
:: particle_set(:) ...
POINTER
:: shell_particle_set(:) ...
POINTER
:: core_particle_set(:) ...
POINTER
:: para_env ...
LOGICAL,
INTENT(in)
:: shell_adiabatic ...
LOGICAL,
INTENT(in),
OPTIONAL
:: pos ...
LOGICAL,
INTENT(in),
OPTIONAL
:: vel ...
LOGICAL,
INTENT(in),
OPTIONAL
:: should_deall_vel ...

SUBROUTINEupdate_veps(box, npt, simpar, pv_kin, kin, virial, infree, virial_components)

Routine to compute veps

Arguments:
TYPE(cell_type),
INTENT(in)
:: box ...
INTENT(inout)
:: npt(:,:) ...
INTENT(in)
:: simpar ...
REAL(dp),
INTENT(in)
:: pv_kin(:,:) ...
REAL(dp),
INTENT(in)
:: kin ...
INTENT(inout)
:: virial ...
REAL(dp),
INTENT(in)
:: infree ...
INTEGER,
INTENT(in),
OPTIONAL
:: virial_components ...

SUBROUTINEvariable_timestep(md_env, tmp, dt, simpar, para_env, atomic_kind_set, local_particles, particle_set, core_particle_set, shell_particle_set, nparticle_kind, shell_adiabatic, npt)

Compute the timestep rescaling factor

Arguments:
POINTER
:: md_env ...
POINTER
:: tmp ...
REAL(dp),
INTENT(inout)
:: dt ...
POINTER
:: simpar ...
POINTER
:: para_env ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: local_particles ...
POINTER
:: particle_set(:) ...
POINTER
:: core_particle_set(:) ...
POINTER
:: shell_particle_set(:) ...
INTEGER,
INTENT(in)
:: nparticle_kind ...
LOGICAL,
INTENT(in)
:: shell_adiabatic ...
OPTIONAL, POINTER
:: npt(:,:) ...

SUBROUTINEvv_first(tmp, atomic_kind_set, local_particles, particle_set, core_particle_set, shell_particle_set, nparticle_kind, shell_adiabatic, dt, u)

First half of the velocity-verlet algorithm : update velocity by half step and positions by full step

Arguments:
POINTER
:: tmp ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: local_particles ...
POINTER
:: particle_set(:) ...
POINTER
:: core_particle_set(:) ...
POINTER
:: shell_particle_set(:) ...
INTEGER,
INTENT(in)
:: nparticle_kind ...
LOGICAL,
INTENT(in)
:: shell_adiabatic ...
REAL(dp)
:: dt ...
REAL(dp),
OPTIONAL
:: u(3,3) ...

SUBROUTINEvv_second(tmp, atomic_kind_set, local_particles, particle_set, core_particle_set, shell_particle_set, nparticle_kind, shell_adiabatic, dt, u)

Second half of the velocity-verlet algorithm : update velocity by half step using the new forces

Arguments:
POINTER
:: tmp ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: local_particles ...
POINTER
:: particle_set(:) ...
POINTER
:: core_particle_set(:) ...
POINTER
:: shell_particle_set(:) ...
INTEGER,
INTENT(in)
:: nparticle_kind ...
LOGICAL,
INTENT(in)
:: shell_adiabatic ...
REAL(dp)
:: dt ...
REAL(dp),
OPTIONAL
:: u(3,3) ...

SUBROUTINEdamp_v_particle_set(molecule_kind_set, molecule_set, particle_set, local_molecules, gamma1, npt, dt, group)

overloaded routine provides damping for particles via nph_uniaxial_damped dynamics

Arguments:
POINTER
:: molecule_kind_set(:) ...
POINTER
:: molecule_set(:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_molecules ...
REAL(dp),
INTENT(in)
:: gamma1 ...
INTENT(in)
:: npt ...
REAL(dp),
INTENT(in)
:: dt ...
INTEGER,
INTENT(in)
:: group ...

SUBROUTINEdamp_v_velocity(molecule_kind_set, molecule_set, particle_set, local_molecules, vel, gamma1, npt, dt, group)

overloaded provides damping for particles via nph_uniaxial_damped dynamics

Arguments:
POINTER
:: molecule_kind_set(:) ...
POINTER
:: molecule_set(:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_molecules ...
REAL(dp),
INTENT(inout)
:: vel(:,:) ...
REAL(dp),
INTENT(in)
:: gamma1 ...
INTENT(in)
:: npt ...
REAL(dp),
INTENT(in)
:: dt ...
INTEGER,
INTENT(in)
:: group ...

SUBROUTINEset_particle_set(old, atomic_kind_set, particle_set, local_particles, cell, npt, char)

...

Arguments:
POINTER
:: old ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_particles ...
TYPE(cell_type),
POINTER
:: cell ...
POINTER
:: npt(:,:) ...
CHARACTER(*),
INTENT(in)
:: char ...

SUBROUTINEset_vel(old, atomic_kind_set, particle_set, vel, local_particles, cell, npt, char)

...

Arguments:
POINTER
:: old ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: particle_set(:) ...
REAL(dp),
INTENT(inout)
:: vel(:,:) ...
POINTER
:: local_particles ...
TYPE(cell_type),
POINTER
:: cell ...
POINTER
:: npt(:,:) ...
CHARACTER(*),
INTENT(in)
:: char ...

SUBROUTINEupdate_pv_particle_set(gci, simpar, atomic_kind_set, particle_set, local_molecules, molecule_set, molecule_kind_set, local_particles, kin, pv_kin, virial, int_group)

Overloaded routine to compute veps given the particles structure or a local copy of the velocity array

Arguments:
POINTER
:: gci ...
INTENT(in)
:: simpar ...
POINTER
:: atomic_kind_set(:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_molecules ...
POINTER
:: molecule_set(:) ...
POINTER
:: molecule_kind_set(:) ...
POINTER
:: local_particles ...
REAL(dp),
INTENT(out)
:: kin ...
REAL(dp),
INTENT(out)
:: pv_kin(3,3) ...
INTENT(inout)
:: virial ...
INTEGER,
INTENT(in)
:: int_group ...

SUBROUTINEupdate_pv_velocity(gci, simpar, atomic_kind_set, vel, particle_set, local_molecules, molecule_set, molecule_kind_set, local_particles, kin, pv_kin, virial, int_group)

Overloaded routine to compute kinetic virials given the particles structure or a local copy of the velocity array

Arguments:
POINTER
:: gci ...
INTENT(in)
:: simpar ...
POINTER
:: atomic_kind_set(:) ...
REAL(dp),
INTENT(inout)
:: vel(:,:) ...
POINTER
:: particle_set(:) ...
POINTER
:: local_molecules ...
POINTER
:: molecule_set(:) ...
POINTER
:: molecule_kind_set(:) ...
POINTER
:: local_particles ...
REAL(dp),
INTENT(out)
:: kin ...
REAL(dp),
INTENT(out)
:: pv_kin(:,:) ...
INTENT(inout)
:: virial ...
INTEGER,
INTENT(in)
:: int_group ...