Implementing new correlation functional

Documentation, Web site and code modifications

Moderators: baguetl, routerov

Locked
teepanis
Posts: 1
Joined: Thu Aug 18, 2016 4:18 am

Implementing new correlation functional

Post by teepanis » Thu Aug 18, 2016 4:32 am

Greetings,

I am a noob, but would like to implement a new correlation functional (local-density) into Abinit.

Where (i.e. which source file) should I start?

Sincerely,

Teepanis Chachiyo.

PS. The functional was featured in Physics Today's article, the "Chachiyo's formula".
http://scitation.aip.org/content/aip/magazine/physicstoday/news/10.1063/PT.5.7285

gonze
Posts: 412
Joined: Fri Aug 14, 2009 8:29 pm

Re: Implementing new correlation functional

Post by gonze » Fri Aug 19, 2016 9:40 pm

Dear Teepanis Chachiyo,

Well, usually the addition of new functionals in ABINIT is done through the LibXC library. Have you considered
talking with the developers of this library ?

If you want nevertheless to make a native implementation of your functional in ABINIT, here is the recipe :
(1) You should define a new routine for your functional, that should be like several of those contained in the
src/41_xc_lowlevel directory (e.g. xcxspol.F90).
(2) Then you should call it from drivexc.F90 , using a value of ixc
(http://www.abinit.org/doc/helpfiles/for ... s.html#ixc)
that is not yet used. Actually, since your functional is a L(S)DA, it should have been given a value of ixc in the 1-10 range ...
except that all slots in that range are already taken. So, why not ixc=51 ?
(3) Allow ABINIT to accept ixc=51 . For this you need to modify at least chkinp.F90 : replace
& 'ixc',dt%ixc,33,(/0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20,21,22,23,24,26,27,31,32,33,34,40,41,42,50/),-1,0,iout)
by
& 'ixc',dt%ixc,34,(/0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,20,21,22,23,24,26,27,31,32,33,34,40,41,42,50,51/),-1,0,iout)
Other routines should be made to accept this new value try, and you will see where ABINIT complains ...).
(4) Of course document your modification, by editing the abinit_vars.yml file, see doc/input_variables/README.txt
(5) Create a reference Input file and the corresponding Output file, see the directory tests/v7

Then, in order to make your development join the ABINIT, the best would be for you to join the developer team, so that we can give you access to the ABINIT repository.
There are many information for developers at http://dev.abinit.org/ .
However, we have just switched from "bzr" to "git", so that several documents have to be updated ...

Best wishes,
Xavier Gonze

Locked