Re: [QE-users] Error in piezoelectric coefficients calculation (Berry phase)

2023-08-10 Thread Paolo Giannozzi

On 04/08/2023 16:13, Zimmi Singh wrote:

1) In the nscf calculations, I added the 'nbnd' tag in the input file 
(nscf1.in). However, when examining the output file 
(nscf1.out), the polarization value was displayed as NaN


It happens only if you use many processors and many empty bands. The 
reason is quite stupid: a matrix that should be 1 on the diagonal for 
empty bands is instead equal to the number of processors. This does not 
affect the final result but may produce floating-point overflow when 
computing the determinant. It will be fixed in the next version. For the 
time being, use less empty bands (they are useless anyway for Berry's 
phase calculation)


Paolo
--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 206, 33100 Udine Italy, +39-0432-558216
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users


Re: [QE-users] Error in piezoelectric coefficients calculation (Berry phase)

2023-08-09 Thread Paolo Giannozzi

On 04/08/2023 16:17, ANAND JHA wrote:


That's because nbnd is only used for calculation type BANDS


not really: the number of bands can be specified for any kind of 
calculation. It is typically, but not always, used for "bands" calculations.


The NaN (Not a Number) sgnals a floating-point error typically, overflow 
or division by zero. It appears only for nbnd > 54, though: for smaller 
values of nbnd it works for me. Not sure why


Paolo

On Fri, 4 Aug 2023 at 19:43, Zimmi Singh  
wrote:


Dear Users,

I am attempting to calculate the piezoelectric coefficients of 2D
MoS2 using the Berry Phase method on a strained structure (0.5% in
the armchair direction).

I faced two issues during the process.

1) In the nscf calculations, I added the 'nbnd' tag in the input
file (nscf1.in ). However, when examining the
output file (nscf1.out), the polarization value was displayed as NaN
(see below). I have attached the output file for your reference.

                             VALUES OF POLARIZATION
                              ~~

         The calculation of phases done along the direction of vector 2
         of the reciprocal lattice gives the following contribution to
         the polarization vector (in different units, and being Omega
         the volume of the unit cell):

            P =         NaN  (mod  10.4913000)  (e/Omega).bohr

            P =         NaN  (mod   0.0037363)  e/bohr^2

            P =         NaN  (mod   0.2136113)  C/m^2

         The polarization direction is:  (-0.0 , 1.0 , 0.0 )

However, after removing the 'nbnd' tag in the nscf input file
(nscf.in ), I successfully obtained the polarization
values (see below), and also attached the output file (nscf.out)).

                              VALUES OF POLARIZATION
                              ~~

         The calculation of phases done along the direction of vector 2
         of the reciprocal lattice gives the following contribution to
         the polarization vector (in different units, and being Omega
         the volume of the unit cell):

            P =  14.0341794  (mod  10.4913000)  (e/Omega).bohr

            P =   0.0049981  (mod   0.0037363)  e/bohr^2

            P =   0.2857471  (mod   0.2136113)  C/m^2

         The polarization direction is:  (-0.0 , 1.0 , 0.0 )


2) At a strain of 0.5% in the armchair direction, the calculated
polarization vector is P = 0.2857471 C/m². To convert it to C/m, I
multiplied it by the armchair lattice parameter (10.5 angstroms) and
obtained the piezoelectric coefficient e22 = 60006.89 pC/m. However,
the published value for e22 is 362 pC/m (10.1021/acsnano.5b03394).

I have scavenged through the mailing list but found no tutorial on
this topic.

-- 
Best Regards

Zimmi Singh
/Ph.D. Candidate/
/Department of Metallurgical and Materials Engineering
Indian Institute of Technology, Kharagpur
Kharagpur, India/
/Mob No. 9935804727/

___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users


___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users


--
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 206, 33100 Udine Italy, +39-0432-558216
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

Re: [QE-users] Error in piezoelectric coefficients calculation (Berry phase)

