21#include "./base/base_uses.f90"
29 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_realspace_grid_cube'
46 SUBROUTINE cp_pw_to_cube(pw, unit_nr, title, particles, zeff, stride, max_file_size_mb, &
47 zero_tails, silent, mpi_io)
49 INTEGER,
INTENT(IN) :: unit_nr
50 CHARACTER(*),
INTENT(IN),
OPTIONAL :: title
52 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL :: zeff
53 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: stride
54 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: max_file_size_mb
55 LOGICAL,
INTENT(IN),
OPTIONAL :: zero_tails, silent, mpi_io
58 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: particles_z
59 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: particles_r
62 NULLIFY (my_particles)
63 my_particles => particles
64 IF (
ASSOCIATED(my_particles))
THEN
65 n = my_particles%n_els
66 ALLOCATE (particles_z(n))
67 ALLOCATE (particles_r(3, n))
70 particles_r(:, i) = my_particles%els(i)%r(:)
73 CALL pw_to_cube(pw=pw, unit_nr=unit_nr, title=title, &
74 particles_z=particles_z, particles_r=particles_r, &
75 particles_zeff=zeff, &
76 stride=stride, max_file_size_mb=max_file_size_mb, &
77 zero_tails=zero_tails, silent=silent, mpi_io=mpi_io)
79 CALL pw_to_cube(pw=pw, unit_nr=unit_nr, title=title, &
80 stride=stride, max_file_size_mb=max_file_size_mb, &
81 zero_tails=zero_tails, silent=silent, mpi_io=mpi_io)
97 INTEGER,
INTENT(IN) :: unit_nr
98 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: stride
101 IF (.NOT.
PRESENT(pw2))
THEN
120 CHARACTER(len=*),
INTENT(in) :: filename
121 REAL(kind=
dp),
INTENT(in) :: scaling
122 LOGICAL,
INTENT(in),
OPTIONAL :: silent
124 LOGICAL :: parallel_read
127 parallel_read = .true.
131 IF (grid%pw_grid%para%group%num_pe == 1) parallel_read = .false.
135 CALL cube_to_pw(grid, filename, scaling, parallel_read, silent=silent)
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
logical function, public cp_mpi_io_get()
Gets flag which determines whether or not to use MPI I/O for I/O routines that have been parallized w...
A wrapper around pw_to_cube() which accepts particle_list_type.
subroutine, public cp_cube_to_pw(grid, filename, scaling, silent)
Thin wrapper around routine cube_to_pw.
subroutine, public cp_pw_to_simple_volumetric(pw, unit_nr, stride, pw2)
Prints grid in a simple format: X Y Z value.
subroutine, public cp_pw_to_cube(pw, unit_nr, title, particles, zeff, stride, max_file_size_mb, zero_tails, silent, mpi_io)
...
Defines the basic variable types.
integer, parameter, public dp
represent a simple array based list of the given type
Generate Gaussian cube files.
subroutine, public cube_to_pw(grid, filename, scaling, parallel_read, silent)
Computes the external density on the grid hacked from external_read_density.
subroutine, public pw_to_simple_volumetric(pw, unit_nr, stride, pw2)
Prints a simple grid file: X Y Z value.
subroutine, public pw_to_cube(pw, unit_nr, title, particles_r, particles_z, particles_zeff, stride, max_file_size_mb, zero_tails, silent, mpi_io)
...
represent a list of objects