-
Notifications
You must be signed in to change notification settings - Fork 3
/
write_kpoints.f90
36 lines (27 loc) · 1.02 KB
/
write_kpoints.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "alias.inc"
subroutine write_unfold_kpoint(PINPT, PGEOM)
use mpi_setup
use print_io
use mykind
use parameters, only: incar, poscar, pid_kpts
implicit none
type(incar ) :: PINPT
type(poscar ) :: PGEOM
character(len=256) kfilenm
integer(kind=sp) ik
if(myid .ne. 0) return
write(kfilenm, '(A)') trim(PINPT%folder_out)//'KPOINTS_SC'
write(message,'(A)')' ' ; write_msgi
write(message,'(A)')'#- WRITING KPOINTS (SC) FILE: ' ; write_msgi
open(pid_kpts, file=trim(kfilenm), status='unknown')
write(pid_kpts, '(A )')'# Supercell BZ KPOINTS generated by VASP-BAUM'
write(pid_kpts, '(I6)') PGEOM%nkpts
write(pid_kpts, '(A)' )' Reciprocal'
do ik = 1, PGEOM%nkpts
write(pid_kpts,'(4F12.8)') PGEOM%kpts(:,ik), 1.0d0
enddo
close(pid_kpts)
write(message,'(A)')' --> '//trim(kfilenm) ; write_msgi
write(message,'(A)')' Note: Copy KPOINTS_SC into KPOINTS for the VASP run' ; write_msgi
return
endsubroutine