28 use,
intrinsic :: iso_fortran_env
76 integer,
parameter :: &
81 integer,
parameter :: &
103 logical :: relax_cell
104 logical :: constant_velocity
105 integer :: thermostat
107 real(real64) :: current_temperature
109 real(real64),
allocatable :: oldforce(:, :)
112 real(real64),
allocatable :: old_pos(:, :)
115 real(real64),
allocatable :: cell_force(:)
116 real(real64),
allocatable :: old_cell_force(:)
117 real(real64),
allocatable :: cell_vel(:)
118 real(real64),
allocatable :: initial_rlattice(:,:)
119 real(real64),
allocatable :: strain(:)
121 real(real64) :: cell_mass
122 integer :: cell_mass_scheme
124 real(real64) :: pressure
127 logical :: symmetrize = .false.
128 type(symmetrizer_t),
pointer :: symm
131 type(nose_hoover_t) :: nh(1:2)
132 type(tdf_t) :: temperature_function
135 logical :: drive_ions
136 type(ion_td_displacement_t),
allocatable :: td_displacements(:)
137 type(ions_t),
pointer :: ions_t0
139 real(real64),
public :: ionic_scale
149 real(real64),
allocatable :: pos(:, :)
150 real(real64),
allocatable :: vel(:, :)
151 real(real64),
allocatable :: old_pos(:, :)
152 type(nose_hoover_t) :: nh(1:2)
157 real(real64),
allocatable :: pos(:, :)
158 real(real64),
allocatable :: vel(:, :)
159 real(real64),
allocatable :: old_pos(:, :)
166 use iso_c_binding,
only: c_ptr
167 type(ion_dynamics_t),
intent(out) :: this
168 type(namespace_t),
intent(in) :: namespace
169 type(ions_t),
intent(inout) :: ions
170 logical,
intent(in) :: symmetrize
173 integer :: i, j, iatom, ierr, periodic_dim, ncomp, nf
174 real(real64) :: xx(ions%space%dim), temperature, sigma, kin1, kin2, tau_b, t0_energy
175 type(c_ptr) :: random_gen_pointer
177 character(len=100) :: temp_function_name
178 logical :: have_velocities
182 character(len=200) :: expression
186 have_velocities = .false.
187 this%drive_ions = .false.
189 this%symmetrize = symmetrize
190 if (this%symmetrize)
then
191 assert(
present(symm))
228 if (this%ionic_scale <=
m_zero)
then
229 write(
message(1),
'(a)')
'Input: TDIonicTimeScale must be positive.'
247 call parse_variable(namespace,
'IonsConstantVelocity', .false., this%constant_velocity)
250 if (this%constant_velocity)
then
277 if (
parse_block(namespace,
'IonsTimeDependentDisplacements', blk) == 0)
then
280 safe_allocate(this%td_displacements(1:ions%natoms))
281 this%td_displacements(1:ions%natoms)%move = .false.
282 if (ndisp > 0) this%drive_ions =.
true.
287 this%td_displacements(iatom)%move = .
true.
288 if (iatom < 1 .and. iatom > ions%natoms)
then
293 call tdf_read(this%td_displacements(iatom)%fx, namespace, trim(expression), ierr)
295 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
301 call tdf_read(this%td_displacements(iatom)%fy, namespace, trim(expression), ierr)
303 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
308 call tdf_read(this%td_displacements(iatom)%fz, namespace, trim(expression), ierr)
310 write(
message(1),
'(3A)')
'Could not find "', trim(expression),
'" in the TDFunctions block:'
316 safe_allocate(this%ions_t0)
339 call parse_variable(namespace,
'Thermostat', thermo_none, this%thermostat)
343 if (this%thermostat /= thermo_none)
then
345 have_velocities = .
true.
347 if (this%drive_ions)
then
348 call messages_write(
'You cannot use a Thermostat and IonsConstantVelocity or IonsTimeDependentDisplacements')
365 call parse_variable(namespace,
'TemperatureFunction',
'temperature', temp_function_name)
367 call tdf_read(this%temperature_function, namespace, temp_function_name, ierr)
370 message(1) =
"You have enabled a thermostat but Octopus could not find"
371 message(2) =
"the '"//trim(temp_function_name)//
"' function in the TDFunctions block."
387 this%nh(2)%mass = this%nh(1)%mass
392 safe_allocate(this%old_pos(1:ions%space%dim, 1:ions%natoms))
394 this%old_pos = ions%pos
416 have_velocities = .
true.
418 if (ions%grp%is_root())
then
423 do i = 1, ions%natoms
425 if (ions%grp%is_root())
then
426 sigma =
sqrt(temperature / ions%mass(i))
432 call ions%grp%bcast(ions%vel(:, i), ions%space%dim, mpi_double_precision, 0)
435 if (ions%grp%is_root())
then
439 call ions%update_kinetic_energy()
440 kin1 = ions%kinetic_energy
442 xx = ions%center_of_mass_vel()
443 do i = 1, ions%natoms
444 ions%vel(:, i) = ions%vel(:, i) - xx
447 call ions%update_kinetic_energy()
448 kin2 = ions%kinetic_energy
451 do i = 1, ions%natoms
452 ions%vel(:, i) =
sqrt(kin1/kin2)*ions%vel(:, i)
456 call ions%update_kinetic_energy()
458 write(
message(1),
'(a,f10.4,1x,a)')
'Info: Initial velocities randomly distributed with T =', &
460 write(
message(2),
'(2x,a,f8.4,1x,a)')
'<K> =', &
463 write(
message(3),
'(2x,a,f8.4,1x,a)')
'3/2 k_B T =', &
522 have_velocities = .
true.
524 if (ions%natoms /= xyz%n)
then
525 write(
message(1),
'(a,i4,a,i4)')
'I need exactly ', ions%natoms,
' velocities, but I found ', xyz%n
530 do i = 1, ions%natoms
531 ions%vel(:, i) = xyz%atom(i)%x(1:ions%space%dim)
541 call ions%update_kinetic_energy()
551 call parse_variable(namespace,
'MoveIons', have_velocities, this%move_ions)
554 if (this%move_ions .and. ions%space%periodic_dim == 1)
then
556 'Moving ions for a 1D periodic system is not allowed, as forces are incorrect.')
559 if (this%ions_move())
then
560 safe_allocate(this%oldforce(1:ions%space%dim, 1:ions%natoms))
563 if (ions%space%is_periodic())
then
574 call parse_variable(namespace,
'CellDynamics', .false., this%relax_cell)
577 if (this%cell_relax())
then
578 periodic_dim = ions%space%periodic_dim
579 ncomp = periodic_dim * periodic_dim
580 safe_allocate(this%cell_force(1:ncomp))
582 safe_allocate(this%old_cell_force(1:ncomp))
583 this%old_cell_force =
m_zero
584 safe_allocate(this%cell_vel(1:ncomp))
587 safe_allocate(this%strain(1:ncomp))
590 do i = 1, periodic_dim
591 do j = i, periodic_dim
592 if(i == j) this%strain(ncomp) =
m_one
599 safe_allocate(this%initial_rlattice(1:periodic_dim, 1:periodic_dim))
600 this%initial_rlattice(1:periodic_dim, 1:periodic_dim) = ions%latt%rlattice(1:periodic_dim, 1:periodic_dim)
624 call parse_variable(namespace,
'CellMass', cell_mass_pr, this%cell_mass_scheme)
630 select case (this%cell_mass_scheme)
632 this%cell_mass = sum(ions%mass(1:ions%natoms))
635 if (this%thermostat == thermo_none)
then
636 message(1) =
"CellMass = martyna_tobias_klein requires a finite temperature."
637 message(2) =
"Please set a Thermostat (and the associated TemperatureFunction)."
651 message(1) =
"CellMass = martyna_tobias_klein requires a positive BarostatTimeConstant."
658 nf = ions%space%dim * ions%natoms
659 this%cell_mass = (nf + periodic_dim) * t0_energy * tau_b**2 / ions%latt%rcell_volume**(
m_two/
m_three)
662 write(
message(1),
'(a, es15.6, a)')
"Info: Fictitious cell mass W = ", this%cell_mass,
" [a.u.]"
677 this%relax_cell = .false.
690 safe_deallocate_a(this%oldforce)
692 if (this%thermostat /= thermo_none)
then
693 call tdf_end(this%temperature_function)
696 if (this%drive_ions .and.
allocated(this%td_displacements))
then
697 if (any(this%td_displacements(1:this%ions_t0%natoms)%move))
then
702 safe_deallocate_a(this%td_displacements)
705 safe_deallocate_a(this%cell_force)
706 safe_deallocate_a(this%old_cell_force)
707 safe_deallocate_a(this%cell_vel)
708 safe_deallocate_a(this%initial_rlattice)
718 type(
ions_t),
intent(inout) :: ions
719 real(real64),
intent(in) :: time
720 real(real64),
intent(in) :: dt
729 if (this%drive_ions)
then
739 do iatom = 1, ions%natoms
740 ions%pos(:, iatom) = ions%latt%cart_to_red(ions%pos(:, iatom))
741 ions%vel(:, iatom) = ions%latt%cart_to_red(ions%vel(:, iatom))
742 ions%tot_force(:, iatom) = ions%latt%cart_to_red(ions%tot_force(:, iatom))
746 if (this%ions_move())
then
751 if (this%cell_relax())
then
756 do iatom = 1, ions%natoms
757 ions%pos(:, iatom) = ions%latt%red_to_cart(ions%pos(:, iatom))
758 ions%vel(:, iatom) = ions%latt%red_to_cart(ions%vel(:, iatom))
759 if (
allocated(this%oldforce))
then
760 this%oldforce(:, iatom) = ions%latt%red_to_cart(this%oldforce(:, iatom))
762 ions%tot_force(:, iatom) = ions%latt%red_to_cart(ions%tot_force(:, iatom))
767 call ions%fold_atoms_into_cell()
777 real(real64),
intent(in) :: time
783 if (this%thermostat /= thermo_none)
then
786 if (this%current_temperature <
m_zero)
then
787 write(
message(1),
'(a, f10.3, 3a, f10.3, 3a)') &
788 "Negative temperature (", &
795 this%current_temperature =
m_zero
806 type(
ions_t),
intent(inout) :: ions
807 real(real64),
intent(in) :: time
808 real(real64),
intent(in) :: dt
811 real(real64) :: dr(3)
815 assert(this%drive_ions)
817 do iatom = 1, ions%natoms
818 if (ions%fixed(iatom)) cycle
820 if (this%constant_velocity)
then
821 ions%pos(:, iatom) = ions%pos(:, iatom) + dt*ions%vel(:, iatom)
823 else if (
allocated(this%td_displacements))
then
825 if (this%td_displacements(iatom)%move)
then
826 dr(1:3)=(/ real(
tdf(this%td_displacements(iatom)%fx, time), real64), &
827 real(
tdf(this%td_displacements(iatom)%fy, time), real64), &
828 real(tdf(this%td_displacements(iatom)%fz, time), real64) /)
830 ions%pos(:, iatom) = this%ions_t0%pos(:, iatom) + dr(1:ions%space%dim)
846 type(
ions_t),
intent(inout) :: ions
847 real(real64),
intent(in) :: dt
853 assert(.not. this%drive_ions)
857 do iatom = 1, ions%natoms
858 if (ions%fixed(iatom)) cycle
860 ions%pos(:, iatom) = ions%pos(:, iatom) + dt*ions%vel(:, iatom) + &
861 m_half*dt**2 / ions%mass(iatom) * ions%tot_force(:, iatom)
863 this%oldforce(:, iatom) = ions%tot_force(:, iatom)
875 do iatom = 1, ions%natoms
876 if (ions%fixed(iatom)) cycle
878 ions%pos(:, iatom) = ions%pos(:, iatom) +
m_half*dt*ions%vel(:, iatom)
890 type(
ions_t),
intent(inout) :: ions
891 real(real64),
intent(in) :: dt
894 integer :: idir, jdir, comp
895 real(real64) :: rlattice_change(ions%space%periodic_dim*ions%space%periodic_dim)
899 rlattice_change = dt * this%cell_vel +
m_half*dt**2 * this%cell_force / this%cell_mass
902 do idir = 1, ions%space%periodic_dim
904 this%cell_force(jdir + (idir-1)*ions%space%periodic_dim)), &
905 jdir = 1, ions%space%periodic_dim)
907 call messages_info(1+ions%space%periodic_dim, namespace=ions%namespace)
909 write(
message(1),
'(a,3a,a)')
' Cell vel [', &
911 do idir = 1, ions%space%periodic_dim
913 this%cell_vel(jdir+ (idir-1)*ions%space%periodic_dim)), &
914 jdir = 1, ions%space%periodic_dim)
916 call messages_info(1+ions%space%periodic_dim, namespace=ions%namespace)
920 do idir = 1, ions%space%periodic_dim
921 do jdir = 1, ions%space%periodic_dim
922 ions%latt%rlattice(idir, jdir) = ions%latt%rlattice(idir, jdir) + rlattice_change(comp)
927 this%old_cell_force = this%cell_force
929 if (
associated(this%symm))
then
930 call this%symm%symmetrize_lattice_vectors(ions%space%periodic_dim, &
931 this%initial_rlattice, ions%latt%rlattice(1:ions%space%periodic_dim, 1:ions%space%periodic_dim), this%symmetrize)
933 call ions%update_lattice_vectors(ions%latt, this%symmetrize)
942 type(
ions_t),
intent(inout) :: ions
944 real(real64) :: g1, g2, ss, uk, dt, temp
950 call ions%update_kinetic_energy()
951 uk = ions%kinetic_energy
953 temp = this%current_temperature
955 g2 = (this%nh(1)%mass*this%nh(1)%vel**2 - temp)/this%nh(2)%mass
956 this%nh(2)%vel = this%nh(2)%vel + g2*dt/
m_four
957 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
959 g1 = (
m_two*uk -
m_three*ions%natoms*temp)/this%nh(1)%mass
960 this%nh(1)%vel = this%nh(1)%vel + g1*dt/
m_four
961 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
962 this%nh(1)%pos = this%nh(1)%pos + this%nh(1)%vel*dt/
m_two
963 this%nh(2)%pos = this%nh(2)%pos + this%nh(2)%vel*dt/
m_two
967 ions%vel = ss*ions%vel
971 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
972 g1 = (
m_two*uk -
m_three*ions%natoms*temp)/this%nh(1)%mass
973 this%nh(1)%vel = this%nh(1)%vel + g1*dt/
m_four
974 this%nh(1)%vel = this%nh(1)%vel*
exp(-this%nh(2)%vel*dt/8.0_real64)
976 g2 = (this%nh(1)%mass*this%nh(1)%vel**2 - temp)/this%nh(2)%mass
977 this%nh(2)%vel = this%nh(2)%vel + g2*dt/
m_four
986 type(
ions_t),
intent(inout) :: ions
987 logical,
optional,
intent(out) :: atoms_moved
990 real(real64) :: scal, temp
993 if (this%drive_ions)
return
997 if (
present(atoms_moved)) atoms_moved = this%thermostat ==
thermo_nh
1002 do iatom = 1, ions%natoms
1003 if (ions%fixed(iatom)) cycle
1005 ions%vel(:, iatom) = ions%vel(:, iatom) &
1006 + this%dt/ions%mass(iatom) *
m_half * (this%oldforce(:, iatom) + &
1007 ions%tot_force(:, iatom))
1013 do iatom = 1, ions%natoms
1014 if (ions%fixed(iatom)) cycle
1016 ions%vel(:, iatom) = ions%vel(:, iatom) + this%dt*ions%tot_force(:, iatom) / ions%mass(iatom)
1017 ions%pos(:, iatom) = ions%pos(:, iatom) +
m_half*this%dt*ions%vel(:, iatom)
1027 scal =
sqrt(this%current_temperature/temp)
1028 ions%vel = scal*ions%vel
1032 if (this%cell_relax())
then
1033 this%cell_vel = this%cell_vel + this%dt *
m_half * (this%old_cell_force + this%cell_force) / this%cell_mass
1045 type(
ions_t),
intent(in) :: ions
1046 real(real64),
intent(inout) :: q(:, :)
1047 real(real64),
intent(inout) :: v(:, :)
1048 real(real64),
intent(in) :: fold(:, :)
1049 real(real64),
intent(in) :: dt
1056 do iatom = 1, ions%natoms
1057 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) / ions%mass(iatom)
1061 do iatom = 1, ions%natoms
1062 if (ions%fixed(iatom)) cycle
1063 q(iatom, 1:ions%space%dim) = q(iatom, 1:ions%space%dim) + dt * v(iatom, 1:ions%space%dim) + &
1064 m_half*dt**2 / ions%mass(iatom) * fold(iatom, 1:ions%space%dim)
1068 do iatom = 1, ions%natoms
1069 v(iatom, 1:ions%space%dim) = ions%mass(iatom) * v(iatom, 1:ions%space%dim)
1080 type(
ions_t),
intent(in) :: ions
1081 real(real64),
intent(inout) :: v(:, :)
1082 real(real64),
intent(in) :: fold(:, :)
1083 real(real64),
intent(in) :: fnew(:, :)
1084 real(real64),
intent(in) :: dt
1091 do iatom = 1, ions%natoms
1092 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) / ions%mass(iatom)
1096 do iatom = 1, ions%natoms
1097 if (ions%fixed(iatom)) cycle
1098 v(iatom, 1:ions%space%dim) = v(iatom, 1:ions%space%dim) &
1099 + dt / ions%mass(iatom) *
m_half * (fold(iatom, 1:ions%space%dim) + fnew(iatom, 1:ions%space%dim))
1103 do iatom = 1, ions%natoms
1104 v(iatom, 1:ions%space%dim) = ions%mass(iatom) * v(iatom, 1:ions%space%dim)
1114 type(
ions_t),
intent(in) :: ions
1117 if (.not. this%ions_move())
return
1121 safe_allocate(state%pos(1:ions%space%dim, 1:ions%natoms))
1122 safe_allocate(state%vel(1:ions%space%dim, 1:ions%natoms))
1124 state%pos = ions%pos
1125 state%vel = ions%vel
1128 safe_allocate(state%old_pos(1:ions%space%dim, 1:ions%natoms))
1129 state%old_pos(1:ions%space%dim, 1:ions%natoms) = this%old_pos(1:ions%space%dim, 1:ions%natoms)
1130 state%nh(1:2)%pos = this%nh(1:2)%pos
1131 state%nh(1:2)%vel = this%nh(1:2)%vel
1141 type(
ions_t),
intent(inout) :: ions
1144 assert(.not. this%cell_relax())
1145 if (.not. this%ions_move())
return
1149 ions%pos = state%pos
1150 ions%vel = state%vel
1153 this%old_pos(1:ions%space%dim, 1:ions%natoms) = state%old_pos(1:ions%space%dim, 1:ions%natoms)
1154 this%nh(1:2)%pos = state%nh(1:2)%pos
1155 this%nh(1:2)%vel = state%nh(1:2)%vel
1156 safe_deallocate_a(state%old_pos)
1159 safe_deallocate_a(state%pos)
1160 safe_deallocate_a(state%vel)
1170 ions_move = this%move_ions
1180 drive_ions = this%drive_ions
1189 cell_dynamics = this%relax_cell
1198 is_active = this%relax_cell .or. this%move_ions
1206 type(ions_t),
intent(in) :: ions
1209 real(real64) :: kinetic_energy
1211 kinetic_energy = m_zero
1212 do iatom = 1, ions%natoms
1213 kinetic_energy = kinetic_energy + &
1214 m_half * ions%mass(iatom) * sum(ions%vel(:, iatom)**2)
1216 temperature = m_two/m_three*kinetic_energy/ions%natoms
1225 if (this%move_ions)
then
1226 this%move_ions = .false.
1238 this%move_ions = .
true.
1244 type(restart_t),
intent(in) :: restart
1245 integer,
intent(out) :: ierr
1249 if (
allocated(this%oldforce))
then
1250 call restart%write_binary(
"ion_dynamics_oldforce",
size(this%oldforce), &
1251 this%oldforce, ierr)
1254 if(
allocated(this%old_cell_force))
then
1255 call restart%write_binary(
"ion_dynamics_old_cell_force",
size(this%old_cell_force), &
1256 this%old_cell_force, ierr)
1265 type(restart_t),
intent(in) :: restart
1266 integer,
intent(out) :: ierr
1270 if (
allocated(this%oldforce))
then
1271 call restart%read_binary(
"ion_dynamics_oldforce",
size(this%oldforce), &
1272 this%oldforce, ierr)
1275 if(
allocated(this%old_cell_force))
then
1276 call restart%read_binary(
"ion_dynamics_old_cell_force",
size(this%old_cell_force), &
1277 this%old_cell_force, ierr)
1287 class(space_t),
intent(in) :: space
1288 real(real64),
intent(in) :: stress(3,3)
1289 real(real64),
intent(in) :: rlattice(:,:)
1290 real(real64),
intent(in) :: rcell_volume
1292 integer :: idir, jdir, comp
1293 real(real64) :: inv_latt(space%periodic_dim, space%periodic_dim), tmp_stress(space%periodic_dim, space%periodic_dim)
1294 real(real64) :: cell_force(space%periodic_dim, space%periodic_dim)
1299 inv_latt = rlattice(1:space%periodic_dim, 1:space%periodic_dim)
1300 call lalg_inverse(space%periodic_dim, inv_latt,
'dir')
1304 tmp_stress = -stress(1:space%periodic_dim, 1:space%periodic_dim)
1305 do idir = 1, space%periodic_dim
1306 tmp_stress(idir, idir) = tmp_stress(idir, idir) - this%pressure
1308 cell_force = matmul(tmp_stress, transpose(inv_latt)) * rcell_volume
1311 do idir = 1, space%periodic_dim
1312 do jdir = 1, space%periodic_dim
1313 this%cell_force(comp) = cell_force(idir, jdir)
1318 if (debug%info)
then
1319 write(message(1),
'(a,3a,a)')
' Stress tensor [', trim(units_abbrev(units_out%energy/units_out%length**space%dim)),
']'
1320 do idir = 1, space%periodic_dim
1321 write(message(1+idir),
'(9e18.10)') (units_from_atomic(units_out%energy/units_out%length**space%dim, stress(jdir, idir)), &
1322 jdir = 1, space%periodic_dim)
1324 call messages_info(1+space%periodic_dim, namespace=global_namespace)
1332 type(namespace_t),
intent(in) :: namespace
1333 type(grid_t),
intent(inout) :: gr
1334 class(space_t),
intent(in) :: space
1335 type(lattice_vectors_t),
intent(in) :: new_latt
1338 real(real64) :: length(1:space%dim)
1343 select type(box => gr%box)
1344 type is (box_parallelepiped_t)
1345 do idir = 1, space%dim
1346 length(idir) = norm2(new_latt%rlattice(1:space%dim, idir))
1348 call box%regenerate(space%dim, new_latt%rlattice, length, namespace)
1350 call messages_not_implemented(
"Grid regeneration for non-parallelepiped boxes", namespace=namespace)
1358 type(namespace_t),
intent(in) :: namespace
1359 type(grid_t),
intent(inout) :: gr
1360 class(space_t),
intent(in) :: space
1361 type(poisson_t),
intent(inout) :: psolver
1362 type(kpoints_t),
intent(inout) :: kpoints
1363 type(multicomm_t),
intent(in) :: mc
1364 real(real64),
intent(in) :: qtot
1365 type(lattice_vectors_t),
intent(in) :: new_latt
1369 call grid_lattice_vectors_update(gr, space, namespace, mc, new_latt)
1372 call poisson_end(psolver)
1373 call poisson_init(psolver, namespace, space, gr%der, mc, gr%stencil, qtot, verbose=.false.)
1375 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__
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.
integer, parameter cell_mass_mtk
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.
type(unit_system_t), public units_inp
the units systems for reading and writing