29 use,
intrinsic :: iso_fortran_env
77 integer,
parameter :: &
100 logical :: relax_cell
101 logical :: constant_velocity
102 integer :: thermostat
104 real(real64) :: current_temperature
106 real(real64),
allocatable :: oldforce(:, :)
109 real(real64),
allocatable :: old_pos(:, :)
112 real(real64),
allocatable :: cell_force(:)
113 real(real64),
allocatable :: old_cell_force(:)
114 real(real64),
allocatable :: cell_vel(:)
115 real(real64),
allocatable :: initial_rlattice(:,:)
116 real(real64),
allocatable :: strain(:)
118 real(real64) :: pressure
121 logical :: symmetrize = .false.
122 type(symmetrizer_t),
pointer :: symm
125 type(nose_hoover_t) :: nh(1:2)
126 type(tdf_t) :: temperature_function
129 logical :: drive_ions
130 type(ion_td_displacement_t),
allocatable :: td_displacements(:)
131 type(ions_t),
pointer :: ions_t0
133 real(real64),
public :: ionic_scale
143 real(real64),
allocatable :: pos(:, :)
144 real(real64),
allocatable :: vel(:, :)
145 real(real64),
allocatable :: old_pos(:, :)
146 type(nose_hoover_t) :: nh(1:2)
151 real(real64),
allocatable :: pos(:, :)
152 real(real64),
allocatable :: vel(:, :)
153 real(real64),
allocatable :: old_pos(:, :)
160 use iso_c_binding,
only: c_ptr
161 type(ion_dynamics_t),
intent(out) :: this
162 type(namespace_t),
intent(in) :: namespace
163 type(ions_t),
intent(inout) :: ions
164 logical,
intent(in) :: symmetrize
165 type(symmetrizer_t),
optional,
target,
intent(in) :: symm
167 integer :: i, j, iatom, ierr, periodic_dim, ncomp
168 real(real64) :: xx(ions%space%dim), temperature, sigma, kin1, kin2
169 type(c_ptr) :: random_gen_pointer
170 type(read_coords_info) :: xyz
171 character(len=100) :: temp_function_name
172 logical :: have_velocities
176 character(len=200) :: expression
180 have_velocities = .false.
181 this%drive_ions = .false.
183 this%symmetrize = symmetrize
184 if (this%symmetrize)
then
185 assert(
present(symm))
222 if (this%ionic_scale <=
m_zero)
then
223 write(
message(1),
'(a)')
'Input: TDIonicTimeScale must be positive.'
241 call parse_variable(namespace,
'IonsConstantVelocity', .false., this%constant_velocity)
244 if (this%constant_velocity)
then
271 if (
parse_block(namespace,
'IonsTimeDependentDisplacements', blk) == 0)
then
274 safe_allocate(this%td_displacements(1:ions%natoms))
275 this%td_displacements(1:ions%natoms)%move = .false.
276 if (ndisp > 0) this%drive_ions =.
true.
281 this%td_displacements(iatom)%move = .
true.
282 if (iatom < 1 .and. iatom > ions%natoms)
then
287 call tdf_read(this%td_displacements(iatom)%fx, namespace, trim(expression), ierr)
289 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
295 call tdf_read(this%td_displacements(iatom)%fy, namespace, trim(expression), ierr)
297 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
302 call tdf_read(this%td_displacements(iatom)%fz, namespace, trim(expression), ierr)
304 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
310 safe_allocate(this%ions_t0)
333 call parse_variable(namespace,
'Thermostat', thermo_none, this%thermostat)
337 if (this%thermostat /= thermo_none)
then
339 have_velocities = .
true.
341 if (this%drive_ions)
then
342 call messages_write(
'You cannot use a Thermostat and IonsConstantVelocity or IonsTimeDependentDisplacements')
359 call parse_variable(namespace,
'TemperatureFunction',
'temperature', temp_function_name)
361 call tdf_read(this%temperature_function, namespace, temp_function_name, ierr)
364 message(1) =
"You have enabled a thermostat but Octopus could not find"
365 message(2) =
"the '"//trim(temp_function_name)//
"' function in the TDFunctions block."
381 this%nh(2)%mass = this%nh(1)%mass
386 safe_allocate(this%old_pos(1:ions%space%dim, 1:ions%natoms))
388 this%old_pos = ions%pos
410 have_velocities = .
true.
412 if (ions%grp%is_root())
then
417 do i = 1, ions%natoms
419 if (ions%grp%is_root())
then
420 sigma =
sqrt(temperature / ions%mass(i))
426 call ions%grp%bcast(ions%vel(:, i), ions%space%dim, mpi_double_precision, 0)
429 if (ions%grp%is_root())
then
433 call ions%update_kinetic_energy()
434 kin1 = ions%kinetic_energy
436 xx = ions%center_of_mass_vel()
437 do i = 1, ions%natoms
438 ions%vel(:, i) = ions%vel(:, i) - xx
441 call ions%update_kinetic_energy()
442 kin2 = ions%kinetic_energy
445 do i = 1, ions%natoms
446 ions%vel(:, i) =
sqrt(kin1/kin2)*ions%vel(:, i)
450 call ions%update_kinetic_energy()
452 write(
message(1),
'(a,f10.4,1x,a)')
'Info: Initial velocities randomly distributed with T =', &
454 write(
message(2),
'(2x,a,f8.4,1x,a)')
'<K> =', &
457 write(
message(3),
'(2x,a,f8.4,1x,a)')
'3/2 k_B T =', &
516 have_velocities = .
true.
518 if (ions%natoms /= xyz%n)
then
519 write(
message(1),
'(a,i4,a,i4)')
'I need exactly ', ions%natoms,
' velocities, but I found ', xyz%n
524 do i = 1, ions%natoms
525 ions%vel(:, i) = xyz%atom(i)%x(1:ions%space%dim)
535 call ions%update_kinetic_energy()
545 call parse_variable(namespace,
'MoveIons', have_velocities, this%move_ions)
548 if (this%move_ions .and. ions%space%periodic_dim == 1)
then
550 'Moving ions for a 1D periodic system is not allowed, as forces are incorrect.')
553 if (this%ions_move())
then
554 safe_allocate(this%oldforce(1:ions%space%dim, 1:ions%natoms))
557 if (ions%space%is_periodic())
then
568 call parse_variable(namespace,
'CellDynamics', .false., this%relax_cell)
571 if (this%cell_relax())
then
573 message(1) =
"Cell dynamics not supported on GPUs."
577 periodic_dim = ions%space%periodic_dim
578 ncomp = periodic_dim * periodic_dim
579 safe_allocate(this%cell_force(1:ncomp))
581 safe_allocate(this%old_cell_force(1:ncomp))
582 this%old_cell_force =
m_zero
583 safe_allocate(this%cell_vel(1:ncomp))
586 safe_allocate(this%strain(1:ncomp))
589 do i = 1, periodic_dim
590 do j = i, periodic_dim
591 if(i == j) this%strain(ncomp) =
m_one
598 safe_allocate(this%initial_rlattice(1:periodic_dim, 1:periodic_dim))
599 this%initial_rlattice(1:periodic_dim, 1:periodic_dim) = ions%latt%rlattice(1:periodic_dim, 1:periodic_dim)
613 this%relax_cell = .false.
626 safe_deallocate_a(this%oldforce)
628 if (this%thermostat /= thermo_none)
then
629 call tdf_end(this%temperature_function)
632 if (this%drive_ions .and.
allocated(this%td_displacements))
then
633 if (any(this%td_displacements(1:this%ions_t0%natoms)%move))
then
638 safe_deallocate_a(this%td_displacements)
641 safe_deallocate_a(this%cell_force)
642 safe_deallocate_a(this%old_cell_force)
643 safe_deallocate_a(this%cell_vel)
644 safe_deallocate_a(this%initial_rlattice)
654 type(
ions_t),
intent(inout) :: ions
655 real(real64),
intent(in) :: time
656 real(real64),
intent(in) :: dt
665 if (this%drive_ions)
then
675 do iatom = 1, ions%natoms
676 ions%pos(:, iatom) = ions%latt%cart_to_red(ions%pos(:, iatom))
677 ions%vel(:, iatom) = ions%latt%cart_to_red(ions%vel(:, iatom))
678 ions%tot_force(:, iatom) = ions%latt%cart_to_red(ions%tot_force(:, iatom))
682 if (this%ions_move())
then
687 if (this%cell_relax())
then
692 do iatom = 1, ions%natoms
693 ions%pos(:, iatom) = ions%latt%red_to_cart(ions%pos(:, iatom))
694 ions%vel(:, iatom) = ions%latt%red_to_cart(ions%vel(:, iatom))
695 if (
allocated(this%oldforce))
then
696 this%oldforce(:, iatom) = ions%latt%red_to_cart(this%oldforce(:, iatom))
698 ions%tot_force(:, iatom) = ions%latt%red_to_cart(ions%tot_force(:, iatom))
703 call ions%fold_atoms_into_cell()
713 real(real64),
intent(in) :: time
719 if (this%thermostat /= thermo_none)
then
722 if (this%current_temperature <
m_zero)
then
723 write(
message(1),
'(a, f10.3, 3a, f10.3, 3a)') &
724 "Negative temperature (", &
731 this%current_temperature =
m_zero
742 type(
ions_t),
intent(inout) :: ions
743 real(real64),
intent(in) :: time
744 real(real64),
intent(in) :: dt
747 real(real64) :: dr(3)
751 assert(this%drive_ions)
753 do iatom = 1, ions%natoms
754 if (ions%fixed(iatom)) cycle
756 if (this%constant_velocity)
then
757 ions%pos(:, iatom) = ions%pos(:, iatom) + dt*ions%vel(:, iatom)
759 else if (
allocated(this%td_displacements))
then
761 if (this%td_displacements(iatom)%move)
then
762 dr(1:3)=(/ real(
tdf(this%td_displacements(iatom)%fx, time), real64), &
763 real(
tdf(this%td_displacements(iatom)%fy, time), real64), &
764 real(tdf(this%td_displacements(iatom)%fz, time), real64) /)
766 ions%pos(:, iatom) = this%ions_t0%pos(:, iatom) + dr(1:ions%space%dim)
782 type(
ions_t),
intent(inout) :: ions
783 real(real64),
intent(in) :: dt
789 assert(.not. this%drive_ions)
793 do iatom = 1, ions%natoms
794 if (ions%fixed(iatom)) cycle
796 ions%pos(:, iatom) = ions%pos(:, iatom) + dt*ions%vel(:, iatom) + &
797 m_half*dt**2 / ions%mass(iatom) * ions%tot_force(:, iatom)
799 this%oldforce(:, iatom) = ions%tot_force(:, iatom)
811 do iatom = 1, ions%natoms
812 if (ions%fixed(iatom)) cycle
814 ions%pos(:, iatom) = ions%pos(:, iatom) +
m_half*dt*ions%vel(:, iatom)
826 type(
ions_t),
intent(inout) :: ions
827 real(real64),
intent(in) :: dt
830 integer :: idir, jdir, comp
831 real(real64) :: rlattice_change(ions%space%periodic_dim*ions%space%periodic_dim)
835 rlattice_change = dt * this%cell_vel +
m_half*dt**2 * this%cell_force
838 do idir = 1, ions%space%periodic_dim
840 this%cell_force(jdir + (idir-1)*ions%space%periodic_dim)), &
841 jdir = 1, ions%space%periodic_dim)
843 call messages_info(1+ions%space%periodic_dim, namespace=ions%namespace)
845 write(
message(1),
'(a,3a,a)')
' Cell vel [', &
847 do idir = 1, ions%space%periodic_dim
849 this%cell_vel(jdir+ (idir-1)*ions%space%periodic_dim)), &
850 jdir = 1, ions%space%periodic_dim)
852 call messages_info(1+ions%space%periodic_dim, namespace=ions%namespace)
856 do idir = 1, ions%space%periodic_dim
857 do jdir = 1, ions%space%periodic_dim
858 ions%latt%rlattice(idir, jdir) = ions%latt%rlattice(idir, jdir) + rlattice_change(comp)
863 this%old_cell_force = this%cell_force
865 if (
associated(this%symm))
then
866 call this%symm%symmetrize_lattice_vectors(ions%space%periodic_dim, &
867 this%initial_rlattice, ions%latt%rlattice, this%symmetrize)
869 call ions%update_lattice_vectors(ions%latt, this%symmetrize)
878 type(
ions_t),
intent(inout) :: ions
880 real(real64) :: g1, g2, ss, uk, dt, temp
886 call ions%update_kinetic_energy()
887 uk = ions%kinetic_energy
889 temp = this%current_temperature
891 g2 = (this%nh(1)%mass*this%nh(1)%vel**2 - temp)/this%nh(2)%mass
892 this%nh(2)%vel = this%nh(2)%vel + g2*dt/
m_four
893 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
895 g1 = (
m_two*uk -
m_three*ions%natoms*temp)/this%nh(1)%mass
896 this%nh(1)%vel = this%nh(1)%vel + g1*dt/
m_four
897 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
898 this%nh(1)%pos = this%nh(1)%pos + this%nh(1)%vel*dt/
m_two
899 this%nh(2)%pos = this%nh(2)%pos + this%nh(2)%vel*dt/
m_two
903 ions%vel = ss*ions%vel
907 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
908 g1 = (
m_two*uk -
m_three*ions%natoms*temp)/this%nh(1)%mass
909 this%nh(1)%vel = this%nh(1)%vel + g1*dt/
m_four
910 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
912 g2 = (this%nh(1)%mass*this%nh(1)%vel**2 - temp)/this%nh(2)%mass
913 this%nh(2)%vel = this%nh(2)%vel + g2*dt/
m_four
922 type(
ions_t),
intent(inout) :: ions
923 logical,
optional,
intent(out) :: atoms_moved
926 real(real64) :: scal, temp
929 if (this%drive_ions)
return
933 if (
present(atoms_moved)) atoms_moved = this%thermostat ==
thermo_nh
938 do iatom = 1, ions%natoms
939 if (ions%fixed(iatom)) cycle
941 ions%vel(:, iatom) = ions%vel(:, iatom) &
942 + this%dt/ions%mass(iatom) *
m_half * (this%oldforce(:, iatom) + &
943 ions%tot_force(:, iatom))
949 do iatom = 1, ions%natoms
950 if (ions%fixed(iatom)) cycle
952 ions%vel(:, iatom) = ions%vel(:, iatom) + this%dt*ions%tot_force(:, iatom) / ions%mass(iatom)
953 ions%pos(:, iatom) = ions%pos(:, iatom) +
m_half*this%dt*ions%vel(:, iatom)
963 scal =
sqrt(this%current_temperature/temp)
964 ions%vel = scal*ions%vel
968 if (this%cell_relax())
then
969 this%cell_vel = this%cell_vel + this%dt *
m_half * (this%old_cell_force + this%cell_force)
981 type(
ions_t),
intent(in) :: ions
982 real(real64),
intent(inout) :: q(:, :)
983 real(real64),
intent(inout) :: v(:, :)
984 real(real64),
intent(in) :: fold(:, :)
985 real(real64),
intent(in) :: dt
992 do iatom = 1, ions%natoms
993 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) / ions%mass(iatom)
997 do iatom = 1, ions%natoms
998 if (ions%fixed(iatom)) cycle
999 q(iatom, 1:ions%space%dim) = q(iatom, 1:ions%space%dim) + dt * v(iatom, 1:ions%space%dim) + &
1000 m_half*dt**2 / ions%mass(iatom) * fold(iatom, 1:ions%space%dim)
1004 do iatom = 1, ions%natoms
1005 v(iatom, 1:ions%space%dim) = ions%mass(iatom) * v(iatom, 1:ions%space%dim)
1016 type(
ions_t),
intent(in) :: ions
1017 real(real64),
intent(inout) :: v(:, :)
1018 real(real64),
intent(in) :: fold(:, :)
1019 real(real64),
intent(in) :: fnew(:, :)
1020 real(real64),
intent(in) :: dt
1027 do iatom = 1, ions%natoms
1028 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) / ions%mass(iatom)
1032 do iatom = 1, ions%natoms
1033 if (ions%fixed(iatom)) cycle
1034 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) &
1035 + dt / ions%mass(iatom) *
m_half * (fold(iatom, 1:ions%space%dim) + fnew(iatom, 1:ions%space%dim))
1039 do iatom = 1, ions%natoms
1040 v(iatom, 1:ions%space%dim) = ions%mass(iatom) * v(iatom, 1:ions%space%dim)
1050 type(
ions_t),
intent(in) :: ions
1053 if (.not. this%ions_move())
return
1057 safe_allocate(state%pos(1:ions%space%dim, 1:ions%natoms))
1058 safe_allocate(state%vel(1:ions%space%dim, 1:ions%natoms))
1060 state%pos = ions%pos
1061 state%vel = ions%vel
1064 safe_allocate(state%old_pos(1:ions%space%dim, 1:ions%natoms))
1065 state%old_pos(1:ions%space%dim, 1:ions%natoms) = this%old_pos(1:ions%space%dim, 1:ions%natoms)
1066 state%nh(1:2)%pos = this%nh(1:2)%pos
1067 state%nh(1:2)%vel = this%nh(1:2)%vel
1077 type(
ions_t),
intent(inout) :: ions
1080 assert(.not. this%cell_relax())
1081 if (.not. this%ions_move())
return
1085 ions%pos = state%pos
1086 ions%vel = state%vel
1089 this%old_pos(1:ions%space%dim, 1:ions%natoms) = state%old_pos(1:ions%space%dim, 1:ions%natoms)
1090 this%nh(1:2)%pos = state%nh(1:2)%pos
1091 this%nh(1:2)%vel = state%nh(1:2)%vel
1092 safe_deallocate_a(state%old_pos)
1095 safe_deallocate_a(state%pos)
1096 safe_deallocate_a(state%vel)
1106 ions_move = this%move_ions
1116 drive_ions = this%drive_ions
1125 cell_dynamics = this%relax_cell
1134 is_active = this%relax_cell .or. this%move_ions
1142 type(ions_t),
intent(in) :: ions
1145 real(real64) :: kinetic_energy
1147 kinetic_energy = m_zero
1148 do iatom = 1, ions%natoms
1149 kinetic_energy = kinetic_energy + &
1150 m_half * ions%mass(iatom) * sum(ions%vel(:, iatom)**2)
1152 temperature = m_two/m_three*kinetic_energy/ions%natoms
1161 if (this%move_ions)
then
1162 this%move_ions = .false.
1174 this%move_ions = .
true.
1180 type(restart_t),
intent(in) :: restart
1181 integer,
intent(out) :: ierr
1185 if (
allocated(this%oldforce))
then
1186 call restart%write_binary(
"ion_dynamics_oldforce",
size(this%oldforce), &
1187 this%oldforce, ierr)
1190 if(
allocated(this%old_cell_force))
then
1191 call restart%write_binary(
"ion_dynamics_old_cell_force",
size(this%old_cell_force), &
1192 this%old_cell_force, ierr)
1201 type(restart_t),
intent(in) :: restart
1202 integer,
intent(out) :: ierr
1206 if (
allocated(this%oldforce))
then
1207 call restart%read_binary(
"ion_dynamics_oldforce",
size(this%oldforce), &
1208 this%oldforce, ierr)
1211 if(
allocated(this%old_cell_force))
then
1212 call restart%read_binary(
"ion_dynamics_old_cell_force",
size(this%old_cell_force), &
1213 this%old_cell_force, ierr)
1223 class(space_t),
intent(in) :: space
1224 real(real64),
intent(in) :: stress(3,3)
1225 real(real64),
intent(in) :: rlattice(:,:)
1226 real(real64),
intent(in) :: rcell_volume
1228 integer :: idir, jdir, comp
1229 real(real64) :: inv_latt(space%periodic_dim, space%periodic_dim), tmp_stress(space%periodic_dim, space%periodic_dim)
1230 real(real64) :: cell_force(space%periodic_dim, space%periodic_dim)
1235 inv_latt = rlattice(1:space%periodic_dim, 1:space%periodic_dim)
1236 call lalg_inverse(space%periodic_dim, inv_latt,
'dir')
1238 tmp_stress = -stress(1:space%periodic_dim, 1:space%periodic_dim)
1239 do idir = 1, space%periodic_dim
1240 tmp_stress(idir, idir) = tmp_stress(idir, idir) - this%pressure/space%periodic_dim
1242 cell_force = matmul(tmp_stress, transpose(inv_latt)) * rcell_volume
1245 do idir = 1, space%periodic_dim
1246 do jdir = 1, space%periodic_dim
1247 this%cell_force(comp) = cell_force(idir, jdir)
1252 if (debug%info)
then
1253 write(message(1),
'(a,3a,a)')
' Stress tensor [', trim(units_abbrev(units_out%energy/units_out%length**space%dim)),
']'
1254 do idir = 1, space%periodic_dim
1255 write(message(1+idir),
'(9e18.10)') (units_from_atomic(units_out%energy/units_out%length**space%dim, stress(jdir, idir)), &
1256 jdir = 1, space%periodic_dim)
1258 call messages_info(1+space%periodic_dim, namespace=global_namespace)
1266 type(namespace_t),
intent(in) :: namespace
1267 type(grid_t),
intent(inout) :: gr
1268 class(space_t),
intent(in) :: space
1269 type(lattice_vectors_t),
intent(in) :: new_latt
1272 real(real64) :: length(1:space%dim)
1277 select type(box => gr%box)
1278 type is (box_parallelepiped_t)
1279 do idir = 1, space%dim
1280 length(idir) = norm2(new_latt%rlattice(1:space%dim, idir))
1282 call box%regenerate(space%dim, new_latt%rlattice, length, namespace)
1284 call messages_not_implemented(
"Grid regeneration for non-parallelepiped boxes", namespace=namespace)
1292 type(namespace_t),
intent(in) :: namespace
1293 type(grid_t),
intent(inout) :: gr
1294 class(space_t),
intent(in) :: space
1295 type(poisson_t),
intent(inout) :: psolver
1296 type(kpoints_t),
intent(inout) :: kpoints
1297 type(multicomm_t),
intent(in) :: mc
1298 real(real64),
intent(in) :: qtot
1299 type(lattice_vectors_t),
intent(in) :: new_latt
1303 call grid_lattice_vectors_update(gr, space, namespace, mc, new_latt)
1306 call poisson_end(psolver)
1307 call poisson_init(psolver, namespace, space, gr%der, mc, gr%stencil, qtot, verbose=.false.)
1309 call kpoints_lattice_vectors_update(kpoints, new_latt)
Functions to generate random numbers.
Prints out to iunit a message in the form: ["InputVariable" = value] where "InputVariable" is given b...
double exp(double __x) __attribute__((__nothrow__
pure logical function, public accel_is_enabled()
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
real(real64), parameter, public m_four
real(real64), parameter, public m_epsilon
real(real64), parameter, public m_half
real(real64), parameter, public m_one
real(real64), parameter, public m_three
This module implements the underlying real-space grid.
subroutine, public ion_dynamics_verlet_step2(ions, v, fold, fnew, dt)
A bare verlet integrator.
subroutine ion_dynamics_update_temperature(this, time, namespace)
Update the temperature of the ions in case of a thermostat.
subroutine, public ion_dynamics_dump(this, restart, ierr)
subroutine, public ion_dynamics_verlet_step1(ions, q, v, fold, dt)
A bare verlet integrator.
logical pure function ion_dynamics_cell_relax(this)
Is the cell dynamics activated or not.
subroutine nh_chain(this, ions)
subroutine, public ion_dynamics_restore_state(this, ions, state)
subroutine, public ion_dynamics_propagate(this, ions, time, dt, namespace)
Interface for the ion/cell dynamics.
subroutine, public ion_dynamics_save_state(this, ions, state)
subroutine, public ion_dynamics_unfreeze(this)
Unfreezes the ionic movement.
subroutine ion_dynamics_propagate_cell(this, ions, dt, namespace)
Time-evolution of the lattice vectors.
subroutine ion_dynamics_update_stress(this, space, stress, rlattice, rcell_volume)
Updates the stress tensor for the ion dynamics.
subroutine, public ion_dynamics_propagate_vel(this, ions, atoms_moved)
subroutine, public ion_dynamics_load(this, restart, ierr)
subroutine ion_dynamics_propagate_ions(this, ions, dt)
Time evolution of the ions.
subroutine, public ion_dynamics_init(this, namespace, ions, symmetrize, symm)
integer, parameter thermo_scal
subroutine, public electrons_lattice_vectors_update(namespace, gr, space, psolver, kpoints, mc, qtot, new_latt)
subroutine, public ion_dynamics_end(this)
subroutine ion_dynamics_propagate_driven_ions(this, ions, time, dt)
Move ions following a driven motion.
integer, parameter thermo_nh
logical pure function ion_dynamics_ions_move(this)
logical function, public ion_dynamics_freeze(this)
Freezes the ionic movement.
subroutine, public ion_dynamics_box_update(namespace, gr, space, new_latt)
logical pure function ion_dynamics_is_active(this)
Is the cell dynamics activated or not.
logical pure function, public ion_dynamics_drive_ions(this)
Is the ion dynamics activated or not.
real(real64) function, public ion_dynamics_temperature(ions)
This function returns the ionic temperature in energy units.
This module is intended to contain "only mathematical" functions and procedures.
subroutine, public messages_warning(no_lines, all_nodes, namespace)
subroutine, public messages_obsolete_variable(namespace, name, rep)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_input_error(namespace, var, details, row, column)
subroutine, public messages_experimental(name, namespace)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module handles the communicators for the various parallelization strategies.
logical function, public parse_is_defined(namespace, name)
subroutine, public parse_block_string(blk, l, c, res, convert_to_c)
integer function, public parse_block(namespace, name, blk, check_varinfo_)
integer, parameter, public read_coords_err
for read_coords_info::file_type
subroutine, public read_coords_init(gf)
subroutine, public read_coords_end(gf)
subroutine, public read_coords_read(what, gf, space, namespace)
subroutine, public tdf_end(f)
subroutine, public tdf_read(f, namespace, function_name, ierr)
This function initializes "f" from the TDFunctions block.
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
character(len=20) pure function, public units_abbrev(this)
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
type(unit_t), public unit_kelvin
For converting energies into temperatures.