2023-08-04 Thread ANAND JHA
Thats because nbnd is only used for calculation type BANDS On Fri, 4 Aug 2023 at 19:43, Zimmi Singh  wrote:Dear Users,I am attempting 
to calculate the piezoelectric coefficients of 2D MoS2 using the Berry 
Phase method on a strained structure (0.5% in the armchair direction). I faced two issues during the process.1) In the nscf calculations, I added the 'nbnd' tag in the 
input file (nscf1.in). However, when examining the output file 
(nscf1.out), the polarization value was displayed as NaN (see below). I have attached 
the output file for your reference.                             VALUES OF POLARIZATION                             ~~        The calculation of phases done along the direction of vector 2        of the reciprocal lattice gives the following contribution to        the polarization vector (in different units, and being Omega        the volume of the unit cell):           P =         NaN  (mod  10.4913000)  (e/Omega).bohr           P =         NaN  (mod   0.0037363)  e/bohr^2           P =         NaN  (mod   0.2136113)  C/m^2        The polarization direction is:  (-0.0 , 1.0 , 0.0 )However, after removing the 'nbnd' tag in the nscf input file (nscf.in), I successfully 
obtained the polarization values (see below), and also attached the output file (nscf.out)).                              VALUES OF POLARIZATION                             ~~        The calculation of phases done along the direction of vector 2        of the reciprocal lattice gives the following contribution to        the polarization vector (in different units, and being Omega        the volume of the unit cell):           P =  14.0341794  (mod  10.4913000)  (e/Omega).bohr           P =   0.0049981  (mod   0.0037363)  e/bohr^2           P =   0.2857471  (mod   0.2136113)  C/m^2        The polarization direction is:  (-0.0 , 1.0 , 0.0 )2) At a strain of 0.5% in the armchair direction, the calculated 
polarization vector is P = 0.2857471 C/m². To convert it to C/m, I 
multiplied it by the armchair lattice parameter (10.5 angstroms) and 
obtained the piezoelectric coefficient e22 = 60006.89 pC/m. However, the
 published value for e22 is 362 pC/m (10.1021/acsnano.5b03394).I have scavenged through the mailing list but found no tutorial on this topic. -- Best RegardsZimmi SinghPh.D. CandidateDepartment of Metallurgical and Materials Engineering
Indian Institute of Technology, Kharagpur
Kharagpur, IndiaMob No. 9935804727___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

[QE-users] Error in piezoelectric coefficients calculation (Berry phase)

2023-08-04 Thread Zimmi Singh
Dear Users,

I am attempting to calculate the piezoelectric coefficients of 2D MoS2
using the Berry Phase method on a strained structure (0.5% in the armchair
direction).

I faced two issues during the process.
1) In the nscf calculations, I added the 'nbnd' tag in the input file (
nscf1.in). However, when examining the output file (nscf1.out), the
polarization value was displayed as NaN (see below). I have attached the
output file for your reference.

VALUES OF POLARIZATION
 ~~

The calculation of phases done along the direction of vector 2
of the reciprocal lattice gives the following contribution to
the polarization vector (in different units, and being Omega
the volume of the unit cell):

   P = NaN  (mod  10.4913000)  (e/Omega).bohr

   P = NaN  (mod   0.0037363)  e/bohr^2

   P = NaN  (mod   0.2136113)  C/m^2

The polarization direction is:  (-0.0 , 1.0 , 0.0 )

However, after removing the 'nbnd' tag in the nscf input file (nscf.in), I
successfully obtained the polarization values (see below), and also
attached the output file (nscf.out)).

 VALUES OF POLARIZATION
 ~~

The calculation of phases done along the direction of vector 2
of the reciprocal lattice gives the following contribution to
the polarization vector (in different units, and being Omega
the volume of the unit cell):

   P =  14.0341794  (mod  10.4913000)  (e/Omega).bohr

   P =   0.0049981  (mod   0.0037363)  e/bohr^2

   P =   0.2857471  (mod   0.2136113)  C/m^2

The polarization direction is:  (-0.0 , 1.0 , 0.0 )


2) At a strain of 0.5% in the armchair direction, the calculated
polarization vector is P = 0.2857471 C/m². To convert it to C/m, I
multiplied it by the armchair lattice parameter (10.5 angstroms) and
obtained the piezoelectric coefficient e22 = 60006.89 pC/m. However, the
published value for e22 is 362 pC/m (10.1021/acsnano.5b03394).

I have scavenged through the mailing list but found no tutorial on this
topic.

-- 
Best Regards
Zimmi Singh
*Ph.D. Candidate*


*Department of Metallurgical and Materials Engineering Indian Institute of
Technology, Kharagpur Kharagpur, India*
*Mob No. 9935804727*
<>
___
The Quantum ESPRESSO community stands by the Ukrainian
people and expresses its concerns about the devastating
effects that the Russian military offensive has on their
country and on the free and peaceful scientific, cultural,
and economic cooperation amongst peoples
___
Quantum ESPRESSO is supported by MaX (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users