Skip to content

Bakhtatou/ecalj

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

=== ecalj package === (this document is checked at mar2013)

ecalj is a firts-principle electronic structure calculation package in f90.
Version ctrl by git. Python2.x is used.
==================================================================
homepage is at http://pmt.sakura.ne.jp/wiki/,
  (not so much documents in English yet. not well-organized yet...)
https://github.com/tkotani/ecalj
===================================================================

##### What we can do by ecalj package.#####

(1)All electron full-potential PMT method (LAPW+LMTO)
   Related source codes are in ecalj/lm7K/ .
   A command ecalj/lm7K/ctrlgen2.py can generate 'standard input file (ctrl file)' 
   from a given crystal structure file, named as ctrls file. 
   Relaxiation of atomic possistion is possible. GGA/LDA  and LDA+U are implemented.
   A converter between POSCAR(VASP) and ctrls is included in ~/ecalj/StructureTool/.
   We have lmf-MPIK (MPI k-parelell verion).

(2)GW method, especially, PMT-QSGW method.
   That is, the Quasiparticle self-consistent GW method (QSGW) based
   on the PMT method. 
   In addion, we can calculate dielectric functions, spin fluctions,
   spectrum function of the Green's functions and so on.
   GW-related codes are in ecalj/fpgw/.
   
   Recently, I renewed some part of algolism of GW/QSGW calculations
   (some ideas are taken from from PRB.81,125102(2010) and Copmuter Physics Comm. 176(2007)1-13).
   ---> this is better than old versions; speed, memory (file size),
   and accuracy for anisortopic systems.
   For comparison, you can use old version in .git (gitk --all and check it out).

(3) We use lmf-MPIK and mpi version of hvccfp0,hx0fp0_sc,hsfp0_sc,
   although we have room to improve it.


##### Install #####
we have four steps
(0) get ecalj package and get tools.
Then we do three make procedure,
that is, (1) for single-core LDA part, (2) for MPIK LDA part, (3) for MPIK GW part.
In the followings, we assume gfortran in ubuntu, although with
instructions for ifort, and others.

---
(0) Take requied tools and ecalj source.
Get ecalj package by
>git clone https://github.com/tkotani/ecalj.git # Get source code for ecalj.
or get it in *.zip from the page https://github.com/tkotani/ecalj
(push zip button).

---Let us assume you use ubuntu. ---
>sudo apt-get install git  gitk #version control and to get source from github)
>sudo apt-get install gitk #git gui 'gitk --all' is useful. do it at ecal/.
>sudo apt-get install gfortran      # GFORTRAN
>sudo apt-get install openmpi-bin openmpi-dev     # MPI 
>sudo apt-get install libfftw3-3     or something else # FFTW
>sudo apt-get install libblas3gf     or something else # BLAS
>sudo apt-get install liblapack3gf   or something else  # LAPACK
>sudo apt-get install etags csh bash
python 2.x is also assumed (usually already in ubuntu).


(1) For single core LDA part (it is in ecalj/lm7K/)
Move to ecalj/lm7K/, then do "make PLATFORM=gfortran". Then make process start.
The main makefile is lm7K/Makefile, and it includes lm7K/MAKEINC/Make.inc.gfortran.
Set LIBLOC in Make.inc.gfortran when you use different math libraries.
For other cases, run "make PLATFORM=foobar" where foobar can be ifort
or something else. foobar corresponds to the include file 
lm7K/MAKEINC/Make.inc.foobar. For ifort, there are several MAKEINC/Make.inc.ifort*
(not _mpik*) with which we installed to machines. 
You can choose one of them or you can set your own Make.inc.ifort.*
(compilar, compilar options, math library).
I recommend "make PLATFORM=ifort.simple" for ifort. But you may need
to add -heap-arrays 1 (for large calculations. Because we use large stacksize).

Warning messages like ": warning: ignoring old commands for target `/vxcnls.o'" is
just because of problem of Makefile. you can neglect this.

Current ecalj with gfortran4.6 or 4.7 works fine with FFLAGS=-O2,
but failed with FFLAGS=-O3.

Parallel make as
>make -j4 PLATFORM=gfortran
may speed it up for multicore machines. But it stops because
of dependency is not well-described in current Makefile. 
In such case, repeat it a few times, or repeat it without -j4.

