About Gvectors
Moderators: Davide Sangalli, Daniele Varsano, andrea.ferretti

 Posts: 3
 Joined: Wed Feb 24, 2010 7:59 pm
About Gvectors
Dear Yamboers,
I am learning how to use Yambo through the online tutorials ("Fantastic dimensions"), and I am using Pwscf for the initial calculations.
In the very first initialization step, Yambo reads how many Gvectors were used by the previous program to develop the wavefunctions and writes the actual number that it will use.
In the initialization outputs shown in the tutorials, I've noticed that the keywords Gvectors, Components and WF Gvectors in the section "[RD./SAVE//s.db1]" are always equal. This is not my case, though, when I try to do again the exercises of the tutorial: the values of Components and WF Gvectors are the same, but they are smaller than the value of the Gvectors .
I would like to know:
1) what do these keywords exactly refer to?
2) do they have to be always equal or not?
Thanks,
Paola

Paola Lupieri
PhD student
German Research School for
Simulation Sciences GmbH
Forschungszentrum Juelich
Germany
I am learning how to use Yambo through the online tutorials ("Fantastic dimensions"), and I am using Pwscf for the initial calculations.
In the very first initialization step, Yambo reads how many Gvectors were used by the previous program to develop the wavefunctions and writes the actual number that it will use.
In the initialization outputs shown in the tutorials, I've noticed that the keywords Gvectors, Components and WF Gvectors in the section "[RD./SAVE//s.db1]" are always equal. This is not my case, though, when I try to do again the exercises of the tutorial: the values of Components and WF Gvectors are the same, but they are smaller than the value of the Gvectors .
I would like to know:
1) what do these keywords exactly refer to?
2) do they have to be always equal or not?
Thanks,
Paola

Paola Lupieri
PhD student
German Research School for
Simulation Sciences GmbH
Forschungszentrum Juelich
Germany
 myrta gruning
 Posts: 305
 Joined: Tue Mar 17, 2009 11:38 am
 Contact:
Re: About Gvectors
Dear Paola
1) Gvectors is the maximum number of vectors used in the dft code. This can be larger than the number of reciprocal vectors used to describe the wavefunction (WF), e.g. to calculate the charge density. The other two numbers corresponds to the G vectors for the wavefunctions.In particular Components gives the maximum number of G vectors used to describe the wavefunction in reciprocal space (maximum because the number can change depending on k vector).WF Gvectors is used to handle the way of indexing the component in PWscf. (In fact when using the WF from other dft code eg. Abinit Components is set = WF Gvectors).
I hope this help you. Have fun with the tutorials!
Regards,
Myrta
Welcome and thank you for your interest in yambo.I am learning how to use Yambo through the online tutorials ("Fantastic dimensions"), and I am using Pwscf for the initial calculations.
In this first step, all three numbers you are referring to are read and stored in (n)s.db1. You should have these 3 lines (with different number of course) in the standard output of the p2y runIn the very first initialization step, Yambo reads how many Gvectors were used by the previous program to develop the wavefunctions and writes the actual number that it will use.
Code: Select all
<> :: Max WF components : 8749
<> :: RL vectors (WF): 8749
<> :: RL vectors (CHARGE): 8749
At hte beginning of every run then, the files created by the interface (s.db1 and s.wf) are read. In the report under [RD./SAVE//s.db1] you have all the parameters that are read (RD) by yambo from s.db1 in the dir SAVE. So the three numbers Gvectors, Components and WF Gvectors are the same as those read above. In particular Max WF components corresponds to Components, RL vectors (WF) corresponds to WF Gvectors (RL stays for reciprocal lattice, those vectors are standardly indicated with the letter G), and RL vectors (CHARGE) corresponds to Gvectors.In the initialization outputs shown in the tutorials, I've noticed that the keywords Gvectors, Components and WF Gvectors in the section "[RD./SAVE//s.db1]" are always equal. This is not my case, though, when I try to do again the exercises of the tutorial: the values of Components and WF Gvectors are the same, but they are smaller than the value of the Gvectors
2) No they can be equal, but they do not need to. In particular Gvectors >= WF Gvectors >= ComponentsI would like to know:
1) what do these keywords exactly refer to?
2) do they have to be always equal or not?
1) Gvectors is the maximum number of vectors used in the dft code. This can be larger than the number of reciprocal vectors used to describe the wavefunction (WF), e.g. to calculate the charge density. The other two numbers corresponds to the G vectors for the wavefunctions.In particular Components gives the maximum number of G vectors used to describe the wavefunction in reciprocal space (maximum because the number can change depending on k vector).WF Gvectors is used to handle the way of indexing the component in PWscf. (In fact when using the WF from other dft code eg. Abinit Components is set = WF Gvectors).
I hope this help you. Have fun with the tutorials!
Regards,
Myrta
Dr Myrta Grüning
Atomistic Simulation Centre
Queen's University Belfast  Northern Ireland
http://www.researcherid.com/rid/B15152009
Atomistic Simulation Centre
Queen's University Belfast  Northern Ireland
http://www.researcherid.com/rid/B15152009
 Conor Hogan
 Posts: 143
 Joined: Tue Mar 17, 2009 12:17 pm
 Contact:
