36 use,
intrinsic :: iso_fortran_env
86 integer :: ldos_nenergies = -1
87 real(real64),
allocatable :: ldos_energies(:)
89 integer(int64) :: method
98 subroutine dos_init(this, namespace, st, kpoints)
99 type(dos_t),
intent(out) :: this
100 type(namespace_t),
intent(in) :: namespace
101 type(states_elec_t),
intent(in) :: st
102 type(kpoints_t),
intent(in) :: kpoints
104 real(real64) :: evalmin, evalmax, eextend
112 npath = kpoints%nkpt_in_path()
113 if (st%nik > npath)
then
114 evalmin = minval(st%eigenval(1:st%nst, 1:(st%nik-npath)))
115 evalmax = maxval(st%eigenval(1:st%nst, 1:(st%nik-npath)))
117 evalmin = minval(st%eigenval(1:st%nst, 1:st%nik))
118 evalmax = maxval(st%eigenval(1:st%nst, 1:st%nik))
121 eextend = (evalmax - evalmin) /
m_four
138 call parse_variable(namespace,
'DOSMethod', option__dosmethod__smear, this%method)
192 call parse_variable(namespace,
'DOSEnergyPoints', 500, this%epoints)
201 call parse_variable(namespace,
'DOSGamma', 0.008_real64, this%gamma)
207 this%de = (this%emax - this%emin) / (this%epoints - 1)
219 safe_allocate(this%ldos_energies(1:this%ldos_nenergies))
220 do ie = 1, this%ldos_nenergies
225 this%ldos_nenergies = -1
233 type(
dos_t),
intent(inout) :: this
237 safe_deallocate_a(this%ldos_energies)
238 this%ldos_nenergies = -1
245 subroutine dos_write_dos(this, dir, st, box, ions, mesh, hm, namespace)
246 type(
dos_t),
intent(in) :: this
247 character(len=*),
intent(in) :: dir
249 class(
box_t),
intent(in) :: box
250 type(
ions_t),
target,
intent(in) :: ions
251 class(
mesh_t),
intent(in) :: mesh
255 integer :: ie, ik, ist, is, ns, maxdos, nvertices
256 integer,
allocatable :: iunit(:)
257 real(real64) :: energy
258 real(real64),
allocatable :: tdos(:)
259 real(real64),
allocatable :: dos(:,:,:)
260 character(len=64) :: filename
266 real(real64) :: e_simplex(20)
267 real(real64),
allocatable :: energies(:), dos_simplex_batch(:,:), dos_thread(:,:)
273 if (st%d%nspin == 2) ns = 2
276 smear%method = this%smear_func
279 if (st%system_grp%is_root())
then
281 safe_allocate(dos(1:this%epoints, 1:st%nst, 0:ns-1))
283 safe_allocate(iunit(0:ns-1))
290 write(filename,
'(a,i5.5,a,i1.1,a)')
'dos-', ist,
'-', is+1,
'.dat'
292 write(filename,
'(a,i5.5,a)')
'dos-', ist,
'.dat'
294 iunit(is) =
io_open(trim(dir)//
'/'//trim(filename), namespace, action=
'write')
299 select case (this%method)
300 case (option__dosmethod__smear)
301 do ie = 1, this%epoints
302 energy = this%emin + (ie - 1) * this%de
304 do ik = 1, st%nik, ns
306 dos(ie, ist, is) = dos(ie, ist, is) + st%kweights(ik+is) / this%gamma * &
312 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
313 assert(
associated(hm%kpoints%reduced%simplex))
314 simplex => hm%kpoints%reduced%simplex
315 nvertices = simplex%rdim + 1
316 assert(nvertices <= 4)
318 safe_allocate(energies(1:this%epoints))
319 do ie = 1, this%epoints
320 energies(ie) = this%emin + (ie - 1) * this%de
323 safe_allocate(dos_simplex_batch(1:nvertices, 1:this%epoints))
324 safe_allocate(dos_thread(1:this%epoints, 0:ns-1))
327 do ii = 1, simplex%n_simplices
329 do ll = 1, simplex%sdim
330 ik = simplex%simplices(ii, ll)
331 ik = ns * (ik - 1) + 1
332 e_simplex(ll) = st%eigenval(ist, ik+is)
335 call simplex_dos(simplex%rdim, e_simplex(1:simplex%sdim), energies, dos_simplex_batch)
337 do ie = 1, this%epoints
338 dos_thread(ie, is) = dos_thread(ie, is) + sum(dos_simplex_batch(1:nvertices, ie)) / simplex%n_points
344 dos(:, ist, :) = dos(:, ist, :) + dos_thread
346 safe_deallocate_a(dos_thread)
347 safe_deallocate_a(dos_simplex_batch)
349 safe_deallocate_a(energies)
356 do ie = 1, this%epoints
357 energy = this%emin + (ie - 1) * this%de
370 safe_allocate(tdos(1))
375 write(filename,
'(a,i1.1,a)')
'total-dos-', is+1,
'.dat'
376 iunit(is) =
io_open(trim(dir)//
'/'//trim(filename), namespace, action=
'write')
378 write(iunit(is),
'(3a)')
'# energy [', trim(
units_abbrev(
units_out%energy)),
'], total DOS (spin-resolved)'
380 do ie = 1, this%epoints
381 energy = this%emin + (ie - 1) * this%de
384 tdos(1) = tdos(1) + dos(ie, ist, is)
396 iunit(0) =
io_open(trim(dir)//
'/'//
'total-dos.dat', namespace, action=
'write')
400 do ie = 1, this%epoints
401 energy = this%emin + (ie - 1) * this%de
405 tdos(1) = tdos(1) + dos(ie, ist, is)
415 safe_deallocate_a(tdos)
419 iunit(0) =
io_open(trim(dir)//
'/'//
'total-dos-efermi.dat', namespace, action=
'write')
421 '] in a format compatible with total-dos.dat'
424 maxdos = st%smear%el_per_state * st%nst
435 safe_deallocate_a(iunit)
436 safe_deallocate_a(dos)
443 subroutine dos_write_pdos(this, dir, st, box, ions, mesh, hm, namespace)
444 type(
dos_t),
intent(in) :: this
445 character(len=*),
intent(in) :: dir
447 class(
box_t),
intent(in) :: box
448 type(
ions_t),
target,
intent(in) :: ions
449 class(
mesh_t),
intent(in) :: mesh
453 integer :: ie, ik, ist, is, ns, ib, ind, nvertices
455 real(real64) :: energy, threshold
456 character(len=64) :: filename, format_str
459 integer :: ii, ll, mm, nn, work, norb, work2
460 integer :: ia, iorb, idim
461 real(real64),
allocatable :: ddot(:,:,:)
462 complex(real64),
allocatable :: zdot(:,:,:)
463 real(real64),
allocatable :: weight(:,:,:)
469 real(real64) :: e_simplex(20), a_simplex(4)
470 real(real64),
allocatable :: energies(:), dos_simplex_batch(:,:), pdos(:,:), pdos_thread(:,:)
476 if (st%d%nspin == 2) ns = 2
479 smear%method = this%smear_func
483 call parse_variable(namespace,
'AOThreshold', 0.01_real64, threshold)
486 do ia = 1, ions%natoms
493 os%spec => ions%atom(ia)%species
497 do iorb = 1, os%spec%get_niwfs()
498 call os%spec%get_iwf_ilm(iorb, 1, ii, ll, mm)
499 call os%spec%get_iwf_n(iorb, 1, nn)
505 option__aotruncation__ao_full, threshold)
511 os%use_submesh = .false.
512 os%allocated_on_mesh = .
true.
513 os%spec => ions%atom(ia)%species
515 do work = 1, os%norbs
519 ions%atom(ia)%species, mesh, os%sphere, os%ii, os%ll, os%jj, &
520 os, work, os%radius, os%ndim, use_mesh=.not.os%use_submesh, &
521 normalize = normalize)
524 ions%atom(ia)%species, mesh, os%sphere, os%ii, os%ll, os%jj, &
525 os, work, os%radius, os%ndim, &
526 use_mesh = .not. hm%phase%is_allocated() .and. .not. os%use_submesh, &
527 normalize = normalize)
531 if (hm%phase%is_allocated())
then
533 safe_allocate(os%phase(1:os%sphere%np, st%d%kpt%start:st%d%kpt%end))
536 if (.not. os%use_submesh)
then
537 safe_allocate(os%eorb_mesh(1:mesh%np, 1:os%norbs, 1:os%ndim, st%d%kpt%start:st%d%kpt%end))
540 safe_allocate(os%eorb_submesh(1:os%sphere%np, 1:os%ndim, 1:os%norbs, st%d%kpt%start:st%d%kpt%end))
541 os%eorb_submesh(:,:,:,:) =
m_zero
545 os%ldorbs_eorb = max(
pad_pow2(os%sphere%np), 1)
546 if(.not. os%use_submesh) os%ldorbs_eorb = max(
pad_pow2(os%sphere%mesh%np), 1)
548 safe_allocate(os%buff_eorb(st%d%kpt%start:st%d%kpt%end))
549 do ik= st%d%kpt%start, st%d%kpt%end
555 vec_pot = hm%hm_base%uniform_vector_potential, &
556 vec_pot_var = hm%hm_base%vector_potential)
565 if (st%system_grp%is_root())
then
567 write(filename,
'(a, i4.4, a1, a, i1.1, a1,a)')
'pdos-at', ia,
'-', trim(os%spec%get_label()), &
570 write(filename,
'(a, i4.4, a1, a, a1,a)')
'pdos-at', ia,
'-', trim(os%spec%get_label()), &
574 iunit =
io_open(trim(dir)//
'/'//trim(filename), namespace, action=
'write')
577 '], projected DOS (total and orbital resolved)'
581 safe_allocate(ddot(1:st%d%dim, 1:os%norbs, 1:st%block_size))
583 safe_allocate(zdot(1:st%d%dim, 1:os%norbs, 1:st%block_size))
586 safe_allocate(weight(1:os%norbs,1:st%nik,1:st%nst))
587 weight(1:os%norbs,1:st%nik,1:st%nst) =
m_zero
589 do ik = st%d%kpt%start, st%d%kpt%end
590 do ib = st%group%block_start, st%group%block_end
592 if (hm%phase%is_allocated())
then
594 call st%group%psib(ib, ik)%copy_to(epsib)
595 call hm%phase%apply_to(mesh, mesh%np, .false., epsib, src = st%group%psib(ib, ik))
597 epsib => st%group%psib(ib, ik)
602 do ist = 1, st%group%psib(ib, ik)%nst
603 ind = st%group%psib(ib, ik)%ist(ist)
604 do iorb = 1, os%norbs
605 do idim = 1, st%d%dim
606 weight(iorb, ik, ind) = weight(iorb, ik, ind) + st%kweights(ik) * abs(ddot(idim, iorb, ist))**2
612 do ist = 1, st%group%psib(ib, ik)%nst
613 ind = st%group%psib(ib, ik)%ist(ist)
614 do iorb = 1, os%norbs
615 do idim = 1, st%d%dim
616 weight(iorb, ik, ind) = weight(iorb, ik, ind) + st%kweights(ik) * abs(zdot(idim, iorb, ist))**2
622 if (hm%phase%is_allocated())
then
623 call epsib%end(copy=.false.)
624 safe_deallocate_p(epsib)
630 if (st%parallel_in_states .or. st%d%kpt%parallel)
then
634 safe_deallocate_a(ddot)
635 safe_deallocate_a(zdot)
637 if (st%system_grp%is_root())
then
638 write(format_str,
'(a,i5,a)')
'(', os%norbs+2,
'es25.16E3)'
639 safe_allocate(pdos(1:os%norbs, 1:this%epoints))
641 select case (this%method)
642 case (option__dosmethod__smear)
643 do iorb = 1, os%norbs
646 do ie = 1, this%epoints
647 energy = this%emin + (ie - 1) * this%de
648 pdos(iorb, ie) = pdos(iorb, ie) + weight(iorb,ik,ist) / this%gamma * &
654 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
655 assert(
associated(hm%kpoints%reduced%simplex))
656 simplex => hm%kpoints%reduced%simplex
657 nvertices = simplex%rdim + 1
658 assert(nvertices <= 4)
659 safe_allocate(energies(1:this%epoints))
660 do ie = 1, this%epoints
661 energies(ie) = this%emin + (ie - 1) * this%de
665 safe_allocate(dos_simplex_batch(1:nvertices, 1:this%epoints))
666 safe_allocate(pdos_thread(1:os%norbs, 1:this%epoints))
670 do ii = 1, simplex%n_simplices
672 do ll = 1, simplex%sdim
673 ik = simplex%simplices(ii, ll)
674 ik = ns * (ik - 1) + 1
675 e_simplex(ll) = st%eigenval(ist, ik+is)
677 call simplex_dos(simplex%rdim, e_simplex(1:simplex%sdim), energies, dos_simplex_batch)
678 do iorb = 1, os%norbs
680 ik = simplex%simplices(ii, ll)
681 ik = ns * (ik - 1) + 1
683 a_simplex(ll) = weight(iorb, ik+is, ist) / st%kweights(ik+is)
688 do ie = 1, this%epoints
689 pdos_thread(iorb, ie) = pdos_thread(iorb, ie) + &
690 sum(a_simplex(1:nvertices) * dos_simplex_batch(1:nvertices, ie)) / simplex%n_points
698 pdos(:,:) = pdos(:,:) + pdos_thread(:,:)
700 safe_deallocate_a(pdos_thread)
701 safe_deallocate_a(dos_simplex_batch)
704 safe_deallocate_a(energies)
708 do ie = 1, this%epoints
709 energy = this%emin + (ie - 1) * this%de
714 safe_deallocate_a(pdos)
719 safe_deallocate_a(weight)
731 type(
dos_t),
intent(in) :: this
732 character(len=*),
intent(in) :: dir
734 type(
ions_t),
target,
intent(in) :: ions
738 integer :: ie, ik, val, cond, is, ns, ll, ii, nvertices
739 integer,
allocatable :: iunit(:)
740 real(real64) :: energy
741 real(real64) :: tjdos(1), e_simplex(20), occ_simplex(4)
742 real(real64),
allocatable :: jdos(:,:), energies(:), dos_simplex(:,:)
743 character(len=64) :: filename
752 if (st%d%nspin == 2) ns = 2
755 smear%method = this%smear_func
758 if (st%system_grp%is_root())
then
760 safe_allocate(jdos(1:this%epoints, 0:ns-1))
761 safe_allocate(iunit(0:ns-1))
764 select case (this%method)
765 case (option__dosmethod__smear)
768 do cond = val, st%nst
769 do ik = 1, st%nik, ns
772 if(st%occ(cond, ik+is) >
m_epsilon) cycle
773 do ie = 1, this%epoints
774 energy = (ie - 1) * this%de
776 jdos(ie, is) = jdos(ie, is) + st%kweights(ik+is) / this%gamma * &
777 smear_delta_function(smear, (energy - (st%eigenval(cond, ik+is)-st%eigenval(val, ik+is)))/this%gamma)
783 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
784 assert(
associated(hm%kpoints%reduced%simplex))
785 simplex => hm%kpoints%reduced%simplex
786 nvertices = simplex%rdim + 1
787 assert(nvertices <= 4)
789 safe_allocate(energies(1:this%epoints))
790 do ie = 1, this%epoints
791 energies(ie) = (ie - 1) * this%de
795 safe_allocate(dos_simplex(1:nvertices, 1:this%epoints))
799 do ii = 1, simplex%n_simplices
800 if (cond < val) cycle
802 do ll = 1, simplex%sdim
803 ik = simplex%simplices(ii, ll)
804 ik = ns * (ik - 1) + 1
805 e_simplex(ll) = st%eigenval(cond, ik+is) - st%eigenval(val, ik+is)
809 ik = simplex%simplices(ii, ll)
810 ik = ns * (ik - 1) + 1
812 occ_simplex(ll) =
m_one
819 if (all(transfer(occ_simplex(1:nvertices), [0_int64]) == 0_int64)) cycle
821 call simplex_dos(simplex%rdim, e_simplex(1:simplex%sdim), energies, dos_simplex)
822 do ie = 1, this%epoints
823 jdos(ie, is) = jdos(ie, is) + sum(occ_simplex(1:nvertices) * dos_simplex(1:nvertices, ie)) / &
831 safe_deallocate_a(dos_simplex)
833 safe_deallocate_a(energies)
840 if (st%d%nspin > 1)
then
842 write(filename,
'(a,i1.1,a)')
'total-jdos-', is+1,
'.dat'
843 iunit(is) =
io_open(trim(dir)//
'/'//trim(filename), namespace, action=
'write')
845 write(iunit(is),
'(3a)')
'# energy [', trim(
units_abbrev(
units_out%energy)),
'], total JDOS (spin-resolved)'
847 do ie = 1, this%epoints
848 energy = (ie - 1) * this%de
859 iunit(0) =
io_open(trim(dir)//
'/'//
'total-jdos.dat', namespace, action=
'write')
863 do ie = 1, this%epoints
864 energy = (ie - 1) * this%de
867 tjdos(1) = tjdos(1) + jdos(ie, is)
877 safe_deallocate_a(iunit)
878 safe_deallocate_a(jdos)
886 subroutine dos_write_ldos(this, dir, st, ions, gr, hm, how, namespace)
887 type(
dos_t),
intent(in) :: this
888 character(len=*),
intent(in) :: dir
890 type(
ions_t),
target,
intent(in) :: ions
891 type(
grid_t),
intent(in) :: gr
893 integer(int64),
intent(in) :: how
896 integer :: ie, ik, ist, is, ns, ip, ifull, ierr, ii, ll, nvertices, ikpoint
897 integer :: iop, iiop, nops, nops_max
898 character(len=MAX_PATH_LEN) :: fname, name
899 logical :: has_local_corner
900 real(real64) :: weight, e_simplex(20)
901 real(real64),
allocatable :: ldos(:,:,:), dpsi(:,:), abs_psi2(:), abs_psi2_symm(:), ldos_weights(:,:,:)
902 real(real64),
allocatable :: dos_simplex(:,:)
903 complex(real64),
allocatable :: zpsi(:,:)
911 if (this%ldos_nenergies < 1)
then
912 message(1) =
"LDOSEnergies must be defined for Output=ldos"
918 if (st%d%nspin == 2) ns = 2
921 smear%method = this%smear_func
927 safe_allocate(ldos(1:gr%np, 1:this%ldos_nenergies, 1:ns))
930 safe_allocate(abs_psi2(1:gr%np))
932 safe_allocate(dpsi(1:gr%np, 1:st%d%dim))
934 safe_allocate(zpsi(1:gr%np, 1:st%d%dim))
937 select case (this%method)
938 case (option__dosmethod__smear)
940 safe_allocate(ldos_weights(1:this%ldos_nenergies, st%d%kpt%start:st%d%kpt%end, 1:nops_max))
941 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
942 assert(
associated(hm%kpoints%full%simplex))
943 simplex => hm%kpoints%full%simplex
944 nvertices = simplex%rdim + 1
945 assert(nvertices <= 4)
947 do ifull = 1, hm%kpoints%full%npoints
948 nops_max = max(nops_max, hm%kpoints%get_full_symmetry_op_index(ifull))
950 safe_allocate(ldos_weights(1:this%ldos_nenergies, st%d%kpt%start:st%d%kpt%end, 1:nops_max))
951 safe_allocate(abs_psi2_symm(1:gr%np))
956 do ist = st%st_start, st%st_end
957 ldos_weights(:, :, :) =
m_zero
959 select case (this%method)
960 case (option__dosmethod__smear)
961 do ik = st%d%kpt%start, st%d%kpt%end
962 do ie = 1, this%ldos_nenergies
963 ldos_weights(ie, ik, 1) = st%kweights(ik) / this%gamma * &
967 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
971 safe_allocate(dos_simplex(1:nvertices, 1:this%ldos_nenergies))
973 do ii = 1, simplex%n_simplices
975 has_local_corner = .false.
976 do ll = 1, simplex%sdim
977 ik = hm%kpoints%get_equiv(simplex%simplices(ii, ll))
978 ik = ns * (ik - 1) + 1 + is
979 e_simplex(ll) = st%eigenval(ist, ik)
980 if (ik >= st%d%kpt%start .and. ik <= st%d%kpt%end) has_local_corner = .
true.
982 if (.not. has_local_corner) cycle
984 call simplex_dos(simplex%rdim, e_simplex(1:simplex%sdim), this%ldos_energies, &
985 dos_simplex(1:nvertices, 1:this%ldos_nenergies))
986 do ie = 1, this%ldos_nenergies
988 ifull = simplex%simplices(ii, ll)
989 iiop = hm%kpoints%get_full_symmetry_op_index(ifull)
990 ik = hm%kpoints%get_equiv(ifull)
991 ik = ns * (ik - 1) + 1 + is
992 if (ik >= st%d%kpt%start .and. ik <= st%d%kpt%end)
then
993 ldos_weights(ie, ik, iiop) = ldos_weights(ie, ik, iiop) + dos_simplex(ll, ie) / simplex%n_points
1000 safe_deallocate_a(dos_simplex)
1007 do ik = st%d%kpt%start, st%d%kpt%end
1008 is = st%d%get_spin_index(ik)
1013 abs_psi2(ip) = dpsi(ip, 1)**2
1015 if (st%d%dim > 1)
then
1017 abs_psi2(ip) = abs_psi2(ip) + dpsi(ip, 2)**2
1023 abs_psi2(ip) = real(conjg(zpsi(ip, 1)) * zpsi(ip, 1), real64)
1025 if (st%d%dim > 1)
then
1027 abs_psi2(ip) = abs_psi2(ip) + real(conjg(zpsi(ip, 2)) * zpsi(ip, 2), real64)
1032 select case (this%method)
1033 case (option__dosmethod__smear)
1034 do ie = 1, this%ldos_nenergies
1035 weight = ldos_weights(ie, ik, 1)
1036 call lalg_axpy(gr%np, weight, abs_psi2, ldos(:, ie, is))
1038 case (option__dosmethod__tetrahedra, option__dosmethod__tetrahedra_opt)
1039 ikpoint = st%d%get_kpoint_index(ik)
1044 do ie = 1, this%ldos_nenergies
1045 weight = ldos_weights(ie, ik, iiop)
1046 call lalg_axpy(gr%np, weight, abs_psi2_symm, ldos(:, ie, is))
1055 safe_deallocate_a(ldos_weights)
1056 safe_deallocate_a(dpsi)
1057 safe_deallocate_a(zpsi)
1058 safe_deallocate_a(abs_psi2)
1059 safe_deallocate_a(abs_psi2_symm)
1061 if (st%parallel_in_states .or. st%d%kpt%parallel)
then
1066 do ie = 1, this%ldos_nenergies
1067 write(name,
'(a,i5.5)')
'ldos_en-', ie
1070 if (hm%kpoints%use_symmetries .and. &
1071 .not. (this%method == option__dosmethod__tetrahedra .or. this%method == option__dosmethod__tetrahedra_opt))
then
1075 ldos(:, ie, is), fn_unit, ierr, pos=ions%pos, atoms=ions%atom, grp = st%dom_st_kpt_mpi_grp)
1079 safe_deallocate_a(ldos)
constant times a vector plus a vector
pure logical function, public accel_is_enabled()
integer, parameter, public accel_mem_read_only
subroutine, public zget_atomic_orbital(namespace, space, latt, pos, species, mesh, sm, ii, ll, jj, os, orbind, radius, d_dim, use_mesh, normalize, index_shift)
This routine returns the atomic orbital basis – provided by the pseudopotential structure in geo.
character(len=1), dimension(0:3), parameter, public l_notation
real(real64) function, public atomic_orbital_get_radius(species, mesh, iorb, ispin, truncation, threshold)
subroutine, public dget_atomic_orbital(namespace, space, latt, pos, species, mesh, sm, ii, ll, jj, os, orbind, radius, d_dim, use_mesh, normalize, index_shift)
This routine returns the atomic orbital basis – provided by the pseudopotential structure in geo.
Module that handles computing and output of various density of states.
subroutine, public dos_write_pdos(this, dir, st, box, ions, mesh, hm, namespace)
Computes and output the projected DOS (PDOS)
subroutine dos_end(this)
Finalizer for the dos_t object.
subroutine, public dos_write_dos(this, dir, st, box, ions, mesh, hm, namespace)
Computes and output the DOS and the projected DOS (PDOS)
subroutine, public dos_write_jdos(this, dir, st, ions, hm, namespace)
Computes and output the joint DOS (JDOS)
subroutine, public dos_init(this, namespace, st, kpoints)
Initializes the dot_t object.
subroutine, public dos_write_ldos(this, dir, st, ions, gr, hm, how, namespace)
Computes and output the local DOS (LDOS)
integer, parameter, public spin_polarized
real(real64), parameter, public m_zero
real(real64), parameter, public m_four
real(real64), parameter, public m_epsilon
real(real64), parameter, public m_one
This module implements the underlying real-space grid.
subroutine, public dgrid_symmetrize_single(gr, iop, field, symm_field, suppress_warning)
subroutine, public dgrid_symmetrize_scalar_field(gr, field, suppress_warning)
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, public io_close(iunit, grp)
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
integer pure function, public kpoints_get_num_symmetry_ops(this, ik)
integer pure function, public kpoints_get_symmetry_ops(this, ik, index)
This module is intended to contain "only mathematical" functions and procedures.
integer pure function, public pad_pow2(size)
create array size, which is padded to powers of 2
This module defines the meshes, which are used in Octopus.
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_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
type(namespace_t), public global_namespace
subroutine, public orbitalset_init(this)
subroutine, public orbitalset_end(this)
subroutine, public dorbitalset_transfer_to_device(os, kpt, use_mesh)
Allocate and transfer the orbitals to the device.
subroutine, public orbitalset_update_phase(os, dim, kpt, kpoints, spin_polarized, vec_pot, vec_pot_var, kpt_max)
Build the phase correction to the global phase in case the orbital crosses the border of the simulato...
subroutine, public dorbitalset_get_coeff_batch(os, ndim, psib, dot, reduce)
subroutine, public zorbitalset_get_coeff_batch(os, ndim, psib, dot, reduce)
subroutine, public zorbitalset_transfer_to_device(os, kpt, use_mesh)
Allocate and transfer the orbitals to the device.
integer function, public orbitalset_utils_count(species, iselect)
Count the number of orbital sets we have for a given atom.
this module contains the low-level part of the output system
character(len=max_path_len) function, public get_filename_with_spin(output, nspin, spin_index)
Returns the filame as output, or output-spX is spin polarized.
integer function, public parse_block(namespace, name, blk, check_varinfo_)
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
real(real64) function, public smear_delta_function(this, xx)
integer, parameter, public smear_fermi_dirac
integer, parameter, public smear_methfessel_paxton
integer, parameter, public smear_lorentzian
integer, parameter, public smear_spline
integer, parameter, public smear_cold
integer, parameter, public smear_gaussian
pure logical function, public states_are_real(st)
type(type_t), public type_cmplx
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_system_t), public units_inp
the units systems for reading and writing
type(unit_t), public unit_one
some special units required for particular quantities
class to tell whether a point is inside or outside
Description of the grid, containing information on derivatives, stencil, and symmetries.
Describes mesh distribution to nodes.
The states_elec_t class contains all electronic wave functions.
batches of electronic states