Then do "make PLATFORM=gfortran install"
This just copy required files to your ~/bin.


(2) For MPI LDA part.
lmf-MPIK is now needed for gwsc. To make it, do
"make PLATFORM=gfortran_mpik". lmfgw-MPIK is also generated, but it do
not work now (9thjan2013. need to fix it; but not problem to do calculations).
For ifort, set PLATFORM=ifort_mpik.simple
Then ecalj/lm7K/MAKEINC/Make.inc.ifort_mpik.simple is used.
You may need to add -heap-arrays 1 (for large calculations. Because we
use large stacksize) to ecalj/lm7K/MAKEINC/Make.inc.ifort_mpik.simple

Clean up:
If something wrong. do "make clean" or "make cleanall" and start over.
Look into Makefile if you like to know what they do.
"make cleanall" removes all *.o *.a modules, and binaries.

---
*Installation test for lm7K
>make check
at ecalj/lm7K. It may take five minutes or so. 
If you see "All test passed" finally, your installation is OK.

* Move binaries to your bin by 
>make install
at ecalj/lm7K. It just moves all requied binaries to your ~/bin.
In advance, you have to make your bin, and add ~/bin to  your path
(e.g. export PATH=$HOME/bin:$PATH in .bashrc. then login again or source .bashrc)


(3) Installation for fpgw/
At ecalj/fpgw/exec/ directory, you have to edit make.inc.
Especially note option, -heap-arrays for ifort
(to avoid Segmentation fault due to stacksize limit (ulimit -a), it is
required. Or you can set ulimit -s unimited).
 
Then you have to run 
>make
>make install
>make install2
Before this, you have to set blas and lapack in fpge/exec/make.inc.
(for ifort, -mkl is enough. LIBMATH= should be the same as that in Make.inc.*.
"make install" copy requied files to your ~/bin.
-------------
*Installation test for fpgw/

At fpgw/exec/
>make check
(this is equivalent to cd ../TESTinstallGW;./testgw.py --enforce --all) 

It makes temp_* directories under fpgw/TESTinstallGW/.
At the directory, 
>./testgw.py --help
shows help for the test controller testgw.py

All tests will require ~10min.  (nio_gwsc takes ~300sec)
In cases, nio_gwsc fails. However, as long as the difference is small,
not need to care its fail sign. (a minor bug in test).


#######  Usage minimum. (e.g, PMT-QSGW(gwsc) for si) ###################
-------------------------------------------
(1) Write structure file ctrls.si by hand 
    (you can have ctrls from POSCAR(VASP) with vasp2ctrl in ecalj/StructureTool/.)
(2) conver ctrls.si to ctrl.si by ctrlgen2.py si --eh1 --nk=6 --tratio=1.0 
   (do -help). Then you have default ctrl.si (rename ctrlgen2.ctr.si to ctrl.si). 
   Modify it if reqiured. We don't need empty sphere now. 
   pwemax specify number of APW. It is recommended to know
   meanings of parameters in the generated ctrlgen2.ctr.si. 
   You may need to modify ctrl.si, especially initial condition for magnetic cases.
   For examle, you set MMOM=0,0,1.5,0 for Niup, and MMOM=0,0,-1.5 for
   Nidn for nspin=2 (antiferromagnetic case). 
   (initial condition of magnetic moment distribution. unit is the
   difference of number of electrons n_up-n_down).
(3) Run "lmfa si" to prepare atom.
(4) For PMT-QSGW, make GWinput.tmp by mkGWIN_v2 si 
    (just put BZ division n1n2n3). Edit GWinput.tmp and rename it as GWinput.
(5) Then run a script gwsc, e.g. "gwsc 5 si -np 5" (5+1 iteration with
    6 nodes).
(6) To continue calculation do gwsc 5 si -np 5 again.
    (you have to have ctrl.si rst.si QGpsi ESEAVR sigm.si)
    (Then 0th iteration is skipped---thus e have just five iteration).

(7) For band plot and tdos plot, please look into samples in
    job_band and job_tdos in ecalj/CMD22sample/*. 
    For qsub, you have to edit test.sh for your machine.
-------------------------------------------


About

The latest source of ecalj (electronic structure calculation) is the master branch in ecalj.git.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published