Re: About Gvectors
Just to add: the p2y interface does indeed take the list of Gvectors from the charge density, so in that case the number is much greater than that of thewavefunctions. Often this is larger (or much larger, depending upon what you want to calculate) than what is needed to run the code, so you might reduce this value in the setup runlevel (yambo i).
a2y instead takes the list of Gvectors provided in the Abinit KSS file to describe the wavefunctions. In addition, the Gvectors in that case are centred at gamma (not kdependent, as in the Pwscf case), and ordered such that the WF components correspond exactly to the list of Gvectors needed to describe the wavefunctions, and is exactly equal to the total list of Gvectors given by Abinit (generally none of these conditions occur in PWscf).
Hope that is enough about Gvectors to satisfy you!
Conor
a2y instead takes the list of Gvectors provided in the Abinit KSS file to describe the wavefunctions. In addition, the Gvectors in that case are centred at gamma (not kdependent, as in the Pwscf case), and ordered such that the WF components correspond exactly to the list of Gvectors needed to describe the wavefunctions, and is exactly equal to the total list of Gvectors given by Abinit (generally none of these conditions occur in PWscf).
Hope that is enough about Gvectors to satisfy you!
Conor
Dr. Conor Hogan
CNRISM, via Fosso del Cavaliere, 00133 Roma, Italy;
Department of Physics and European Theoretical Spectroscopy Facility (ETSF),
University of Rome "Tor Vergata".
CNRISM, via Fosso del Cavaliere, 00133 Roma, Italy;
Department of Physics and European Theoretical Spectroscopy Facility (ETSF),
University of Rome "Tor Vergata".

 Posts: 3
 Joined: Wed Feb 24, 2010 7:59 pm
Re: About Gvectors
Ok, now I have that clear
Thank you very much for your reply and for being that fast!!
Cheers,
Paola

Paola Lupieri
PhD student
German Research School for
Simulation Sciences GmbH
Forschungszentrum Juelich
Germany
Thank you very much for your reply and for being that fast!!
Cheers,
Paola

Paola Lupieri
PhD student
German Research School for
Simulation Sciences GmbH
Forschungszentrum Juelich
Germany

 Posts: 5
 Joined: Tue May 05, 2015 3:32 pm
