Octopus
io_function.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
23 use atom_oct_m
24 use box_oct_m
26 use comm_oct_m
28 use cube_oct_m
29 use debug_oct_m
31 use fft_oct_m
32 use global_oct_m
33 use index_oct_m
34 use io_oct_m
36 use io_csv_oct_m
39 use mesh_oct_m
42 use mpi_oct_m
45#if defined(HAVE_NETCDF)
46 use netcdf
47#endif
49 use parser_oct_m
51 use space_oct_m
53 use unit_oct_m
55 use utils_oct_m
57 use vtk_oct_m
58
59 implicit none
60
61 private
62 public :: &
78
79#if defined(HAVE_NETCDF)
80 public :: &
83#endif
84
86 integer, parameter, private :: &
87 DOUTPUT_KIND = 1, &
88 zoutput_kind = -1
89
91 character(len=3), parameter :: &
92 index2label(3) = (/ 're ', 'im ', 'abs' /)
93
94
97 end interface io_function_output_vector
98
101 end interface io_function_output_vector_bz
102
105 end interface io_function_output_global_bz
106
109 end interface io_function_output_supercell
110
111
112
113contains
115 ! ---------------------------------------------------------
116 subroutine io_function_read_what_how_when(namespace, space, what, how, output_interval, &
117 what_tag_in, how_tag_in, output_interval_tag_in, ignore_error)
118 type(namespace_t), intent(in) :: namespace
119 class(space_t), intent(in) :: space
120 logical, intent(inout) :: what(MAX_OUTPUT_TYPES)
121 integer(int64), intent(out) :: how(0:MAX_OUTPUT_TYPES)
122 integer, intent(out) :: output_interval(0:MAX_OUTPUT_TYPES)
123 character(len=*), optional, intent(in) :: what_tag_in
124 character(len=*), optional, intent(in) :: how_tag_in
125 character(len=*), optional, intent(in) :: output_interval_tag_in
126 logical, optional, intent(in) :: ignore_error
127
128 type(block_t) :: blk
129 integer :: ncols, nrows, iout, column_index, what_i
130 integer(int64) :: what_no_how(12)
131 character(len=80) :: what_tag
132 character(len=80) :: how_tag
133 character(len=80) :: output_interval_tag
134 character(len=80) :: output_column_marker
136
137 how = 0_8
138 output_interval = 0_8
139 ncols = 0
140 what_tag = optional_default(what_tag_in, 'Output')
141 how_tag = optional_default(how_tag_in, 'OutputFormat')
142 output_interval_tag = optional_default(output_interval_tag_in, 'OutputInterval')
143
144 call messages_obsolete_variable(namespace, 'OutputHow', 'OutputFormat')
145 call messages_obsolete_variable(namespace, 'Output_KPT', 'Output')
146 call messages_obsolete_variable(namespace, 'OutputLDA_U' , 'Output')
147 call messages_obsolete_variable(namespace, 'OutputEvery', 'OutputInterval/RestartWriteInterval')
148
149 !%Variable Output
150 !%Type block
151 !%Default none
152 !%Section Output
153 !%Description
154 !% Specifies what to print.
155 !% Each output must be in a separate row. Optionally individual output formats and output intervals can be defined
156 !% for each row or they can be read separately from <tt>OutputFormat</tt> and <tt>OutputInterval</tt> variables
157 !% in the input file.
158 !% The output files are written at the end of the run into the output directory for the
159 !% relevant kind of run (<i>e.g.</i> <tt>static</tt> for <tt>CalculationMode = gs</tt>).
160 !% Time-dependent simulations print only per iteration, including always the last. The frequency of output per iteration
161 !% (available for <tt>CalculationMode</tt> = <tt>gs</tt>, <tt>unocc</tt>, <tt>td</tt>, and <tt>opt_control</tt>)
162 !% is set by <tt>OutputInterval</tt> and the directory is set by <tt>OutputIterDir</tt>.
163 !% For linear-response run modes, the derivatives of many quantities can be printed, as listed in
164 !% the options below. Indices in the filename are labelled as follows:
165 !% <tt>sp</tt> = spin (or spinor component), <tt>k</tt> = <i>k</i>-point, <tt>st</tt> = state/band.
166 !% There is no tag for directions, given as a letter. The perturbation direction is always
167 !% the last direction for linear-response quantities, and a following +/- indicates the sign of the frequency.
168 !%
169 !% Example (minimal):
170 !% <br><br><tt>%Output
171 !% <br>&nbsp;&nbsp;density
172 !% <br>&nbsp;&nbsp;potential
173 !% <br>%<br></tt>
174 !%
175 !% Example (with OutputFormat):
176 !% <br><br><tt>%Output
177 !% <br>&nbsp;&nbsp;density | cube + axis_z
178 !% <br>&nbsp;&nbsp;potential | cube
179 !% <br>%<br></tt>
180 !%
181 !% Example (with OutputFormat, incomplete):
182 !% <br><br><tt>%Output
183 !% <br>&nbsp;&nbsp;density | cube + axis_z
184 !% <br>&nbsp;&nbsp;potential
185 !% <br>%<br></tt>
186 !%
187 !% Example (tagged):
188 !% <br><br><tt>%Output
189 !% <br>&nbsp;&nbsp;density | "output_format" | cube + axis_z | "output_interval" | 50
190 !% <br>&nbsp;&nbsp;potential | "output_format" | cube | "output_interval" | 20
191 !% <br>%<br></tt>
192 !%
193 !% Example (tagged, incomplete):
194 !% <br><br><tt>%Output
195 !% <br>&nbsp;&nbsp;density | "output_format" | cube + axis_z
196 !% <br>&nbsp;&nbsp;potential | "output_interval" | 20
197 !% <br>%<br></tt>
198 !% Missing information for the incomplete blocks will be parsed form the out-of-block
199 !% definitions. It is also possible to mix the order of columns in the tagged format.
200 !% See <tt>OutputFormat</tt>, and <tt>OutputInterval</tt>.
201 !%Option potential 1
202 !% Outputs Kohn-Sham potential, separated by parts. File names are <tt>v0</tt> for
203 !% the local part of the ionic potential, <tt>vc</tt> for the classical potential (if it exists),
204 !% <tt>vh</tt> for the Hartree potential, <tt>vks</tt> for the local part of the Kohn-Sham potential, and
205 !% <tt>vxc-</tt> for the exchange-correlation potentials. For <tt>vks</tt> and <tt>vxc</tt>,
206 !% a suffix for spin is added in the spin-polarized case.
207 !%Option density 2
208 !% Outputs density. The output file is called <tt>density-</tt>, or <tt>lr_density-</tt> in linear response.
209 !%Option wfs 3
210 !% Outputs wavefunctions. Which wavefunctions are to be printed is specified
211 !% by the variable <tt>OutputWfsNumber</tt> -- see below. The output file is called
212 !% <tt>wf-</tt>, or <tt>lr_wf-</tt> in linear response.
213 !%Option wfs_sqmod 4
214 !% Outputs modulus squared of the wavefunctions.
215 !% The output file is called <tt>sqm-wf-</tt>. For linear response, the filename is <tt>sqm_lr_wf-</tt>.
216 !%Option geometry 5
217 !% Outputs file containing the coordinates of the atoms treated within quantum mechanics.
218 !% If <tt>OutputFormat = xyz</tt>, the file is called <tt>geometry.xyz</tt>; a
219 !% file <tt>crystal.xyz</tt> is written with a supercell geometry if the system is periodic;
220 !% if point charges were defined in the PDB file (see <tt>PDBCoordinates</tt>), they will be output
221 !% in the file <tt>geometry_classical.xyz</tt>.
222 !% If <tt>OutputFormat = xcrysden</tt>, a file called <tt>geometry.xsf</tt> is written.
223 !%Option current 6
224 !% Outputs the total current density. The output file is called <tt>current-</tt>.
225 !% For linear response, the filename is <tt>lr_current-</tt>.
226 !%Option ELF 7
227 !% Outputs electron localization function (ELF). The output file is called <tt>elf-</tt>,
228 !% or <tt>lr_elf-</tt> in linear response, in which case the associated function D is also written,
229 !% as <tt>lr_elf_D-</tt>. Only in 2D and 3D.
230 !%Option ELF_basins 8
231 !% Outputs basins of attraction of the ELF. The output file is called
232 !% <tt>elf_rs_basins.info</tt>. Only in 2D and 3D.
233 !%Option Bader 9
234 !% Outputs Laplacian of the density which shows lone pairs, bonded charge concentrations
235 !% and regions subject to electrophilic or nucleophilic attack.
236 !% See RF Bader, <i>Atoms in Molecules: A Quantum Theory</i> (Oxford Univ. Press, Oxford, 1990).
237 !%Option el_pressure 10
238 !% Outputs electronic pressure. See Tao, Vignale, and Tokatly, <i>Phys Rev Lett</i> <b>100</b>, 206405 (2008).
239 !%Option matrix_elements 11
240 !% Outputs a series of matrix elements of the Kohn-Sham states. What is output can
241 !% be controlled by the <tt>OutputMatrixElements</tt> variable.
242 !%Option pol_density 12
243 !% Outputs dipole-moment density <tt>dipole_density-</tt>, or polarizability density <tt>alpha_density-</tt>
244 !% in linear response. If <tt>ResponseMethod = finite_differences</tt>, the hyperpolarizability density
245 !% <tt>beta_density-</tt> is also printed.
246 !%Option mesh_r 13
247 !% Outputs values of the coordinates over the grid. Files
248 !% will be called <tt>mesh_r-</tt> followed by the direction.
249 !%Option kinetic_energy_density 14
250 !% Outputs kinetic-energy density, defined as:
251 !%
252 !% <math>\tau_\sigma(\vec{r}) = \sum_{i=1}^{N_\sigma}
253 !% \left| \vec{\nabla} \phi_{i\sigma}(\vec{r}) \right|^2\,. </math>
254 !%
255 !% The index <math>\sigma</math> is the spin index for the spin-polarized case,
256 !% or if you are using spinors. For spin-unpolarized calculations, you
257 !% get the total kinetic-energy density. The previous expression assumes full
258 !% or null occupations. If fractional occupation numbers, each term in the sum
259 !% is weighted by the occupation. Also, if we are working with an infinite
260 !% system, all <i>k</i>-points are summed up, with their corresponding weights. The
261 !% files will be called <tt>tau-sp1</tt> and <tt>tau-sp2</tt>, if the spin-resolved kinetic
262 !% energy density is produced (runs in spin-polarized and spinors mode), or
263 !% only <tt>tau</tt> if the run is in spin-unpolarized mode.
264 !%Option dos 15
265 !% Outputs density of states. See <tt>DOSEnergyMax</tt>, <tt>DOSEnergyMin</tt>, <tt>DOSEnergyPoints</tt>,
266 !% and <tt>DOSGamma</tt>.
267 !%Option tpa 16
268 !% Outputs transition-potential approximation (TPA) matrix elements, using <math>\vec{q}</math>-vector specified
269 !% by <tt>MomentumTransfer</tt>.
270 !%Option forces 17
271 !% Outputs file <tt>forces.xsf</tt> containing structure and forces on the atoms as
272 !% a vector associated with each atom, which can be visualized with XCrySDen.
273 !%Option wfs_fourier 18
274 !% (Experimental) Outputs wavefunctions in Fourier space. This is
275 !% only implemented for the ETSF file format output. The file will
276 !% be called <tt>wfs-pw-etsf.nc</tt>.
277 !%Option xc_density 19
278 !% Outputs the XC density, which is the charge density that
279 !% generates the XC potential. (This is <math>-1/4\pi</math> times
280 !% the Laplacian of the XC potential). The files are called <tt>nxc</tt>.
281 !%Option PES_wfs 20
282 !% Outputs the photoelectron wavefunctions. The file name is <tt>pes_wfs-</tt>
283 !% plus the orbital number.
284 !%Option PES_density 21
285 !% Outputs the photolectron density. Output file is <tt>pes_dens-</tt> plus spin species if
286 !% spin-polarized calculation is performed.
287 !%Option PES 22
288 !% Outputs the time-dependent photoelectron spectrum.
289 !%Option BerkeleyGW 23
290 !% Output for a run with <a href=http://www.berkeleygw.org>BerkeleyGW</a>.
291 !% See <tt>Output::BerkeleyGW</tt> for further specification.
292 !%Option delta_perturbation 24
293 !% Outputs the "kick", or time-delta perturbation applied to compute optical response in real time.
294 !%Option external_td_potential 25
295 !% Outputs the (scalar) time-dependent potential.
296 !%Option mmb_wfs 26
297 !% Triggers the ModelMB wavefunctions to be output for each state.
298 !%Option mmb_den 27
299 !% Triggers the ModelMB density matrix to be output for each state, and the particles
300 !% specified by the <tt>DensitytoCalc</tt> block. Calculates, and outputs, the reduced density
301 !% matrix. For the moment the trace is made over the second dimension, and
302 !% the code is limited to 2D. The idea is to model <i>N</i> particles in 1D as an
303 !% <i>N</i>-dimensional non-interacting problem, then to trace out <i>N</i>-1 coordinates.
304 !%Option potential_gradient 28
305 !% Prints the gradient of the potential.
306 !%Option energy_density 29
307 !% Outputs the total energy density to a file called
308 !% <tt>energy_density</tt>.
309 !%Option heat_current 30
310 !% Outputs the total heat current density. The output file is
311 !% called <tt>heat_current-</tt>.
312 !%Option photon_correlator 31
313 !% Outputs the electron-photon correlation function. The output file is
314 !% called <tt>photon_correlator</tt>.
315 !%Option J_flow 32
316 !% todo: document J_flow option!
317 !%Option current_kpt 33
318 !% Outputs the current density resolved in momentum space. The output file is called <tt>current_kpt-</tt>.
319 !%Option density_kpt 34
320 !% Outputs the electronic density resolved in momentum space.
321 !%Option occ_matrices 35
322 !% Only for DFT+U calculations.
323 !% Outputs the occupation matrices of DFT+U
324 !%Option effectiveU 36
325 !% Only for DFT+U calculations.
326 !% Outputs the value of the effectiveU for each atoms
327 !%Option magnetization 37
328 !% Only for DFT+U calculations.
329 !% Outputs file containing structure and magnetization of the localized subspace
330 !% on the atoms as a vector associated with each atom, which can be visualized.
331 !% For the moment, it only works if a +U is added on one type of orbital per atom.
332 !%Option local_orbitals 38
333 !% Only for DFT+U calculations.
334 !% Outputs the localized orbitals that form the correlated subspace
335 !%Option kanamoriU 39
336 !% Only for DFT+U calculations.
337 !% Outputs the Kanamori interaction parameters U, U`, and J.
338 !% These parameters are not determined self-consistently, but are taken from the
339 !% occupation matrices and Coulomb integrals comming from a standard +U calculation.
340 !%Option xc_torque 40
341 !% Outputs the exchange-correlation torque. Only for the spinor case and in the 3D case.
342 !%Option eigenval_kpt 41
343 !% Outputs the eigenvalues resolved in momentum space, with one file for each band.
344 !%Option stress 42
345 !% Outputs the stress tensor and each of its contributing terms
346 !%Option current_dia 43
347 !% Outputs the diamagnetic current density from a non-uniform vector potential.
348 !% The output file is called <tt>current_dia-</tt>.
349 !%Option jdos 44
350 !% Outputs the joint density of states.
351 !% The same variables as for the regular DOS are used to control the energies and broadening.
352 !%End
353
354 !%Variable OutputFormat
355 !%Type flag
356 !%Default 0
357 !%Section Output
358 !%Description
359 !% Describes the format of the output files.
360 !% This variable can also be defined inside the <tt>Output</tt> block.
361 !% See <tt>Output</tt>.
362 !% Example: <tt>axis_x + plane_x + dx</tt>
363 !%Option axis_x bit(0)
364 !% The values of the function on the <i>x</i> axis are printed. The string <tt>.y=0,z=0</tt> is appended
365 !% to previous file names.
366 !%Option axis_y bit(1)
367 !% The values of the function on the <i>y</i> axis are printed. The string <tt>.x=0,z=0</tt> is appended
368 !% to previous file names.
369 !%Option axis_z bit(2)
370 !% The values of the function on the <i>z</i> axis are printed. The string <tt>.x=0,y=0</tt> is appended
371 !% to previous file names.
372 !%Option plane_x bit(3)
373 !% A plane slice at <i>x</i> = 0 is printed. The string <tt>.x=0</tt> is appended
374 !% to previous file names.
375 !%Option plane_y bit(4)
376 !% A plane slice at <i>y</i> = 0 is printed. The string <tt>.y=0</tt> is appended
377 !% to previous file names.
378 !%Option plane_z bit(5)
379 !% A plane slice at <i>z</i> = 0 is printed. The string <tt>.z=0</tt> is appended to
380 !% previous file names.
381 !%Option dx bit(6)
382 !% For printing three-dimensional information, the open-source program
383 !% visualization tool <a href=http://www.opendx.org>OpenDX</a> can be used. The string
384 !% <tt>.dx</tt> is appended to previous file names. Available only in 3D.
385 !%Option netcdf bit(7)
386 !% Outputs in <a href=http://www.unidata.ucar.edu/packages/netcdf>NetCDF</a> format. This file
387 !% can then be read, for example, by OpenDX. The string <tt>.ncdf</tt> is appended to previous file names.
388 !% Requires the NetCDF library. Only writes the real part of complex functions.
389 !%Option mesh_index bit(8)
390 !% Generates output files of a given quantity (density, wavefunctions, ...) which include
391 !% the internal numbering of mesh points. Since this mode produces large datafiles this is only
392 !% useful for small meshes and debugging purposes.
393 !% The output can also be used to display the mesh directly. A Gnuplot script for mesh visualization
394 !% can be found under <tt>PREFIX/share/octopus/util/display_mesh_index.gp</tt>.
395 !%Option xcrysden bit(9)
396 !% A format for printing structures and three-dimensional information, which can be visualized by
397 !% the free open-source program <a href=http://www.xcrysden.org>XCrySDen</a> and others. The string
398 !% <tt>.xsf</tt> is appended to previous file names. Note that lattice vectors and coordinates are as
399 !% specified by <tt>UnitsOutput</tt>. Available in 2D and 3D.
400 !%Option matlab bit(10)
401 !% In combination with <tt>plane_x</tt>, <tt>plane_y</tt> and
402 !% <tt>plane_z</tt>, this option produces output files which are
403 !% suitable for 2D Matlab functions like <tt>mesh()</tt>,
404 !% <tt>surf()</tt>, or <tt>waterfall()</tt>. To load these files
405 !% into Matlab you can use, <i>e.g.</i>
406 !%<tt>
407 !% >> density = load('static/density-1.x=0.matlab.abs');
408 !% >> mesh(density);
409 !%</tt>
410 !%Option meshgrid bit(11)
411 !% Outputs in Matlab mode the internal mesh in a format similar to
412 !%<tt>
413 !% >> [x,y] = meshgrid(-2:.2:2,-1:.15:1)
414 !%</tt>
415 !% The <i>x</i> meshgrid is contained in a file <tt>*.meshgrid.x</tt> and the <i>y</i>-grid can be found in
416 !% <tt>*.meshgrid.y</tt>.
417 !%Option boundary_points bit(12)
418 !% This option includes the output of the mesh enlargement. Default is without.
419 !% Supported only by <tt>binary</tt>, <tt>axis</tt>, <tt>plane</tt>, <tt>mesh_index</tt>,
420 !% and <tt>matlab</tt> formats.
421 !% Not all types of <tt>Output</tt> will have this information available. Not supported when parallel in domains.
422 !%Option binary bit(13)
423 !% Plain binary, new format.
424 !%Option etsf bit(14)
425 !% <a href=http://www.etsf.eu/resources/software/standardization_project>ETSF file format</a>.
426 !% Requires the ETSF_IO library. Applies only to <tt>Output = density</tt>, <tt>geometry</tt>,
427 !% <tt>wfs</tt>, and/or <tt>wfs_fourier</tt>.
428 !%Option xyz bit(15)
429 !% Geometry will be output in XYZ format. Does not affect other outputs.
430 !%Option cube bit(16)
431 !% Generates output in the <a href=http://paulbourke.net/dataformats/cube>cube file format</a>.
432 !% Available only in 3D. Only writes the real part of complex functions.
433 !% This output format always uses atomic units.
434 !%Option bild bit(19)
435 !% Generates output in <a href=http://plato.cgl.ucsf.edu/chimera/docs/UsersGuide/bild.html>BILD format</a>.
436 !%Option vtk bit(20)
437 !% Generates output in <a href=http://www.vtk.org/VTK/img/file-formats.pdf>VTK legacy format</a>.
438 !%Option integrate_xy bit(21)
439 !% Integrates the function in the x-y plane and the result on the <i>z</i> axis is printed.
440 !%Option integrate_xz bit(22)
441 !% Integrates the function in the x-z plane and the result on the <i>y</i> axis is printed
442 !%Option integrate_yz bit(23)
443 !% Integrates the function in the y-z plane and the result on the <i>x</i> axis is printed
444 !%Option ascii bit(24)
445 !% Plain text format regardless of dimensionality. For the moment only employed by the oct-phototoelectron_spectrum
446 !% post-processing utility.
447 !%End
448
449 !%Variable OutputInterval
450 !%Type integer
451 !%Default 50
452 !%Section Output
453 !%Description
454 !% The output requested by variable <tt>Output</tt> is written
455 !% to the directory <tt>OutputIterDir</tt>
456 !% when the iteration number is a multiple of the <tt>OutputInterval</tt> variable.
457 !% Subdirectories are named Y.X, where Y is <tt>td</tt>, <tt>scf</tt>, or <tt>unocc</tt>, and
458 !% X is the iteration number. To use the working directory, specify <tt>"."</tt>
459 !% (Output of restart files is instead controlled by <tt>RestartWriteInterval</tt>.)
460 !% Must be >= 0. If it is 0, then no output is written. For <tt>gs</tt> and <tt>unocc</tt>
461 !% calculations, <tt>OutputDuringSCF</tt> must be set too for this output to be produced.
462 !% This variable can also be defined inside the <tt>Output</tt> block.
463 !% See <tt>Output</tt>.
464 !%End
465
466
467 what_no_how = (/ option__output__matrix_elements, option__output__berkeleygw, option__output__dos, &
468 option__output__tpa, option__output__mmb_den, option__output__j_flow, option__output__occ_matrices, &
469 option__output__effectiveu, option__output__magnetization, option__output__kanamoriu, option__output__stress, option__output__jdos /)
470
471 if (parse_block(namespace, what_tag, blk) == 0) then
472 nrows = parse_block_n(blk)
473 do iout = 0, nrows - 1
474 ncols = max(ncols , parse_block_cols(blk, iout))
475 end do
476
477 if (ncols == 1) then
478 !new format, Type 0
479 !%Output
480 ! density
481 ! wfs
482 !%
483 do iout = 1, nrows
484 call parse_block_integer(blk, iout - 1, 0, what_i)
485 if (.not. varinfo_valid_option(what_tag, what_i)) then
486 call messages_input_error(namespace, what_tag)
487 end if
488 if (what_i > 0) then
489 what(what_i) = .true.
490 call parse_variable(namespace, output_interval_tag, 50, output_interval(what_i))
491 if (((what_tag == 'Output') .and. (.not. any(what_no_how == what_i)))&
492 .or. (what_tag /= 'Output')) then
493 call parse_variable(namespace, how_tag, 0, how(what_i))
494 if (.not. varinfo_valid_option(how_tag, how(what_i), is_flag=.true.)) then
495 call messages_input_error(namespace, how_tag)
496 end if
497 end if
498 end if
499 end do
500 else if (ncols == 2) then
501 !new format, Type 1
502 !%Output
503 ! density | cube + axis_z
504 ! wfs | cube
505 !%
506
507 do iout = 1, nrows
508 call parse_block_integer(blk, iout - 1, 0, what_i)
509 if (.not. varinfo_valid_option(what_tag, what_i)) then
510 call messages_input_error(namespace, what_tag)
511 end if
512 if (what_i > 0) then
513 what(what_i) = .true.
514 call parse_variable(namespace, output_interval_tag, 50, output_interval(what_i))
515 if (((what_tag == 'Output') .and. (.not. any(what_no_how == what_i)))&
516 .or. (what_tag /= 'Output')) then
517 call parse_block_integer(blk, iout - 1, 1, how(what_i))
518 if (how(what_i) == 0) call parse_variable(namespace, how_tag, 0, how(what_i))
519 if (.not. varinfo_valid_option(how_tag, how(what_i), is_flag=.true.)) then
520 call messages_input_error(namespace, how_tag)
521 end if
522 end if
523 end if
524 end do
525
526 else
527 !new format, Type 2 (tagged)
528 !%Output
529 ! density | "output_interval" | 10 | "output_format" | cube + axis_z
530 ! wfs | "output_format" | cube | "output_interval" | 50
531 !%
532 !
533 ! OR
534 !
535 !%Output
536 ! density | "output_interval" | 10 | "output_format" | cube + axis_z
537 ! wfs | "output_format" | cube
538 !%
539 do iout = 1, nrows
540 call parse_block_integer(blk, iout - 1, 0, what_i)
541 if (.not. varinfo_valid_option(what_tag, what_i)) then
542 call messages_input_error(namespace, what_tag)
543 end if
544 if (what_i > 0) then
545 what(what_i) = .true.
546 do column_index = 0, 1
547 call parse_block_string(blk, iout - 1, 1 + column_index * 2, output_column_marker)
548 if (output_column_marker == 'output_interval') then
549 call parse_block_integer(blk, iout - 1, 2 + column_index * 2, output_interval(what_i))
550 else if (output_column_marker == 'output_format') then
551 if (((what_tag == 'Output') .and. (.not. any(what_no_how == what_i)))&
552 .or. (what_tag /= 'Output')) then
553 call parse_block_integer(blk, iout - 1, 2 + column_index * 2, how(what_i))
554 if (.not. varinfo_valid_option(how_tag, how(what_i), is_flag=.true.)) then
555 call messages_input_error(namespace, how_tag)
556 end if
557 end if
558 else if (len_trim(output_column_marker) /= 0) then
559 ! Unknown output_column_marker
560 call messages_input_error(namespace, what_tag)
561 else
562 ! no output_column_marker -> full output info is not in this block
563 if (output_interval(what_i) == 0) then
564 call parse_variable(namespace, output_interval_tag, 50, output_interval(what_i))
565 end if
566 if (how(what_i) == 0) then
567 if (((what_tag == 'Output') .and. (.not. any(what_no_how == what_i)))&
568 .or. (what_tag /= 'Output')) then
569 call parse_variable(namespace, how_tag, 0, how(what_i))
570 if (.not. varinfo_valid_option(how_tag, how(what_i), is_flag=.true.)) then
571 call messages_input_error(namespace, how_tag)
572 end if
573 end if
574 end if
575 end if
576 end do
577 end if
578 end do
579 end if
580 call parse_block_end(blk)
581 else
582
583 call messages_variable_is_block(namespace, what_tag)
584
585 ! Output block does not exist but we may have OutputHow/OutputInterval
586 call parse_variable(namespace, how_tag, 0, how(0))
587 call parse_variable(namespace, output_interval_tag, 50, output_interval(0))
588 end if
589
590
591 do what_i = lbound(what, 1), ubound(what, 1)
592 if (what_tag == 'Output') then
593 if (what(what_i) .and. (.not. any(what_no_how == what_i))) then
594 if (.not. varinfo_valid_option(how_tag, how(what_i), is_flag=.true.)) then
595 call messages_input_error(namespace, how_tag)
596 end if
597
598 if (how(what_i) == 0 .and. .not. optional_default(ignore_error, .false.)) then
599 write(message(1), '(a)') 'Must specify output method with variable OutputFormat.'
600 call messages_fatal(1, only_root_writes = .true., namespace=namespace)
601 end if
602
603 ! some modes are not available in some circumstances
604 if (space%dim == 1) then
605 if (bitand(how(what_i), option__outputformat__axis_y) /= 0) then
606 message(1) = "OutputFormat = axis_y not available with Dimensions = 1."
607 call messages_fatal(1, namespace=namespace)
608 end if
609 if (bitand(how(what_i), option__outputformat__plane_z) /= 0) then
610 message(1) = "OutputFormat = plane_z not available with Dimensions = 1."
611 call messages_fatal(1, namespace=namespace)
612 end if
613 if (bitand(how(what_i), option__outputformat__xcrysden) /= 0) then
614 message(1) = "OutputFormat = xcrysden not available with Dimensions = 1."
615 call messages_fatal(1, namespace=namespace)
616 end if
617 end if
618
619 if (space%dim <= 2) then
620 if (bitand(how(what_i), option__outputformat__axis_z) /= 0) then
621 message(1) = "OutputFormat = axis_z not available with Dimensions <= 2."
622 call messages_fatal(1, namespace=namespace)
623 end if
624 if (bitand(how(what_i), option__outputformat__plane_x) /= 0) then
625 message(1) = "OutputFormat = plane_x not available with Dimensions <= 2."
626 call messages_fatal(1, namespace=namespace)
627 end if
628 if (bitand(how(what_i), option__outputformat__plane_y) /= 0) then
629 message(1) = "OutputFormat = plane_y not available with Dimensions <= 2."
630 call messages_fatal(1, namespace=namespace)
631 end if
632 if (bitand(how(what_i), option__outputformat__integrate_xy) /= 0) then
633 message(1) = "OutputFormat = integrate_xy not available with Dimensions <= 2."
634 call messages_fatal(1, namespace=namespace)
635 end if
636 if (bitand(how(what_i), option__outputformat__integrate_xz) /= 0) then
637 message(1) = "OutputFormat = integrate_xz not available with Dimensions <= 2."
638 call messages_fatal(1, namespace=namespace)
639 end if
640 if (bitand(how(what_i), option__outputformat__integrate_yz) /= 0) then
641 message(1) = "OutputFormat = integrate_yz not available with Dimensions <= 2."
642 call messages_fatal(1, namespace=namespace)
643 end if
644 if (bitand(how(what_i), option__outputformat__dx) /= 0) then
645 message(1) = "OutputFormat = dx not available with Dimensions <= 2."
646 call messages_fatal(1, namespace=namespace)
647 end if
648 if (bitand(how(what_i), option__outputformat__cube) /= 0) then
649 message(1) = "OutputFormat = cube not available with Dimensions <= 2."
650 call messages_fatal(1, namespace=namespace)
651 end if
652 end if
653
654#if !defined(HAVE_NETCDF)
655 if (bitand(how(what_i), option__outputformat__netcdf) /= 0) then
656 message(1) = 'Octopus was compiled without NetCDF support.'
657 message(2) = 'It is not possible to write output in NetCDF format.'
658 call messages_fatal(2, namespace=namespace)
659 end if
660#endif
661#if !defined(HAVE_ETSF_IO)
662 if (bitand(how(what_i), option__outputformat__etsf) /= 0) then
663 message(1) = 'Octopus was compiled without ETSF_IO support.'
664 message(2) = 'It is not possible to write output in ETSF format.'
665 call messages_fatal(2, namespace=namespace)
666 end if
667#endif
668
669
670 end if
671 end if
672
673 if (output_interval(what_i) < 0) then
674 message(1) = "OutputInterval must be >= 0."
675 call messages_fatal(1, namespace=namespace)
676 end if
677 end do
678
680 end subroutine io_function_read_what_how_when
681
682 ! -------------------------------------------------------------------
685 ! ".", "func", mesh, sb, func, M_ONE, ierr)
686 ! -------------------------------------------------------------------
687 integer(int64) function io_function_fill_how(where) result(how)
688 character(len=*), intent(in) :: where
689
690 push_sub(io_function_fill_how)
691
692 how = 0
693 if (index(where, "AxisX") /= 0) how = ior(how, option__outputformat__axis_x)
694 if (index(where, "AxisY") /= 0) how = ior(how, option__outputformat__axis_y)
695 if (index(where, "AxisZ") /= 0) how = ior(how, option__outputformat__axis_z)
696 if (index(where, "PlaneX") /= 0) how = ior(how, option__outputformat__plane_x)
697 if (index(where, "PlaneY") /= 0) how = ior(how, option__outputformat__plane_y)
698 if (index(where, "PlaneZ") /= 0) how = ior(how, option__outputformat__plane_z)
699 if (index(where, "IntegrateXY") /= 0) how = ior(how, option__outputformat__integrate_xy)
700 if (index(where, "IntegrateXZ") /= 0) how = ior(how, option__outputformat__integrate_xz)
701 if (index(where, "IntegrateYZ") /= 0) how = ior(how, option__outputformat__integrate_yz)
702 if (index(where, "PlaneZ") /= 0) how = ior(how, option__outputformat__plane_z)
703 if (index(where, "DX") /= 0) how = ior(how, option__outputformat__dx)
704 if (index(where, "XCrySDen") /= 0) how = ior(how, option__outputformat__xcrysden)
705 if (index(where, "Binary") /= 0) how = ior(how, option__outputformat__binary)
706 if (index(where, "MeshIndex") /= 0) how = ior(how, option__outputformat__mesh_index)
707 if (index(where, "XYZ") /= 0) how = ior(how, option__outputformat__xyz)
708#if defined(HAVE_NETCDF)
709 if (index(where, "NETCDF") /= 0) how = ior(how, option__outputformat__netcdf)
710#endif
711 if (index(where, "Cube") /= 0) how = ior(how, option__outputformat__cube)
712 if (index(where, "VTK") /= 0) how = ior(how, option__outputformat__vtk)
713
714 pop_sub(io_function_fill_how)
715 end function io_function_fill_how
716
717 ! ---------------------------------------------------------
722 subroutine write_canonicalized_xyz_file(dir, fname, space, latt, pos, atoms, box, namespace)
723 character(len=*), intent(in) :: dir
724 character(len=*), intent(in) :: fname
725 class(space_t), intent(in) :: space
726 type(lattice_vectors_t), intent(in) :: latt
727 real(real64), intent(in) :: pos(:,:)
728 type(atom_t), intent(in) :: atoms(:)
729 class(box_t), intent(in) :: box
730 type(namespace_t), intent(in) :: namespace
731
732 integer :: iunit
733 integer :: idir
734 real(real64) :: position
735 integer :: iatom
736
738
739 call io_mkdir(dir, namespace)
740 iunit = io_open(trim(dir)//'/'//trim(fname)//'.xyz', namespace, action='write', position='asis')
741
742 write(iunit, '(i6)') size(atoms)
743 write(iunit, '(a,a,a)', advance='no') trim(space%short_info()), '; ', trim(box%short_info(unit_angstrom))
744 if (space%is_periodic()) then
745 write(iunit, '(a,a)') '; ', trim(latt%short_info(unit_angstrom))
746 else
747 write(iunit, '()')
748 end if
749
750 ! xyz-style labels and positions:
751 do iatom = 1, size(atoms)
752 write(iunit, '(10a)', advance='no') atoms(iatom)%label
753 do idir = 1, 3
754 if (idir <= space%dim) then
755 position = pos(idir, iatom)
756 else
757 position = m_zero
758 end if
759 write(iunit, '(xf11.6)', advance='no') units_from_atomic(unit_angstrom, position)
760 end do
761 write(iunit, '()')
762 end do
763
764 call io_close(iunit)
765
767 end subroutine write_canonicalized_xyz_file
768
769 ! ---------------------------------------------------------
770 subroutine write_xsf_geometry_file(dir, fname, space, latt, pos, atoms, mesh, namespace, total_forces)
771 character(len=*), intent(in) :: dir, fname
772 class(space_t), intent(in) :: space
773 type(lattice_vectors_t), intent(in) :: latt
774 real(real64), intent(in) :: pos(:,:)
775 type(atom_t), intent(in) :: atoms(:)
776 class(mesh_t), intent(in) :: mesh
777 type(namespace_t), intent(in) :: namespace
778 real(real64), optional, intent(in) :: total_forces(:,:)
779
780 integer :: iunit
781 real(real64), allocatable :: forces(:,:)
782
783 if (.not. mpi_grp_is_root(mpi_world)) return
784
786
787 call io_mkdir(dir, namespace)
788 iunit = io_open(trim(dir)//'/'//trim(fname)//'.xsf', namespace, action='write', position='asis')
789
790 if (present(total_forces)) then
791 safe_allocate(forces(1:space%dim, 1:size(atoms)))
792 forces = units_from_atomic(units_out%force, total_forces)
793 call write_xsf_geometry(iunit, space, latt, pos, atoms, mesh, forces = forces)
794 safe_deallocate_a(forces)
795 else
796 call write_xsf_geometry(iunit, space, latt, pos, atoms, mesh)
797 end if
798
799 call io_close(iunit)
800
802 end subroutine write_xsf_geometry_file
803
804 ! ---------------------------------------------------------
807 subroutine write_xsf_geometry(iunit, space, latt, pos, atoms, mesh, forces, index)
808 integer, intent(in) :: iunit
809 class(space_t), intent(in) :: space
810 type(lattice_vectors_t), intent(in) :: latt
811 real(real64), intent(in) :: pos(:,:)
812 type(atom_t), intent(in) :: atoms(:)
813 class(mesh_t), intent(in) :: mesh
814 real(real64), optional, intent(in) :: forces(:, :)
815 integer, optional, intent(in) :: index
816
817 integer :: idir, idir2, iatom, index_, natoms
818 character(len=7) :: index_str
819 real(real64) :: offset(space%dim)
820 real(real64) :: rlattice(space%dim, space%dim)
821
822 push_sub(write_xsf_geometry)
823
824 if (present(index)) then
825 write(index_str, '(a,i6)') ' ', index
826 index_ = index
827 else
828 write(index_str, '(a)') ''
829 index_ = 1
830 end if
831 natoms = size(pos, dim=2)
832
833 ! The corner of the cell is always (0,0,0) to XCrySDen
834 ! so the offset is applied to the atomic coordinates.
835 ! Along periodic dimensions the offset is -1/2 in reduced coordinates, as
836 ! our origin is at the center of the cell instead of being at the edge.
837 offset(1:space%dim) = latt%red_to_cart(spread(-m_half, 1, space%dim))
838 ! Offset in aperiodic directions:
839 do idir = space%periodic_dim + 1, space%dim
840 offset(idir) = -(mesh%idx%ll(idir) - 1)/2 * mesh%spacing(idir)
841 end do
842
843 if (space%is_periodic()) then
844 if (index_ == 1) then
845 select case (space%periodic_dim)
846 case (3)
847 write(iunit, '(a)') 'CRYSTAL'
848 case (2)
849 write(iunit, '(a)') 'SLAB'
850 case (1)
851 write(iunit, '(a)') 'POLYMER'
852 end select
853 end if
854
855 write(iunit, '(a)') 'PRIMVEC'//trim(index_str)
856
857 !Computes the rlattice corresponding to the 3D periodic version of the simulation box
858 rlattice = latt%rlattice
859 do idir = space%periodic_dim+1, space%dim
860 rlattice(:,idir) = rlattice(:,idir)*m_two*mesh%box%bounding_box_l(idir)
861 end do
862
863 do idir = 1, space%dim
864 write(iunit, '(3f12.6)') (units_from_atomic(units_out%length, rlattice(idir2, idir)), idir2 = 1, space%dim)
865 end do
866
867 write(iunit, '(a)') 'PRIMCOORD'//trim(index_str)
868 write(iunit, '(i10, a)') natoms, ' 1'
869 else
870 write(iunit, '(a)') 'ATOMS'//trim(index_str)
871 end if
872
873 ! BoxOffset should be considered here
874 do iatom = 1, natoms
875 write(iunit, '(a10, 3f12.6)', advance='no') trim(atoms(iatom)%label), &
876 (units_from_atomic(units_out%length, pos(idir, iatom) - offset(idir)), idir = 1, space%dim)
877 if (present(forces)) then
878 write(iunit, '(5x, 3f12.6)', advance='no') forces(:, iatom)
879 end if
880 write(iunit, '()')
881 end do
882
883 pop_sub(write_xsf_geometry)
884 end subroutine write_xsf_geometry
885
886! ---------------------------------------------------------
889 subroutine write_xsf_geometry_supercell(iunit, space, latt, pos, atoms, mesh, centers, supercell, extra_atom)
890 integer, intent(in) :: iunit
891 class(space_t), intent(in) :: space
892 type(lattice_vectors_t), intent(in) :: latt
893 real(real64), intent(in) :: pos(:,:)
894 type(atom_t), intent(in) :: atoms(:)
895 class(mesh_t), intent(in) :: mesh
896 real(real64), intent(in) :: centers(:, :)
897 integer, intent(in) :: supercell(:)
898 real(real64), optional, intent(in) :: extra_atom(:)
899
900 integer :: idir, idir2, iatom, index_
901 character(len=7) :: index_str
902 real(real64) :: offset(3)
903 integer :: irep, nreplica
904
906
907 write(index_str, '(a)') ''
908 index_ = 1
909
910 nreplica = product(supercell(1:space%dim))
911
912 ! The corner of the cell is always (0,0,0) to XCrySDen
913 ! so the offset is applied to the atomic coordinates.
914 ! Offset in periodic directions:
915 offset(1:space%dim) = latt%red_to_cart(spread(-m_half, 1, space%dim))
916 offset(1:3) = offset(1:3) + centers(1:3,1)
917 ! Offset in aperiodic directions:
918 do idir = space%periodic_dim + 1, 3
919 offset(idir) = -(mesh%idx%ll(idir) - 1)/2 * mesh%spacing(idir)
920 end do
921
922 if(space%is_periodic()) then
923 if(index_ == 1) then
924 select case(space%periodic_dim)
925 case(3)
926 write(iunit, '(a)') 'CRYSTAL'
927 case(2)
928 write(iunit, '(a)') 'SLAB'
929 case(1)
930 write(iunit, '(a)') 'POLYMER'
931 end select
932 end if
933
934 write(iunit, '(a)') 'PRIMVEC'//trim(index_str)
935
936 do idir = 1, space%dim
937 write(iunit, '(3f12.6)') (units_from_atomic(units_out%length, &
938 latt%rlattice(idir2, idir)*supercell(idir)), idir2 = 1, space%dim)
939 end do
940
941 write(iunit, '(a)') 'PRIMCOORD'//trim(index_str)
942 if(.not.present(extra_atom)) then
943 write(iunit, '(i10, a)') size(atoms)*nreplica, ' 1'
944 else
945 write(iunit, '(i10, a)') size(atoms)*nreplica+1, ' 1'
946 end if
947 else
948 write(iunit, '(a)') 'ATOMS'//trim(index_str)
949 end if
950
951
952 do irep = 1, nreplica
953 ! BoxOffset should be considered here
954 do iatom = 1, size(atoms)
955 write(iunit, '(a10, 3f12.6)', advance='no') trim(atoms(iatom)%label), &
956 (units_from_atomic(units_out%length, pos(idir, iatom) + centers(idir, irep) &
957 - offset(idir)), idir = 1, space%dim)
958 write(iunit, '()')
959 end do
960 end do
961 write(iunit, '(a10, 3f12.6)', advance='no') 'X', &
962 (units_from_atomic(units_out%length, extra_atom(idir) - offset(idir)), idir = 1, space%dim)
963 write(iunit, '()')
964
967
968
969#if defined(HAVE_NETCDF)
970 ! ---------------------------------------------------------
971 subroutine ncdf_error(func, status, filename, namespace, ierr)
972 character(len=*), intent(in) :: func
973 integer, intent(in) :: status
974 character(len=*), intent(in) :: filename
975 type(namespace_t), intent(in) :: namespace
976 integer, intent(inout) :: ierr
977
978 push_sub(ncdf_error)
979
980 if (status == nf90_noerr) then
981 pop_sub(ncdf_error)
982 return
983 end if
984
985 write(message(1),'(3a)') "NETCDF error in function '" , trim(func) , "'"
986 write(message(2),'(3a)') "(reading/writing ", trim(filename) , ")"
987 write(message(3), '(6x,a,a)')'Error code = ', trim(nf90_strerror(status))
988 call messages_warning(3, namespace=namespace)
989 ierr = 5
990
991 pop_sub(ncdf_error)
992 end subroutine ncdf_error
993#endif
994
995 ! ---------------------------------------------------------
996 subroutine transpose3(in, out)
997 real(real64), intent(in) :: in(:, :, :)
998 real(real64), intent(out) :: out(:, :, :)
999 integer :: ix, iy, iz
1000
1001 push_sub(transpose3)
1002
1003 do ix = lbound(in, 1), ubound(in, 1)
1004 do iy = lbound(in, 2), ubound(in, 2)
1005 do iz = lbound(in, 3), ubound(in, 3)
1006 out(iz, iy, ix) = in(ix, iy, iz)
1007 end do
1008 end do
1009 end do
1010
1011 pop_sub(transpose3)
1012 end subroutine transpose3
1013
1014#include "undef.F90"
1015#include "real.F90"
1016#include "io_function_inc.F90"
1017
1018#include "undef.F90"
1019#include "complex.F90"
1020#include "io_function_inc.F90"
1021#include "undef.F90"
1022
1023end module io_function_oct_m
1024
1025!! Local Variables:
1026!! mode: f90
1027!! coding: utf-8
1028!! End:
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
Definition: fft.F90:118
real(real64), parameter, public m_two
Definition: global.F90:189
real(real64), parameter, public m_zero
Definition: global.F90:187
real(real64), parameter, public m_half
Definition: global.F90:193
This module implements the index, used for the mesh points.
Definition: index.F90:122
subroutine zio_function_output_vector_bz(how, dir, fname, namespace, space, kpt, kpoints, ff, unit, ierr, grp, root)
subroutine, public write_canonicalized_xyz_file(dir, fname, space, latt, pos, atoms, box, namespace)
Write canonicalized xyz file with atom labels and positions in Angstroms. Includes information about ...
subroutine, public zio_function_output(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
Top-level IO routine for functions defined on the mesh.
subroutine, public dio_function_output_global(how, dir, fname, namespace, space, mesh, ff, unit, ierr)
subroutine, public io_function_read_what_how_when(namespace, space, what, how, output_interval, what_tag_in, how_tag_in, output_interval_tag_in, ignore_error)
subroutine, public zio_function_input(filename, namespace, space, mesh, ff, ierr, map)
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed,...
subroutine, public write_xsf_geometry(iunit, space, latt, pos, atoms, mesh, forces, index)
for format specification see: http:
subroutine zio_function_output_vector(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
subroutine write_xsf_geometry_supercell(iunit, space, latt, pos, atoms, mesh, centers, supercell, extra_atom)
for format specification see: http:
subroutine dio_function_output_supercell(how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, grp, root, is_global, extra_atom)
subroutine, public dio_function_output(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
Top-level IO routine for functions defined on the mesh.
subroutine dio_function_output_vector(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
subroutine transpose3(in, out)
subroutine zio_function_output_supercell(how, dir, fname, mesh, space, latt, ff, centers, supercell, unit, ierr, namespace, pos, atoms, grp, root, is_global, extra_atom)
subroutine, public write_xsf_geometry_file(dir, fname, space, latt, pos, atoms, mesh, namespace, total_forces)
subroutine, public dout_cf_netcdf(filename, ierr, cf, cube, space, spacing, transpose, unit, namespace)
Writes a cube_function in netcdf format.
subroutine dio_function_output_global_bz(how, dir, fname, namespace, kpoints, ff, unit, ierr)
subroutine ncdf_error(func, status, filename, namespace, ierr)
integer, parameter, private zoutput_kind
subroutine, public zio_function_output_global(how, dir, fname, namespace, space, mesh, ff, unit, ierr)
subroutine, public zout_cf_netcdf(filename, ierr, cf, cube, space, spacing, transpose, unit, namespace)
Writes a cube_function in netcdf format.
subroutine dio_function_output_vector_bz(how, dir, fname, namespace, space, kpt, kpoints, ff, unit, ierr, grp, root)
integer(int64) function, public io_function_fill_how(where)
Use this function to quickly plot functions for debugging purposes: call dio_function_output(io_funct...
subroutine, public dio_function_input(filename, namespace, space, mesh, ff, ierr, map)
Reads a mesh function from file filename, and puts it into ff. If the map argument is passed,...
subroutine zio_function_output_global_bz(how, dir, fname, namespace, kpoints, ff, unit, ierr)
Definition: io.F90:114
subroutine, public io_close(iunit, grp)
Definition: io.F90:468
subroutine, public io_mkdir(fname, namespace, parents)
Definition: io.F90:354
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
Definition: io.F90:395
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
subroutine, public messages_variable_is_block(namespace, name)
Definition: messages.F90:1081
subroutine, public messages_warning(no_lines, all_nodes, namespace)
Definition: messages.F90:543
subroutine, public messages_obsolete_variable(namespace, name, rep)
Definition: messages.F90:1057
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
Definition: messages.F90:160
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
Definition: messages.F90:420
subroutine, public messages_input_error(namespace, var, details, row, column)
Definition: messages.F90:723
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
Definition: mpi.F90:430
type(mpi_grp_t), public mpi_world
Definition: mpi.F90:266
Some general things and nomenclature:
Definition: par_vec.F90:171
integer function, public parse_block(namespace, name, blk, check_varinfo_)
Definition: parser.F90:618
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:132
This module defines the unit system, used for input and output.
type(unit_t), public unit_angstrom
For XYZ files.
type(unit_system_t), public units_out
This module is intended to contain simple general-purpose utility functions and procedures.
Definition: utils.F90:118
class to tell whether a point is inside or outside
Definition: box.F90:141
Describes mesh distribution to nodes.
Definition: mesh.F90:186
int true(void)