67 character(len=256) :: coords_file, comment
68 integer :: ierr, sampling, i, coords_unit, iter, j, record_length
71 type(ions_t),
pointer :: ions
74 coords_file =
'td.general/coordinates'
85 if (sampling < 1)
then
86 message(1) =
'Sampling rate (AnimationSampling) should be bigger than 0'
101 record_length = 100 + ions%space%dim*ions%natoms*3*20
104 coords_unit =
io_open(coords_file, ions%namespace, action=
'read', recl = record_length)
109 read(unit = coords_unit, iostat = ierr, fmt = *) iter, time, &
110 ((ions%pos(j, i), j = 1, ions%space%dim), i = 1, ions%natoms)
112 if (mod(iter, sampling) == 0)
then
113 write(comment,
'(i10,f20.6)') iter, time
114 if (.not. multifiles)
then
116 call ions%write_xyz(
'td.general/movie', append = .
true., comment = trim(comment))
118 call io_mkdir(
'td.general/movie/', ions%namespace)
119 write(coords_file,
'(i7.7)')iter
120 call ions%write_xyz(
'td.general/movie/geo-' + trim(coords_file), append = .false.)
125 safe_deallocate_p(ions)
subroutine, public getopt_init(ierr)
Initializes the getopt machinery. Must be called before attempting to parse the options....
subroutine, public getopt_end
subroutine, public global_end()
Finalise parser varinfo file, and MPI.
type(mpi_comm), parameter, public serial_dummy_comm
Alias MPI_COMM_UNDEFINED for the specific use case of initialising Octopus utilities with no MPI supp...
subroutine, public init_octopus_globals(comm)
Initialise Octopus-specific global constants and files. This routine performs no initialisation calls...
subroutine, public io_init(defaults)
If the argument defaults is present and set to true, then the routine will not try to read anything f...
subroutine, public io_close(iunit, grp)
subroutine, public io_skip_header(iunit)
subroutine, public io_end()
subroutine, public io_mkdir(fname, namespace, parents)
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
subroutine, public messages_end()
subroutine, public messages_init(output_dir)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
type(namespace_t), public global_namespace
subroutine, public parser_init()
Initialise the Octopus parser.
subroutine, public parser_end()
End the Octopus parser.
subroutine, public profiling_end(namespace)
subroutine, public profiling_init(namespace)
Create profiling subdirectory.
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
subroutine, public unit_system_init(namespace)
subroutine generate_xyz_anim()