Re: About Gvectors
Dear YAMBO team,
Currently, I running yambo calculations with the GPL Version 3.4.1 Revision 3187 on a semiconductor system and found that when I try to set the MaxGvecs I can not use a value larger then 74521. The maximum value of MaxGvecs for my system is 175209.
My procedure is
yambo i V RL
setup # [R INI] Initialization
MaxGvecs= 175209 RL # [INI] Max number of Gvectors planned to use
Then I edit this line, lets say MaxGvecs=100000, and then I type
yambo N
the yambo.in and r_setup files are created.
In yambo.in I get
setup # [R INI] Initialization
MaxGvecs= 100000 RL # [INI] Max number of Gvectors planned to use
However when I check r_setup I got
.Input file : yambo.in
 setup # [R INI] Initialization
 BoseTemp= 0.000000 eV # Bosonic Temperature
 MaxGvecs= 74521 RL # [INI] Max number of Gvectors planned to use
Also, when I check the [02.03] RL shells I found that the first RL shell is 74521 (see attachement)
I do not find this problem if I use a MaxGvecs value smaller than 74521
I am wondering if I have to do something special when using fragmented files.
Many thanks in advance.
Miguel A Perez.
University of Oxford
UK
Currently, I running yambo calculations with the GPL Version 3.4.1 Revision 3187 on a semiconductor system and found that when I try to set the MaxGvecs I can not use a value larger then 74521. The maximum value of MaxGvecs for my system is 175209.
My procedure is
yambo i V RL
setup # [R INI] Initialization
MaxGvecs= 175209 RL # [INI] Max number of Gvectors planned to use
Then I edit this line, lets say MaxGvecs=100000, and then I type
yambo N
the yambo.in and r_setup files are created.
In yambo.in I get
setup # [R INI] Initialization
MaxGvecs= 100000 RL # [INI] Max number of Gvectors planned to use
However when I check r_setup I got
.Input file : yambo.in
 setup # [R INI] Initialization
 BoseTemp= 0.000000 eV # Bosonic Temperature
 MaxGvecs= 74521 RL # [INI] Max number of Gvectors planned to use
Also, when I check the [02.03] RL shells I found that the first RL shell is 74521 (see attachement)
I do not find this problem if I use a MaxGvecs value smaller than 74521
I am wondering if I have to do something special when using fragmented files.
Many thanks in advance.
Miguel A Perez.
University of Oxford
UK
You do not have the required permissions to view the files attached to this post.
 Daniele Varsano
 Posts: 2102
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: About Gvectors
Dear Miguel,
it is not vey clear to me what is going on.
MaxGvector it is meant to reduce the gvector with respect the default (the maximum).
So as you did:
this create the input files. You can edit it, and then run:
Anyway when changing the number of Gvector in order to create a new gvector database ((n)db.gops) you need to remove it from the SAVE directory.
Probably you have old ndb.gops database in the SAVE directory, so the code simply do nothing and report the number of the Gvector present in the old database.
From the report file you posted I presume that you cut by hand part of the report as I cannot see the electronic structure part.
Best,
Daniele
it is not vey clear to me what is going on.
MaxGvector it is meant to reduce the gvector with respect the default (the maximum).
So as you did:
Code: Select all
yambo i V RL
Code: Select all
yambo N
Probably you have old ndb.gops database in the SAVE directory, so the code simply do nothing and report the number of the Gvector present in the old database.
From the report file you posted I presume that you cut by hand part of the report as I cannot see the electronic structure part.
Best,
Daniele
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 5
 Joined: Tue May 05, 2015 3:32 pm
Re: About Gvectors
Dear Daniele,
Thanks for you fast reply.
Before running yambo i V RL I always deleted the following files contained in the SAVE directory
ndb.gops
ndb.kindx
ndb.kindx_fragment_1
ndb.kindx_fragment_2
then I follow the procedure described in my previous email.
I attach the yambo.in and r_setup files
Best,
Miguel A. Perez
Dept. of Materials
University of Oxford
UK
Thanks for you fast reply.
Before running yambo i V RL I always deleted the following files contained in the SAVE directory
ndb.gops
ndb.kindx
ndb.kindx_fragment_1
ndb.kindx_fragment_2
then I follow the procedure described in my previous email.
I attach the yambo.in and r_setup files
Best,
Miguel A. Perez
Dept. of Materials
University of Oxford
UK
You do not have the required permissions to view the files attached to this post.

 Posts: 5
 Joined: Tue May 05, 2015 3:32 pm
