Skip to content

Shifted grids generation in ypp does not work properly if input coordinates are in alat #202

@sangallidavide

Description

@sangallidavide

I checked the code.

It seems to me that the issue is in this file:
https://github.com/yambo-code/yambo/blob/master/ypp/k-points/k_grid_printer.F

If coo_in=="alat" in input then this section of the file

 do ik=1,nk
   !
   v=k(ik,:)
   if (trim(coo_in)=="rlu") call c2a(v_in=v,mode="ka2i")
   if (trim(coo_in)=="cc")  call c2a(v_in=v,mode="kc2i")
   !

does nothing.

I think a proper coding should be

 do ik=1,nk
   !
   v=k(ik,:)
   if (trim(coo_in)=="rlu") call c2a(v_in=v,mode="ka2i")
   if (trim(coo_in)=="cc")  call c2a(v_in=v,mode="kc2i")
   if (trim(coo_in)=="alat") then                                       
     v=v/(alat_used_for_output/2./pi)                                   
     call c2a(v_in=v,mode="kc2i")                                       
   endif                                                                
   !

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions