Dear everyone

I’m trying to calculate the Non-linear optical coefficients and EO tensor of GaAs using the nonlinear module in abinit (https://docs.abinit.org/tutorial/nlo/). However, when I used the primitive cell structure converted with Materials Studio and abipy, the tensor element symmetry was incorrect, although it was recognized as face-centered cubic by abinit. Does anyone know the reason for the error and how to obtain the correct output? Below is my input file.Thanks!

###########

ixc -1012

ndtset 7

#DATASET1 : scf calculation: GS WF in the IBZ

#********************************************

prtden1 1 # save density on disk, will be used in other datasets

prtwf1 1 # save WF on disk, will be used in other datasets

kptopt1 1 # use Irreducible Brillouin Zone (all symmetry taken into account)

toldfe1 1.0d-12 # SCF convergence criteria (could be tolwfr or tolvrs)

#DATASET2 : non scf calculation: GS WF in half BZ

#*****************************************************

getden2 1 # use density from dataset 1

kptopt2 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

getwfk2 1 # use GS WF from dataset 1 (as input)

iscf2 -2 # non-self-consistent calculation

tolwfr2 1.0d-22 # convergence criteria on WF, need high precision for response

prtwf2 1 # save WF on disk, will be used in other datasets

#DATASET3 : derivative of WF with respect to k points (d/dk)

#**********************************************************

getwfk3 2 # use GS WF from dataset 2

kptopt3 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

rfelfd3 2 # compute 1st-order WF derivatives (d/dk)

tolwfr3 1.0d-22 # convergence criteria on 1st-order WF

prtwf3 1 # save 1st-order WF on disk, will be used in other datasets

#DATASET4 : response functions (2nd derivatives of E)

# and corresponding 1st order WF derivatives

# phonons, electric fields, and strains are all done

#**************************************************************

getwfk4 2 # use GS WF from dataset 2

kptopt4 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

getddk4 3 # use ddk WF from dataset 3 (needed for electric field)

rfphon4 1 # compute 1st-order WF derivatives with respect to atomic displacements…

rfelfd4 3 # compute 1st-order WF derivatives with respect to electric field

rfstrs4 3 # compute 1st-order WF derivatives with respect to strains

tolvrs4 1.0d-12 # SCF convergence criteria (could be tolwfr)

prepanl4 1 # make sure that response functions are correctly prepared for a non-linear computation

prtwf4 1 # save 1st-order WF on disk, will be used in other datasets

prtden4 1 # save 1st-order density on disk, will be used in other datasets

# DATASET5 : 2nd order WF derivatives with respect to k-points (d/dkdk)

#**********************************************************************

rf2_dkdk5 1 # compute 2nd-order WF derivatives (d/dkdk)

getwfk5 2 # use GS WF from dataset 2

kptopt5 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

getddk5 3 # use 1st-order WF from dataset 3

prepanl5 1 # compute only needed directions for the non-linear computation

tolwfr5 1.0d-20 # convergence criteria on 2nd-order WF

prtwf5 1 # save 2nd-order WF on disk, will be used in other datasets

# DATASET6 : 2nd order WF derivatives with respect to electric field and k-points (d/dkde)

#*****************************************************************************************

rf2_dkde6 1 # compute 2nd-order WF derivatives (d/dkde)

getwfk6 2 # use GS WF from dataset 2

getddk6 3 # use 1st-order WF (d/dk) from dataset 3

get1den6 4 # use 1st-order densities from dataset 4

getdelfd6 4 # use 1st-order WF (d/de) from dataset 4

getdkdk6 5 # use 2nd-order WF (d/dkdk) from dataset 5

prepanl6 1 # compute only directions needed for nonlinear computation

tolwfr6 1.0d-20 # convergence criteria on 2nd-order WF

kptopt6 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

prtwf6 1 # save 2nd-order WF on disk, will be used in other datasets

#DATASET7 : 3rd derivatives of E

#*********************************

getwfk7 2 # use GS WF from dataset 2

getddk7 3 # use 1st-order WF (d/dk) from dataset 3

get1den7 4 # use 1st-order densities from dataset 4

get1wf7 4 # use 1st-order WFs from dataset 4

getdkde7 6 # use 2nd-order WF (d/dkde) from dataset 6

kptopt7 2 # use Half Brillouin Zone (only time-reversal symmetry taken into account)

optdriver7 5 # compute 3rd order derivatives of the energy

usepead7 0 # no use of pead method, so use full DFPT instead

d3e_pert1_elfd7 1 # activate electric field for 1st perturbation…

d3e_pert1_phon7 1 # …and also atomic displacements…

d3e_pert1_atpol7 1 2 # …for all atoms (so here only 1 and 2)…

d3e_pert2_elfd7 1 # activate electric field for 2nd perturbation…

d3e_pert3_elfd7 1 # activate electric field for 3rd perturbation…

#Definition of the unit cell

natom 2

ntypat 2

typat 1 2

znucl 31 33

xred

0.00 0.00 0.00

0.25 0.25 0.25

acell 1.0 1.0 1.0

rprim

6.6685262485 0.0000000000 3.8500754247

2.2228420828 6.2871468411 3.8500754247

0.0000000000 0.0000000000 7.7001508494

ecut 30

nband 14

nbdbuf 0

ecutsm 0.5

dilatmx 1.05

ngkpt 6 6 6

nshiftk 4

shiftk

0.5 0.5 0.5

0.5 0.0 0.0

0.0 0.5 0.0

0.0 0.0 0.5

# scf parameters

nstep 50

prtwf 0

prtden 0

prteig 0