Re: About Gvectors
In my previous email the files were generated using the max value of MaxGvecs.
 Daniele Varsano
 Posts: 2102
 Joined: Tue Mar 17, 2009 2:23 pm
 Contact:
Re: About Gvectors
Dear Miguel,
what happen if you run yambo without using the variable MaxGvecs? Of course after having deleted the databases.
Just to be sure you new input file is named yambo.in and *NOT* yambo.in.txt.
Can you also post the l_setup?
Daniele
PS1: You can fill your signature in the user profile panel, so you do not need to write it in every post.
what happen if you run yambo without using the variable MaxGvecs? Of course after having deleted the databases.
Just to be sure you new input file is named yambo.in and *NOT* yambo.in.txt.
Can you also post the l_setup?
Daniele
PS1: You can fill your signature in the user profile panel, so you do not need to write it in every post.
Dr. Daniele Varsano
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/
S3CNR Institute of Nanoscience and MaX Center, Italy
MaX  Materials design at the Exascale
http://www.nano.cnr.it
http://www.maxcentre.eu/

 Posts: 5
 Joined: Tue May 05, 2015 3:32 pm
Re: About Gvectors
Dear Daniele,
I have run a extra calculations in order to figure out what is happening with my system.
Basically, I run a SCF and NSCF calculations with different values of Ecutoff:
50, 100, 150 and 200 Ry (the last value is the one I have been using in my calculations)
The total number of G vector per electron is (data form the QE output files)
Ecutoff Ry Gvect Total( times 48 since my system has 48 e)
50 458 21909
100 1296 61861
150 2372 113815
200 3651 175209
Once the SCF and NSCF calculation are completed, I proceed to run p2y and yambo without using the MaxGvecs flag, and found that
when I use an energy cutoff equal or larger than 150 Ry, yambo automatically set the MaxGvecs variable to 78177, as you can see in the
attached files. Moreover, with Ecutoff equal or larger than 150 Ry, yambo prints the following extra line at the end of the r_setup file:
 MaxGvecs= 78177 RL # [INI] Max number of Gvectors planned to use
It seems that the issue is related with the maximum number of Gvectors per e that yambo can use.
I trying to track within the source code where yambo sets the MaxGvecs, but I have not succeeded yet.
I really would appreciate you comments
Best,
Miguel A. Perez
Dept. of Materials
University of Oxford
I have run a extra calculations in order to figure out what is happening with my system.
Basically, I run a SCF and NSCF calculations with different values of Ecutoff:
50, 100, 150 and 200 Ry (the last value is the one I have been using in my calculations)
The total number of G vector per electron is (data form the QE output files)
Ecutoff Ry Gvect Total( times 48 since my system has 48 e)
50 458 21909
100 1296 61861
150 2372 113815
200 3651 175209
Once the SCF and NSCF calculation are completed, I proceed to run p2y and yambo without using the MaxGvecs flag, and found that
when I use an energy cutoff equal or larger than 150 Ry, yambo automatically set the MaxGvecs variable to 78177, as you can see in the
attached files. Moreover, with Ecutoff equal or larger than 150 Ry, yambo prints the following extra line at the end of the r_setup file:
 MaxGvecs= 78177 RL # [INI] Max number of Gvectors planned to use
It seems that the issue is related with the maximum number of Gvectors per e that yambo can use.
I trying to track within the source code where yambo sets the MaxGvecs, but I have not succeeded yet.
I really would appreciate you comments
Best,
Miguel A. Perez
Dept. of Materials
University of Oxford
You do not have the required permissions to view the files attached to this post.