a2y input the ABINIT wave-function for Yambo SHG

Forum for discussing issues arising with interfacing the Abinit code (KSS) file with Yambo.

Moderator: Conor Hogan

Post Reply
jiejiang
Posts: 10
Joined: Mon Dec 23, 2019 12:10 am

a2y input the ABINIT wave-function for Yambo SHG

Post by jiejiang » Tue Mar 07, 2023 1:31 am

Dear Yambo,

I am running Yambo SHG to reproduce the AlAs SHG example by using Abinit 9.4.1.
I compiled Abinit 9.4.1 with two options,

Code: Select all

-enable-netcdf-default and --enable-mpi-io.
After running Abinit, I got output files,

Code: Select all

AlAso_DS2_KSS
AlAso_DS2_WFK
AlAso_OUT
AlAso_OUT.nc
...

I use a2y from Yambo version of 5.1.0.
When I run command, a2y -F AlAso_DS2_KSS, I got errors,

Code: Select all

 <---> A(binit) 2 Y(ambo) [NETCDF format]
 <---> Checking input file ...
 <---> NETCDF file : AlAso_DS2_KSS
 <---> DBs path set to : .
[ERROR] NetCDF: Unknown file format
My questions are,

(1) Should I add another option of

Code: Select all

--with-trio-flavor="netcdf"
in compiling Abinit 9.4.1?
(2) Should I add anything in Abinit input file? such as,

Code: Select all

iomod 3
prtkbff 1
(3) Is AlAso_OUT.nc a NetCDF file? If yes, then why I did NOT get
AlAso_DS2_KSS.nc? (I got AlAso_DS2_KSS, but NOT AlAso_DS2_KSS.nc).

Thank you very much for your helps.
Jie Jiang
AFRL
Dayton, OH 45432
USA :D

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: a2y input the ABINIT wave-function for Yambo SHG

Post by Davide Sangalli » Tue Mar 07, 2023 8:49 am

Dear Jie Jiang,
you need the file AlAso_DS2_WFK.nc to be produced by abinit.

In my abinit input files I use (not sure if it is always needed, it might depend on the abinit version)

Code: Select all

iomode  3 
Also you need the input variable to print the KB form factors inside AlAso_DS2_WFK.nc when performing the nscf calculation

Code: Select all

prtkbff 1
In my case I just specified the following flags when compiling

Code: Select all

--enable-openmp \
--with-mpi \
--enable-mpi-io \
I do not think anything in particular is needed for netcdf I/O mode (but again, this might depend on the abinit version and you may need to check with the abinit developers)

Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

jiejiang
Posts: 10
Joined: Mon Dec 23, 2019 12:10 am

Re: a2y input the ABINIT wave-function for Yambo SHG

Post by jiejiang » Tue Mar 07, 2023 6:02 pm

Dear Davide,

Thanks for your great suggestions.

"you need the file AlAso_DS2_WFK.nc to be produced by abinit."

In the example nscf calculation, it outputs KSS, instead of WFK. So, will the file
AlAso_DS2_KSS.nc work?

"In my abinit input files I use (not sure if it is always needed, it might depend on the abinit version)

Code: Select all

iomode  3 
"

I need to add

Code: Select all

iomode  3 
as well in order to output KSS.nc and WFK.nc files.

"Also you need the input variable to print the KB form factors inside AlAso_DS2_WFK.nc when performing the nscf calculation

Code: Select all

prtkbff 1
"

I add

Code: Select all

prtkbff 1
in my input.

Now, I see output files, AlAso_DS1_WFK.nc, and AlAso_DS2_KSS.nc.
However, the calculation does NOT complete. In the attached log file, run.log file,
at the very end, I see "- Creating netcdf file WITHOUT MPI-IO support: AlAso_DS2_KSS.nc".
Also, in the attached computer error message file, alas_eo.txt, I see the corruption.
I also attach the input file, AlAsl_in.txt.

Would you please give further insights? Is the problem related to Abinit compilation?
I compiled Abinit9.4.1 with two options, --enable-netcdf-default and --enable-mpi-io.
I enabled mpi, but not openmp. Is the following compilation syntax correct?

Code: Select all

 --enable-netcdf-default --enable-mpi-io
Thanks,
Jie
You do not have the required permissions to view the files attached to this post.
Jie Jiang
AFRL
Dayton, OH 45432
USA :D

jiejiang
Posts: 10
Joined: Mon Dec 23, 2019 12:10 am

Re: a2y input the ABINIT wave-function for Yambo SHG

Post by jiejiang » Wed Mar 08, 2023 1:30 am

Dear Davide,

By the way, I used MPT for mpi, NOT openmpi library for mpi.
Is MPT NOT compatible to mpi-io feature of the application?

Thanks,
Jie
Jie Jiang
AFRL
Dayton, OH 45432
USA :D

User avatar
Davide Sangalli
Posts: 610
Joined: Tue May 29, 2012 4:49 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: a2y input the ABINIT wave-function for Yambo SHG

Post by Davide Sangalli » Wed Mar 08, 2023 9:45 am

Instead of setting up the abinit input file to generate a KSS, you just need to set-up the abinit input file to run a standard NSCF calculation.
After that you should get the WFK.nc file.

See an example here:

Code: Select all

#h-BN
#Ground state calculation (self consistent + non self-consistent calculation) 
 
ecut   20.0  #40      # Minimal kinetic energy cut-off, in Hartree
iomode 3             # This is needed only for the WFs

ndtset 2
 
#Ground state calculation (self consistent part)
prtden1   1       # Print the density, for use by dataset 2
kptopt1  1        # Option for the automatic generation of k points
nshiftk1 1
nband1 10
rfphon1 0
nqpt1 0
getwfk1 0
prtwf1 1
 
#non-self consistent calculation one denser kpt mesh
getden2 1
nband2 10
ngkpt2 6 6 1
kptopt2 1          # this asks to print the WFKs in full the BZ (use 4 with SOC)
iscf2 -2
tolwfr2 1.0d-8
nshiftk2 1
istwfk2 *1
rfphon2 0
nqpt2 0
prtwf2 1
prtkbff2 1
 
######################
#Common input variables
######################

toldfe 1.0d-10
pseudos "B.psp8, N.psp8"

ngkpt 2 2 1
shiftk  0 0 0
kptopt 3

acell  4.7163728  4.7163728 12.1758362
rprim    1.0000000000E+00  0.0000000000E+00  0.0000000000E+00
        -5.0000000000E-01  8.6602540378E-01  0.0000000000E+00
         0.0000000000E+00  0.0000000000E+00  1.0000000000E+00
 
#Definition of the atom types
ntypat 2           # There are two types of atoms
znucl 5 7        # The keyword "zatnum" refers to the atomic number of the
                  # possible type(s) of atom. The pseudopotential(s)
                  # mentioned in the "files" file must correspond
                  # to the type(s) of atom.
#Definition of the atoms
natom 4           # There are four  atoms
typat  1 2 1 2
     xcart    2.3581864000E+00  1.3614995528E+00  0.0000000000E+00
             -2.3581864000E+00 -1.3614995528E+00  0.0000000000E+00
             -2.3581864000E+00 -1.3614995528E+00  6.0879181000E+00
              2.3581864000E+00  1.3614995528E+00  6.0879181000E+00

#Definition of the planewave basis set
symmorphi 0
 
#Definition of the SCF procedure
nstep 100          # Maximal number of SCF cycles
diemac 4.50
Best,
D.
Davide Sangalli, PhD
CNR-ISM, Division of Ultrafast Processes in Materials (FLASHit) and MaX Centre
https://sites.google.com/view/davidesangalli
http://www.max-centre.eu/

jiejiang
Posts: 10
Joined: Mon Dec 23, 2019 12:10 am

Re: a2y input the ABINIT wave-function for Yambo SHG

Post by jiejiang » Wed Mar 08, 2023 1:24 pm

Dear Davide,

Great. Thanks for your suggestions.

Thanks,
Jie
Jie Jiang
AFRL
Dayton, OH 45432
USA :D

Post Reply