21#include "./base/base_uses.f90"
29 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_realspace_grid_cube'
44 SUBROUTINE cp_pw_to_cube(pw, unit_nr, title, particles, stride, zero_tails, silent, mpi_io)
46 INTEGER,
INTENT(IN) :: unit_nr
47 CHARACTER(*),
INTENT(IN),
OPTIONAL :: title
49 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: stride
50 LOGICAL,
INTENT(IN),
OPTIONAL :: zero_tails, silent, mpi_io
53 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: particles_z
54 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: particles_r
57 NULLIFY (my_particles)
58 my_particles => particles
59 IF (
ASSOCIATED(my_particles))
THEN
60 n = my_particles%n_els
61 ALLOCATE (particles_z(n))
62 ALLOCATE (particles_r(3, n))
65 particles_r(:, i) = my_particles%els(i)%r(:)
68 CALL pw_to_cube(pw=pw, unit_nr=unit_nr, title=title, &
69 particles_z=particles_z, particles_r=particles_r, &
70 stride=stride, zero_tails=zero_tails, &
71 silent=silent, mpi_io=mpi_io)
73 CALL pw_to_cube(pw=pw, unit_nr=unit_nr, title=title, &
74 stride=stride, zero_tails=zero_tails, &
75 silent=silent, mpi_io=mpi_io)
91 INTEGER,
INTENT(IN) :: unit_nr
92 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: stride
95 IF (.NOT.
PRESENT(pw2))
THEN
114 CHARACTER(len=*),
INTENT(in) :: filename
115 REAL(kind=
dp),
INTENT(in) :: scaling
116 LOGICAL,
INTENT(in),
OPTIONAL :: silent
118 LOGICAL :: parallel_read
121 parallel_read = .true.
125 IF (grid%pw_grid%para%group%num_pe == 1) parallel_read = .false.
129 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_pw_to_cube(pw, unit_nr, title, particles, stride, zero_tails, silent, mpi_io)
...
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.
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, stride, zero_tails, silent, mpi_io)
...
represent a list of objects