format of the ORB file for splines

12 views
Skip to first unread message

Jindra Kolorenc

unread,
Jul 4, 2011, 9:26:48 AM7/4/11
to qwalk-developers
Hello!
I would like to use splined molecular orbitals in QWalk. I suppose the
way to go is EINSPLINE_MO these days. Is there a document describing
the format of the ORB file available somewhere? Or an example? Or is
Abinit_converter::write_orbitals() as close to a documentation as one
can get at this time?

This Abinit_converter::write_orbitals() looks quite readable, but I
don't entirely get two things:
a/ Is "resolution" really just a redundant information equal to
1/"npoints"?
b/ How is it with the boundary conditions of the actual wave function
data? Let's say that I have a 1D case at the Gamma point with npts=10,
that is, the points stored in the ORB file are 0,1,...9. Would the
periodicity in this case be psi(0)=psi(10) or psi(0)=psi(9)?

Thanks.
Jindra

Lucas Wagner

unread,
Jul 4, 2011, 11:34:00 AM7/4/11
to qwalk-de...@googlegroups.com
Hi Jindra!

I've been spending some time reworking the einspline stuff recently,
but haven't had time to really document. The format is pretty simple,
but I did just recently update it to have k-points included in the
file, so make sure you get that. Abinit_converter::write_orbitals()
is pretty much the only documenation at this point.

Answers to your questions:

a: yes
b: I believe that it's done as psi(0)=psi(10) from looking at the test
einspline functions, but I haven't checked it to make sure yet.

Cheers,

Lucas

Michal Bajdich

unread,
Jul 5, 2011, 2:35:17 PM7/5/11
to qwalk-de...@googlegroups.com

The input for BSPLINES CBSPLINES is as follows:

BSPLINE_MO
NMO int
MAGNIFY double
KVECTOR { double double double
   BAND {
      nameoftherealcubefile
      nameoftheimagcubefile
    }//band
 }//kvector

We use the gaussian cube file format and internal reading function originaly from Lucas.
The grids are then alocated to MULTISPLINE object and eikr factor is added as (we use 0, ..., N-1 points) value at  N point =value at 0 point.

for(int xx=0;xx<grid_real.GetDim(0);xx++){
    xyz(0)=xx*resolution_array(0);
    for(int yy=0;yy<grid_real.GetDim(1);yy++){
      xyz(1)=yy*resolution_array(1);
      for(int zz=0;zz<grid_real.GetDim(2);zz++){
        xyz(2)=zz*resolution_array(2);
        //cout <<xyz(0)<<"  "<<xyz(1)<<"  "<<xyz(2)<<endl;
        dcomplex eikr=exp(-I*dot(xyz, kpointt(m)));
        cgrid(xx,yy,zz)=(grid_real(xx,yy,zz)+I*grid_imag(xx,yy,zz))*eikr;
        //if(xx==10 && yy==15)
        //cout << xyz(2) <<"  "<<grid_real(xx,yy,zz)<<"  "<<grid_imag(xx,yy,zz)
        //  <<"  "<<cgrid(xx,yy,zz).real()<<"  "<<cgrid(xx,yy,zz).imag()<<"  "<<eikr.real()<<"  "<<eikr.imag()<<endl;
      }
    }
  }

Michal

Lucas Wagner

unread,
Jul 5, 2011, 2:56:16 PM7/5/11
to qwalk-de...@googlegroups.com
Michal,

As I mentioned, I used your implementation to rewrite a new one that
fixed some of the issues we were having with the old one (including
the proliferation of hundreds of cube files), so I suggest that people
use EINSPLINE_MO instead.

Cheers,

Lucas

kolo...@fzu.cz

unread,
Jul 5, 2011, 3:52:45 PM7/5/11
to qwalk-de...@googlegroups.com
Lucas and Michal,

Thank you for the quick answers, I should have all the info I need now. If
I hit a snag I'll ask again.

Regards,
Jindra

>> The grids are then alocated to MULTISPLINE object and eikr factor
>> is added as (we use 0, ..., N-1 points) value at N point =value
>> at 0 point.

>>> Abinit_converter::write_orbitals() is pretty much the only

Reply all
Reply to author
Forward
0 new messages