2D kpoint grid being interpreted as 3D
Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, Daniele Varsano
- Daniele Varsano
- Posts: 4209
- Joined: Tue Mar 17, 2009 2:23 pm
- Contact:
Re: 2D kpoint grid being interpreted as 3D
Dear Alan,
in the same file, you need to change the threshold, check the ig which is failing the condition and look if the (v1-g_vec(ig,:)) for that ig it is actually small.
In this case, change the threshold accordingly.
Best,
Daniele
in the same file, you need to change the threshold, check the ig which is failing the condition and look if the (v1-g_vec(ig,:)) for that ig it is actually small.
In this case, change the threshold accordingly.
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
-
- Posts: 98
- Joined: Thu Jul 02, 2020 3:56 pm
Re: 2D kpoint grid being interpreted as 3D
Ignore this post, I have figured out my question!
Alan Bowman
University of Cambridge
University of Cambridge
- Daniele Varsano
- Posts: 4209
- Joined: Tue Mar 17, 2009 2:23 pm
- Contact:
Re: 2D kpoint grid being interpreted as 3D
Dear Alan,
you need to insert a write fortran statement.
Anyway, this will print the value for all the g vectors, and the function is called many times.
I suggest you to modify the source in this way:
!
and run the code in serial. You will have in the fort.20 file, the difference between the two vectors and see what it is it minimum in order to raise the threshold.
Best,
Daniele
you need to insert a write fortran statement.
Anyway, this will print the value for all the g vectors, and the function is called many times.
I suggest you to modify the source in this way:
!
Code: Select all
if(G_index==0) then
do ig=ng1,ng2
write(20,*) v1(1)-g_vec(ig,1),v1(2)-g_vec(ig,2),v1(3)-g_vec(ig,3)
enddo
if(.not.accept_fail) call error(" Error search for G=G1-G2 !!")
if( accept_fail) call warning(" Error search for G=G1-G2 !!")
endif
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
-
- Posts: 98
- Joined: Thu Jul 02, 2020 3:56 pm
Re: 2D kpoint grid being interpreted as 3D
Dear Daniele
I think I understand but don't want to put the wrong lines into the code - what is the best way to get the code to output small values of (v1-g_vec(ig,:)) and G_iku_zero?
Best wishes,
Alan
I think I understand but don't want to put the wrong lines into the code - what is the best way to get the code to output small values of (v1-g_vec(ig,:)) and G_iku_zero?
Best wishes,
Alan
Alan Bowman
University of Cambridge
University of Cambridge
- Daniele Varsano
- Posts: 4209
- Joined: Tue Mar 17, 2009 2:23 pm
- Contact:
Re: 2D kpoint grid being interpreted as 3D
Dear Alan,
I do not understand what you mean: G_iku_zero it is tolerance and you want to look if the problem that a gvectors equal to G-G' is not found is due to roundness,
so you want to look at its smallest value and raise the tolerance accordingly.
If you do not feel comfortable, just raise the tolerance as you did before hoping it is large enough to find the difference vector and small enough to not mess up with other vectors.
Best,
Daniele
I do not understand what you mean: G_iku_zero it is tolerance and you want to look if the problem that a gvectors equal to G-G' is not found is due to roundness,
so you want to look at its smallest value and raise the tolerance accordingly.
If you do not feel comfortable, just raise the tolerance as you did before hoping it is large enough to find the difference vector and small enough to not mess up with other vectors.
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
-
- Posts: 98
- Joined: Thu Jul 02, 2020 3:56 pm
Re: 2D kpoint grid being interpreted as 3D
Hi Daniele
I put the code in that you suggested and tried to recompile but received the following error (when running 'make Yambo'):
"
make[1]: Leaving directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make[1]: Entering directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make[1]: Warning: File `make.dep' has modification time 0.17 s in the future
eval_G_minus_G.F G_rot_grid.F G_index.f90(76): error #6404: This name does not have a type, and must have an explicit type. [ACCEPT_FAIL]
if(.not.accept_fail) call error(" Error search for G=G1-G2 !!")
-----------^
G_index.f90(77): error #6341: A logical data type is required in this context. [ACCEPT_FAIL]
if( accept_fail) call warning(" Error search for G=G1-G2 !!")
-----------^
compilation aborted for G_index.f90 (code 1)
make[1]: *** [G_index.o] Error 1
make[1]: Leaving directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make: *** [yambo] Error 2
"
I'm not an expert on Fortran - could you please advise what to do?
Best wishes,
Alan
I put the code in that you suggested and tried to recompile but received the following error (when running 'make Yambo'):
"
make[1]: Leaving directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make[1]: Entering directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make[1]: Warning: File `make.dep' has modification time 0.17 s in the future
eval_G_minus_G.F G_rot_grid.F G_index.f90(76): error #6404: This name does not have a type, and must have an explicit type. [ACCEPT_FAIL]
if(.not.accept_fail) call error(" Error search for G=G1-G2 !!")
-----------^
G_index.f90(77): error #6341: A logical data type is required in this context. [ACCEPT_FAIL]
if( accept_fail) call warning(" Error search for G=G1-G2 !!")
-----------^
compilation aborted for G_index.f90 (code 1)
make[1]: *** [G_index.o] Error 1
make[1]: Leaving directory `/home/arb83/Installing/yambo-4.5.2/src/common'
make: *** [yambo] Error 2
"
I'm not an expert on Fortran - could you please advise what to do?
Best wishes,
Alan
Alan Bowman
University of Cambridge
University of Cambridge
- Daniele Varsano
- Posts: 4209
- Joined: Tue Mar 17, 2009 2:23 pm
- Contact:
Re: 2D kpoint grid being interpreted as 3D
Dear Alan,
sorry I copied and pasted from the develop version of the code and not the GPL.
The line you need to modify reads as follows:
Instead of:
substitute with:
sorry I copied and pasted from the develop version of the code and not the GPL.
The line you need to modify reads as follows:
Instead of:
Code: Select all
if(G_index==0) call error(" Error search for G=G1-G2 !!")
Code: Select all
if(G_index==0) then
do ig=ng1,ng2
write(20,*) v1(1)-g_vec(ig,1),v1(2)-g_vec(ig,2),v1(3)-g_vec(ig,3)
enddo
call error(" Error search for G=G1-G2 !!")
endif
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
-
- Posts: 98
- Joined: Thu Jul 02, 2020 3:56 pm
Re: 2D kpoint grid being interpreted as 3D
Dear Daniele
I've carried out the calculation as suggested. For the three columns the (modulus) minimum values are:
0.000025 0.000095 0.004507
Do I need to increase G_iku_zero by a factor of ~ 500 in this case?
With best wishes,
Alan
I've carried out the calculation as suggested. For the three columns the (modulus) minimum values are:
0.000025 0.000095 0.004507
Do I need to increase G_iku_zero by a factor of ~ 500 in this case?
With best wishes,
Alan
Alan Bowman
University of Cambridge
University of Cambridge
- Daniele Varsano
- Posts: 4209
- Joined: Tue Mar 17, 2009 2:23 pm
- Contact:
Re: 2D kpoint grid being interpreted as 3D
Dear Alan,
G_iku_zero is 1.E-5_SP by default so you need to raise for such large factor.
The z component is very large, It let me think that it is not a roundness problem, but a problem of your G vector grid.
If you want you can send your nscf.in file and r_setup and I will have a look.
Best,
Daniele
G_iku_zero is 1.E-5_SP by default so you need to raise for such large factor.
The z component is very large, It let me think that it is not a roundness problem, but a problem of your G vector grid.
If you want you can send your nscf.in file and r_setup and I will have a look.
Best,
Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/
-
- Posts: 98
- Joined: Thu Jul 02, 2020 3:56 pm
Re: 2D kpoint grid being interpreted as 3D
Dear Daniele
Please find attached. I've removed most of the atoms from the unit cell as I don't think this should change the k-point positions but may speed up your analysis.
Best wishes,
Alan
P.S. I'm sure you'll notice, but I've added '.txt' to the end of the files to make them uploadable.
Please find attached. I've removed most of the atoms from the unit cell as I don't think this should change the k-point positions but may speed up your analysis.
Best wishes,
Alan
P.S. I'm sure you'll notice, but I've added '.txt' to the end of the files to make them uploadable.
You do not have the required permissions to view the files attached to this post.
Alan Bowman
University of Cambridge
University of Cambridge