Commit 3d8d2338 authored by giannozz's avatar giannozz

Added interface with BerkeleyGW code, courtesy of Georgy Samsonidze


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8760 c92efa57-630b-4861-b058-cf58834340f0
parent 53578638
input_description -distribution {Quantum Espresso} -package PWscf -program bgw2pw.x {
toc {}
intro {
Converts BerkeleyGW WFN and RHO files to the format of pw.x.
This can be useful, for example, if you generate the plane waves
on top of the valence bands and want to diagonalize them in pw.x.
Look at the documentation for SAPO code in BerkeleyGW for more information.
bgw2pw.x reads common parameters from file prefix.save/data-file.xml and
writes files prefix.save/charge-density.dat (charge density in R-space),
prefix.save/gvectors.dat (G-vectors for charge density and potential),
prefix.save/K$n/eigenval.xml (eigenvalues and occupations for nth k-point),
prefix.save/K$n/evc.dat (wavefunctions in G-space for nth k-point), and
prefix.save/K$n/gkvectors.dat (G-vectors for nth k-point).
bgw2pw.x doesn't modify file prefix.save/data-file.xml so make changes to this
file manually (for example, you will need to change the number of bands if you
are using bgw2pw.x in conjunction with SAPO code in BerkeleyGW).
Structure of the input data:
============================
&INPUT_BGW2PW
...
/
}
namelist INPUT_BGW2PW {
var prefix -type STRING {
status { MANDATORY }
info {
prefix of files saved by program pw.x
}
}
var outdir -type STRING {
default { './' }
info {
the scratch directory where the massive data-files are written
}
}
var real_or_complex -type INTEGER {
default { 2 }
info {
1 | 2
1 for real flavor of BerkeleyGW (for systems with inversion symmetry and
time-reversal symmetry) or 2 for complex flavor of BerkeleyGW (for systems
without inversion symmetry and time-reversal symmetry)
}
}
var wfng_flag -type LOGICAL {
default { .FALSE. }
info {
read wavefunctions in G-space from BerkeleyGW WFN file
}
}
var wfng_file -type STRING {
default { 'WFN' }
info {
name of BerkeleyGW WFN input file. Not used if wfng_flag = .FALSE.
}
}
var wfng_nband -type INTEGER {
default { 0 }
info {
number of bands to write (0 = all). Not used if wfng_flag = .FALSE.
}
}
var rhog_flag -type LOGICAL {
default { .FALSE. }
info {
read charge density in G-space from BerkeleyGW RHO file
}
}
var rhog_file -type STRING {
default { 'RHO' }
info {
name of BerkeleyGW RHO input file. Not used if rhog_flag = .FALSE.
}
}
}
}
input_description -distribution {Quantum Espresso} -package PWscf -program pw2bgw.x {
toc {}
intro {
Converts the output files produced by pw.x to the input files for BerkeleyGW.
You cannot use USPP, PAW, or spinors in a pw.x run for BerkeleyGW.
You cannot use "K_POINTS gamma" in a pw.x run for BerkeleyGW.
Use "K_POINTS { tpiba | automatic | crystal }" even for the
Gamma-point calculation.
It is recommended to run a pw.x nscf calculation with "K_POINTS crystal"
and a list of k-points produced by kgrid.x, which is a part of BerkeleyGW
package (see BerkeleyGW documentation for details).
Sometimes pw.x adds more k-points when they are specified manually.
Always check if this is the case in the output. If this is the case
then there are several ways to go around this issue:
(1) You can apply the patch provided with BerkeleyGW. This will prevent
pw.x from producing more k-points if they are supplied manually.
(2) Do not supply atomic positions in the input file of kgrid.x (set
number of atoms = 0). Then pw.x will generate additional k-points
which are the correct ones. Do not forget to use noinv = .true. if
time-reversal symmetry is not used in the generation of k-points.
(3) You can do "bands" calculation instead of "nscf" but in this case
you have to explicitly specify occupations in the input file of
pw2bgw.x.
Choose the option that best fits your needs.
Structure of the input data:
============================
&INPUT_PW2BGW
...
/
}
namelist INPUT_PW2BGW {
var prefix -type STRING {
status { MANDATORY }
info {
prefix of files saved by program pw.x
}
}
var outdir -type STRING {
default { './' }
info {
the scratch directory where the massive data-files are written
}
}
var real_or_complex -type INTEGER {
default { 2 }
info {
1 | 2
1 for real flavor of BerkeleyGW (for systems with inversion symmetry and
time-reversal symmetry) or 2 for complex flavor of BerkeleyGW (for systems
without inversion symmetry and time-reversal symmetry)
}
}
var symm_type -type STRING {
default { 'cubic' }
info {
'cubic' | 'hexagonal'
type of crystal system, 'cubic' for space groups 1 ... 142 and 195 ... 230
and 'hexagonal' for space groups 143 ... 194. Only used if ibrav = 0 in a
pw.x run
}
}
var wfng_flag -type LOGICAL {
default { .FALSE. }
info {
write wavefunctions in G-space to BerkeleyGW WFN file
}
}
var wfng_file -type STRING {
default { 'WFN' }
info {
name of BerkeleyGW WFN output file. Not used if wfng_flag = .FALSE.
}
}
var wfng_kgrid -type LOGICAL {
default { .FALSE. }
info {
overwrite k-grid parameters in BerkeleyGW WFN file.
If pw.x input file contains the manual list of k-points,
the k-grid parameters in the output of pw.x will be set to zero.
Since sigma and absorption in BerkeleyGW both need to know the
k-grid dimensions, we patch these parameters into BerkeleyGW WFN file
}
}
var wfng_nk1 -type INTEGER {
default { 0 }
info {
number of k-points along b_1 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_nk2 -type INTEGER {
default { 0 }
info {
number of k-points along b_2 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_nk3 -type INTEGER {
default { 0 }
info {
number of k-points along b_3 reciprocal lattice vector.
Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk1 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_1 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk2 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_2 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_dk3 -type REAL {
default { 0.0 }
info {
k-grid offset (0.0 unshifted, 0.5 shifted by half a grid step)
along b_3 reciprocal lattice vector. Not used if wfng_kgrid = .FALSE.
}
}
var wfng_occupation -type LOGICAL {
default { .FALSE. }
info {
overwrite occupations in BerkeleyGW WFN file
}
}
var wfng_nvmin -type INTEGER {
default { 0 }
info {
index of the lowest occupied band (normally = 1).
Not used if wfng_occupation = .FALSE.
}
}
var wfng_nvmax -type INTEGER {
default { 0 }
info {
index of the highest occupied band (normally = number of occupied bands).
Not used if wfng_occupation = .FALSE.
}
}
var rhog_flag -type LOGICAL {
default { .FALSE. }
info {
write charge density in G-space to BerkeleyGW RHO file.
Only used for the GPP model in sigma code in BerkeleyGW
}
}
var rhog_file -type STRING {
default { 'RHO' }
info {
name of BerkeleyGW RHO output file. Only used for the GPP model in sigma
code in BerkeleyGW. Not used if rhog_flag = .FALSE.
}
}
var vxcg_flag -type LOGICAL {
default { .FALSE. }
info {
write local part of exchange-correlation potential in G-space to
BerkeleyGW VXC file. Only used in sigma code in BerkeleyGW, it is
recommended to use vxc_flag instead
}
}
var vxcg_file -type STRING {
default { 'VXC' }
info {
name of BerkeleyGW VXC output file. Only used in sigma code in BerkeleyGW,
it is recommended to use vxc_flag instead. Not used if vxcg_flag = .FALSE.
}
}
var vxc0_flag -type LOGICAL {
default { .FALSE. }
info {
write Vxc(G = 0) to text file. Only for testing, not required for BerkeleyGW
}
}
var vxc0_file -type STRING {
default { 'vxc0.dat' }
info {
name of output text file for Vxc(G = 0). Only for testing, not required for
BerkeleyGW. Not used if vxc0_flag = .FALSE.
}
}
var vxc_flag -type LOGICAL {
default { .FALSE. }
info {
write matrix elements of exchange-correlation potential to text file.
Only used in sigma code in BerkeleyGW
}
}
var vxc_file -type STRING {
default { 'vxc.dat' }
info {
name of output text file for Vxc matrix elements. Only used in sigma code
in BerkeleyGW. Not used if vxc_flag = .FALSE.
}
}
var vxc_integral -type STRING {
default { 'g' }
info {
'g' | 'r'
'g' to compute matrix elements of exchange-correlation potential in G-space.
'r' to compute matrix elements of the local part of exchange-correlation
potential in R-space. It is recommended to use 'g'. Not used if vxc_flag = .FALSE.
}
}
var vxc_diag_nmin -type INTEGER {
default { 0 }
info {
minimum band index for diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_diag_nmax -type INTEGER {
default { 0 }
info {
maximum band index for diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_offdiag_nmin -type INTEGER {
default { 0 }
info {
minimum band index for off-diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var vxc_offdiag_nmax -type INTEGER {
default { 0 }
info {
maximum band index for off-diagonal Vxc matrix elements. Not used if vxc_flag = .FALSE.
}
}
var input_dft -type STRING {
default { 'sla+pz' }
info {
exchange-correlation functional, same as in pw.x. Not used if vxcg_flag = .FALSE. and
vxc_flag = .FALSE.
}
}
var exx_flag -type LOGICAL {
default { .FALSE. }
info {
set to .TRUE. when using EXX. Not used if vxcg_flag = .FALSE. and vxc_flag = .FALSE.
}
}
var vnlg_flag -type LOGICAL {
default { .FALSE. }
info {
write Kleinman-Bylander projectors in G-space to BerkeleyGW VNL file.
Only used in SAPO code in BerkeleyGW
}
}
var vnlg_file -type STRING {
default { 'VNL' }
info {
name of BerkeleyGW VNL output file. Only used in SAPO code in BerkeleyGW.
Not used if vnlg_flag = .FALSE.
}
}
}
}
......@@ -5,7 +5,9 @@ HTMLS = INPUT_PP.html \
INPUT_PROJWFC.html \
INPUT_DOS.html \
INPUT_BANDS.html \
INPUT_pw_export.html
INPUT_pw_export.html \
INPUT_pw2bgw.html \
INPUT_bgw2pw.html
PDFS = eps_man.pdf
AUXS = $(PDFS:.pdf=.aux)
......
......@@ -54,7 +54,8 @@ all : tldeps average.x bands.x dos.x epsilon.x initial_state.x \
plan_avg.x plotband.x plotproj.x plotrho.x pmw.x pp.x projwfc.x \
pawplot.x sumpdos.x wfdd.x \
pw2wannier90.x pw_export.x pw2gw.x \
wannier_ham.x wannier_plot.x
wannier_ham.x wannier_plot.x \
pw2bgw.x bgw2pw.x
qexml.x: qexml.o qexml_example.o
$(LD) $(LDFLAGS) -o $@ qexml_example.o qexml.o $(QEOBJS) $(LIBOBJS)
......@@ -165,7 +166,17 @@ wannier_plot.x : wannier_plot.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
wannier_plot.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
pw2bgw.x : pw2bgw.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
pw2bgw.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
bgw2pw.x : bgw2pw.o $(PPOBJS) $(MODULES) $(LIBOBJS)
$(LD) $(LDFLAGS) -o $@ \
bgw2pw.o $(PPOBJS) $(MODULES) $(LIBOBJS) $(LIBS)
- ( cd ../../bin ; ln -fs ../PP/src/$@ . )
tldeps:
test -n "$(TLDEPS)" && ( cd ../.. ; $(MAKE) $(MFLAGS) $(TLDEPS) || exit 1) || :
......
!
! Copyright (C) 2010-2012 Georgy Samsonidze
!
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
! Converts BerkeleyGW WFN and RHO files to the format of pw.x.
!
!-------------------------------------------------------------------------------
!
! BerkeleyGW, Copyright (c) 2011, The Regents of the University of
! California, through Lawrence Berkeley National Laboratory (subject to
! receipt of any required approvals from the U.S. Dept. of Energy).
! All rights reserved.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are
! met:
!
! (1) Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
!
! (2) Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
!
! (3) Neither the name of the University of California, Lawrence
! Berkeley National Laboratory, U.S. Dept. of Energy nor the names of
! its contributors may be used to endorse or promote products derived
! from this software without specific prior written permission.
!
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
! OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
! LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
! OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
!
! You are under no obligation whatsoever to provide any bug fixes,
! patches, or upgrades to the features, functionality or performance of
! the source code ("Enhancements") to anyone; however, if you choose to
! make your Enhancements available either publicly, or directly to
! Lawrence Berkeley National Laboratory, without imposing a separate
! written license agreement for such Enhancements, then you hereby grant
! the following license: a non-exclusive, royalty-free perpetual
! license to install, use, modify, prepare derivative works, incorporate
! into other computer software, distribute, and sublicense such
! enhancements or derivative works thereof, in binary and source code
! form.
!
!-------------------------------------------------------------------------------
!
! bgw2pw subroutines:
!
! write_evc - generates eigenvalues and wavefunctions in espresso format
! write_cd - generates charge density in espresso format
! check_inversion - checks whether real/complex version is appropriate
!
!-------------------------------------------------------------------------------
PROGRAM bgw2pw
USE environment, ONLY : environment_start, environment_end
USE io_files, ONLY : prefix, tmp_dir, outdir
USE io_global, ONLY : ionode, ionode_id
USE kinds, ONLY : DP
USE mp, ONLY : mp_bcast
USE mp_global, ONLY : mp_startup
IMPLICIT NONE
character(len=6) :: codename = 'BGW2PW'
integer :: real_or_complex
logical :: wfng_flag
character ( len = 256 ) :: wfng_file
integer :: wfng_nband
logical :: rhog_flag
character ( len = 256 ) :: rhog_file
NAMELIST / input_bgw2pw / prefix, outdir, &
real_or_complex, wfng_flag, wfng_file, wfng_nband, &
rhog_flag, rhog_file
integer :: ios
character ( len = 256 ) :: input_file_name
character ( len = 256 ) :: output_dir_name
character (len=256), external :: trimcheck
#ifdef __PARA
CALL mp_startup ( )
#endif
CALL environment_start ( codename )
prefix = 'prefix'
CALL get_env ( 'ESPRESSO_TMPDIR', outdir )
IF ( TRIM ( outdir ) == ' ' ) outdir = './'
real_or_complex = 2
wfng_flag = .FALSE.
wfng_file = 'WFN'
wfng_nband = 0
rhog_flag = .FALSE.
rhog_file = 'RHO'
IF ( ionode ) THEN
CALL input_from_file ( )
READ ( 5, input_bgw2pw, iostat = ios )
IF ( ios /= 0 ) CALL errore ( codename, 'input_bgw2pw', abs ( ios ) )
IF ( real_or_complex /= 1 .AND. real_or_complex /= 2 ) &
CALL errore ( codename, 'real_or_complex', 1 )
IF ( wfng_nband .LT. 0 ) CALL errore ( codename, 'wfng_nband', 1 )
ENDIF
tmp_dir = trimcheck ( outdir )
CALL mp_bcast ( outdir, ionode_id )
CALL mp_bcast ( tmp_dir, ionode_id )
CALL mp_bcast ( prefix, ionode_id )
CALL mp_bcast ( real_or_complex, ionode_id )
CALL mp_bcast ( wfng_flag, ionode_id )
CALL mp_bcast ( wfng_file, ionode_id )
CALL mp_bcast ( wfng_nband, ionode_id )
CALL mp_bcast ( rhog_flag, ionode_id )
CALL mp_bcast ( rhog_file, ionode_id )
CALL read_file ( )
CALL openfil_pp ( )
IF ( wfng_flag ) THEN
input_file_name = TRIM ( outdir ) // '/' // TRIM ( wfng_file )
output_dir_name = TRIM ( outdir ) // '/' // TRIM ( prefix ) // '.save'
IF ( ionode ) WRITE ( 6, '(5x,"call write_evc")' )
CALL start_clock ( 'write_evc' )
CALL write_evc ( input_file_name, real_or_complex, wfng_nband, &
output_dir_name )
CALL stop_clock ( 'write_evc' )
IF ( ionode ) WRITE ( 6, '(5x,"done write_evc",/)' )
ENDIF
IF ( rhog_flag ) THEN
input_file_name = TRIM ( outdir ) // '/' // TRIM ( rhog_file )
output_dir_name = TRIM ( outdir ) // '/' // TRIM ( prefix ) // '.save'
IF ( ionode ) WRITE ( 6, '(5x,"call write_cd")' )
CALL start_clock ( 'write_cd' )
CALL write_cd ( input_file_name, real_or_complex, output_dir_name )
CALL stop_clock ( 'write_cd' )
IF ( ionode ) WRITE ( 6, '(5x,"done write_cd",/)' )
ENDIF
IF ( ionode ) WRITE ( 6, * )
IF ( wfng_flag ) CALL print_clock ( 'write_evc' )
IF ( rhog_flag ) CALL print_clock ( 'write_cd' )
CALL environment_end ( codename )
CALL stop_pp ( )
STOP
END PROGRAM bgw2pw
!-------------------------------------------------------------------------------
SUBROUTINE write_evc ( input_file_name, real_or_complex, &
wfng_nband, output_dir_name )
USE cell_base, ONLY : omega, alat, tpiba, tpiba2, at, bg
USE constants, ONLY : eps6
USE fft_base, ONLY : dfftp
USE gvect, ONLY : ngm, ngm_g, ig_l2g, mill, g
USE io_global, ONLY : ionode, ionode_id
USE ions_base, ONLY : nat
USE iotk_module, ONLY : iotk_attlenx, iotk_free_unit, iotk_open_write, &
iotk_write_begin, iotk_write_attr, iotk_write_empty, iotk_write_dat, &
iotk_write_end, iotk_close_write, iotk_index
USE kinds, ONLY : DP
USE klist, ONLY : xk, nks, nkstot
USE lsda_mod, ONLY : nspin
USE mp, ONLY : mp_bcast, mp_sum, mp_max, mp_barrier
USE mp_global, ONLY : nproc, kunit, npool, my_pool_id, world_comm, &
intra_pool_comm
USE symm_base, ONLY : s, nsym
USE xml_io_base, ONLY : create_directory, kpoint_dir, wfc_filename
#ifdef __PARA
USE parallel_include, ONLY : MPI_INTEGER, MPI_DOUBLE_COMPLEX
#endif
USE wvfct, ONLY : npwx, g2kin, ecutwfc
IMPLICIT NONE
character ( len = 256 ), intent ( in ) :: input_file_name
integer, intent ( in ) :: real_or_complex
integer, intent ( in ) :: wfng_nband
character ( len = 256 ), intent ( in ) :: output_dir_name
logical :: f1, f2
integer :: ierr, i, j, iu, ik, is, ib, ig, jg, fg, ir, &
na, nk, ns, nb, nbgw, ng, ngkmax, ntran, cell_symmetry, &
nkbl, nkl, nkr, iks, ike, npw, npw_g, ngkdist_l, ngkdist_g, &
igk_l2g, irecord, nrecord, ng_irecord, nr ( 3 )
real ( DP ) :: ecutrho, ecutwfn, celvol, recvol, al, bl, xdel, &
a ( 3, 3 ), b ( 3, 3 ), adot ( 3, 3 ), bdot ( 3, 3 )
character :: sdate*32, stime*32, stitle*32
character ( len = 256 ) :: filename
character ( iotk_attlenx ) :: attr
integer, allocatable :: itmp ( : )
integer, allocatable :: ngk ( : )
integer, allocatable :: gvec ( :, : )
integer, allocatable :: igk_buf ( : )
integer, allocatable :: igk_dist ( :, : )
integer, allocatable :: gk_buf ( :, : )
integer, allocatable :: gk_dist ( :, : )
real ( DP ), allocatable :: k ( :, : )
real ( DP ), allocatable :: en ( :, :, : )
real ( DP ), allocatable :: oc ( :, :, : )
real ( DP ), allocatable :: wfngr ( :, : )
complex ( DP ), allocatable :: wfngc ( :, : )
complex ( DP ), allocatable :: wfng_buf ( :, : )
complex ( DP ), allocatable :: wfng_dist ( :, :, :, : )
CALL check_inversion ( real_or_complex, nsym, s, nspin, .true., .true. )
IF ( ionode ) CALL iotk_free_unit ( iu )
IF ( ionode ) THEN
OPEN ( unit = iu, file = TRIM ( input_file_name ), &
form = 'unformatted', status = 'old' )
READ ( iu ) stitle, sdate, stime
ENDIF
CALL mp_bcast ( stitle, ionode_id )
f1 = real_or_complex == 1 .AND. stitle(1:8) == 'WFN-Real'
f2 = real_or_complex == 2 .AND. stitle(1:11) == 'WFN-Complex'
IF ( ( .NOT. f1 ) .AND. ( .NOT. f2 ) ) &
CALL errore ( 'write_evc', 'file header', 1 )
IF ( ionode ) THEN
READ ( iu ) ns, ng, ntran, cell_symmetry, na, ecutrho, nk, nb, ngkmax, ecutwfn
READ ( iu ) ( nr ( ir ), ir = 1, 3 )
READ ( iu ) celvol, al, ( ( a ( j, i ), j = 1, 3 ), i = 1, 3 ), &
( ( adot ( j, i ), j = 1, 3 ), i = 1, 3 )
READ ( iu ) recvol, bl, ( ( b ( j, i ), j = 1, 3 ), i = 1, 3 ), &
( ( bdot ( j, i ), j = 1, 3 ), i = 1, 3 )
ENDIF
CALL mp_bcast ( ns, ionode_id )
CALL mp_bcast ( ng, ionode_id )
CALL mp_bcast ( ntran, ionode_id )
CALL mp_bcast ( cell_symmetry, ionode_id )
CALL mp_bcast ( na, ionode_id )
CALL mp_bcast ( ecutrho, ionode_id )
CALL mp_bcast ( nk, ionode_id )
CALL mp_bcast ( nb, ionode_id )
CALL mp_bcast ( ngkmax, ionode_id )
CALL mp_bcast ( ecutwfn, ionode_id )
CALL mp_bcast ( nr, ionode_id )
CALL mp_bcast ( celvol, ionode_id )
CALL mp_bcast ( al, ionode_id )
CALL mp_bcast ( a, ionode_id )
CALL mp_bcast ( adot, ionode_id )
CALL mp_bcast ( recvol, ionode_id )
CALL