Page 3 of 8
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 7:55 am
by Daniele Varsano
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 10:21 am
by arb83@cam.ac.uk
Ignore this post, I have figured out my question!
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 10:39 am
by Daniele Varsano
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:
!
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
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 10:39 am
by arb83@cam.ac.uk
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 11:29 am
by Daniele Varsano
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 12:01 pm
by arb83@cam.ac.uk
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 12:06 pm
by Daniele Varsano
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:
Code: Select all
if(G_index==0) call error(" Error search for G=G1-G2 !!")
substitute with:
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 2:50 pm
by arb83@cam.ac.uk
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 3:08 pm
by Daniele Varsano
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
Re: 2D kpoint grid being interpreted as 3D
Posted: Thu Oct 22, 2020 6:02 pm
by arb83@cam.ac.uk
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.