Skip to content

Commit

Permalink
LDA+U example ecalj/MATERIALS/GdNldau
Browse files Browse the repository at this point in the history
  • Loading branch information
tkotani committed Apr 7, 2015
1 parent d7e5d34 commit 3d194db
Show file tree
Hide file tree
Showing 5 changed files with 237 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MATERIALS/GdNldau/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
See
file:///home/takao/ecalj/Document/BACKUP/MarksOriginalDoc/fp.html#ldaplusu
to run LDA+U.
And at the LDA+U section in ecalj/README.md.
201 changes: 201 additions & 0 deletions MATERIALS/GdNldau/ctrl.gdn
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
### This is generated by ctrlgenM1.py from ctrls

### Perform lmf --input to see all effective category and token.
### For tokens, See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html, altough
### ecalj is a little different from Mark's lmf package in many points.
###
### CAUTION: For GW calculations, you have to generate GWinput by mkGWIN_lmf2.
### Repeat it when you change MTO settings ---> <PRODUCTBASIS> section is affected
###
VERS LM=7 FP=7 # version check. Fixed.

IO SHOW=T VERBOS=35 TIM=0,0 #Use TIM=3,3 or more for debug (to show which routines go through).
# SHOW=T shows readin data (and default setting at the begining of console output)
# It is useful to check ctrl is read in correctly or not (equivalent with --show option).
# larger VERBOSE gives more detailed console output.

SYMGRP find # 'find' evaluate space-group symmetry (just from lattice) automatically.
#
# Usually 'find is OK', but lmf may use lower symmetry
# if you did not supply accurate structure.
# 'lmchk foobar --pr60' shows, what symmetry is recognized.
# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html#SYMGRPcat
# To read its results.

%const kmxa=5 # =radial degree of freedom to expand eigenfuncitons in tail sites.
# kmxa=5 is good for pwemax \sim 4 or less.
# larger kmxa is better but time-consuming. A rule of thumb: kmxa>pwemax in Ry.

# Enlarge this, when your enlarge pwemax, and check little dependence on kmxa.
%const nsp=2 nk=2
%const a=4.977/0.529177249
STRUC ALAT={a} PLAT= 0 .5 .5 .5 0 .5 .5 .5 0
NL=4 NBAS= 2 NSPEC=2
SITE ATOM=Gd POS= 0 0 0
ATOM=N POS= .50 .50 .50
SPEC
ATOM=Gd Z=64 R=2.69
EH=-1 -1 -1 -1 RSMH=1.34 1.34 1.34 1.34
EH2=-2 -2 -2 RSMH2=1.34 1.34 1.34
KMXA={kmxa} LMX=3 LMXA=4 NMCORE=1
IDU= 0 0 0 2 UH= 0 0 0 0.515 JH=0 0 0 0
MMOM=0 0 0 7
#MMOM=0 0 1 0 #s,p,d,f initial condition
#NOTE: lmfa(rhocor) generates spin-averaged rho for any MMOM,jun2012
#Q=0 0.5 1 0 #s,p,d,f initial condition
#MMOM and Q are to set electron population. grep conf: in lmfa output

ATOM=N Z=7 R=1.87
EH=-1 -1 -1 RSMH=0.94 0.94 0.94
EH2=-2 -2 RSMH2=0.94 0.94
KMXA={kmxa} LMX=3 LMXA=4 NMCORE=1
#MMOM=0 0 1 0 #s,p,d,f initial condition
#NOTE: lmfa(rhocor) generates spin-averaged rho for any MMOM,jun2012
#Q=0 0.5 1 0 #s,p,d,f initial condition
#MMOM and Q are to set electron population. grep conf: in lmfa output



% const pwemax=3 nk1=4 nk2=4 nk3=4 nit=30 gmax=12 nspin=2 metal=3 so=0 xcfun=1 ssig=1.0
BZ NKABC={nk1} {nk2} {nk3} # division of BZ for q points.
METAL={metal}
# METAL=3 is safe setting (double path method but not repeat diagonalization),
# no problem even for insulator.
# For insulator, METAL=0 may be a little faster.

DOSMAX=1.5 NPTS=2001 SAVDOS=T
# These are used to plot total dos, and pdos.
# DOSMAX: is the maximum of the total dos plot. It is relative to the Fermi energy.
# Corresponding mimimum is automatically chosen to cover all valence states.
# NPTS: division of plots. To get a high-energy resolution plot, use large NPTS.
#
# To get better plot, Use large NKABC (even after converged).
# Larger NKABC may give smoother plot. Use large enough NKABC.
#
# NOTE: current version automatically enfoce TETRA=T and MEAL=3 for --pdos and --tdos
# ---TOTAL DOS plot---
# you can use job_tdos_nspin*.
# It just do lmf --tdos foobar; then you have dos.tot.foobar, and we can plot it.
#
# --- PDOS plot --
# you can do folloings by job_pdos_nspin*
# run lmf --pdos foobar (this stops quickly, or write SYMOPS (only e) in it by hand.)
# echo 1| qg4gw (this is needed to generate QGpsi for no symmetry).
# lmf --pdos foobar (it is a little time-consuming since we do not use symmetry).
# lmdos --pdos foobar

# KNOWN BUG: For a hydrogen in a large cell, METAL=0 for (NSPIN=2 MMOM=1 0 0)
# results in non-magnetic solution. Use METAL=3 for a while in this case.

# TETRA=0 N=-1 W=0.001 FSMOM below
# are for molecules. No tetrahedron integration. (Smearing))
# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html
%const bzw=1e-4 fsmom=0.0
#TETRA=0
#N=-1 #Negative is the Fermi distribution function W= gives temperature.
#W=0.001 #W=0.001 corresponds to T=157K as shown in console output
#W=0.01 is T=1573K. It makes stable convergence for molecule.
#Now you don't need to use NEVMX in double band-path method,
#which obtain only eigenvalues in first-path to obtain integration weights
#, and accumulate eigenfunctions in second path.

#FSMOM={fsmom} real number (fixed moment method)
# FSMOM is for he fixed-spin moment method.
# a spin-dependent potential shift is added to constrain the total magnetic moment to value
# assigned by FSMOM=. Default is NULL (no FSMOM). FSMOM=0 works now (takao Dec2010)
# NOTE: current version is for ferro magnetic case (total mag moment) only.
#FSMOMMETHOD=0 #only effective when FSMOM exists. #Added by t.kotani on Dec8.2010
# =0: original mode suitable for solids.(default)
# =1: discrete eigenvalue case. Calculate bias magnetic field from LUMO-HOMO gap for each spins.
# Not allowed to use together with HAM_SO=1 (L.S).
# It seems good enough to use W=0.001. Smaller W= may cause instability.
#For Molecule, you may also need to set FSMOM=n_up-n_dn, and FSMOMMETHOD=1 below.


# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html#HAMcat for tokens below.

#NOINV=T (for inversion symmetry)
# Suppress the automatic addition of the inversion to the list of point group operations.
# Usually the inversion symmetry can be included in the determination of the irreducible
# part of the BZ because of time reversal symmetry. There may be cases where this symmetry
# is broken: e.g. when spin-orbit coupling is included or when the (beyond LDA)
# self-energy breaks time-reversal symmetry. In most cases, lmf program will automatically
# disable this addition in cases that knows the symmetry is broken
#

#INVIT=F
# Enables inverse iteration generate eigenvectors (T is the default).
# It is more efficient than the QL method, but occasionally fails to find all the vectors.
# When this happens, the program stops with the message:
# DIAGNO: tinvit cannot find all evecs
# If you encounter this message set INVIT=F.
# T.Kotani think (this does not yet for lm7K).

ITER MIX=A2,b=.3,n=3 CONV=1e-5 CONVC=1e-5 NIT={nit}
#ITER MIX=B CONV=1e-6 CONVC=1e-6 NIT={nit}
# MIX=A: Anderson mixing.
# MIX=B: Broyden mixing (default).
# Unstable than Anderson mixing. But faseter. It works fine for sp bonded systems.
# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html#ITERcat

HAM NSPIN={nspin} # Set NSPIN=2 for spin-polarize case; then set SPEC_MMOM (initial guess of magnetic polarization).
FORCES=0 # 0: no force calculation, 1: forces calculaiton
GMAX={gmax} # this is for real space mesh. See GetStarted. (Real spece mesh for charge density).
# Instead of GMAX, we can use FTMESH.
# You need to use large enough GMAX to reproduce smooth density well.
# Look into sugcut: shown at the top of console output.
# It shows required gmax for given tolelance HAM_TOL.
REL=T # T:Scaler relativistic, F:non rela.
XCFUN={xcfun}
# =1 for VWN.
# =2 Birth-Hedin (if this variable is not set).
# (subs/evxc.F had a problem when =2 if rho(up)=0 or rho(down)=0).
# =103 PBE-GGA

PWMODE=11 # 0: MTO basis only (LMTO)
# 11: APW+MTO (PMT)
# 12: APW basis only (LAPW)
#
PWEMAX={pwemax} # (in Ry). When you use larger pwemax more than 5, be careful
# about overcompleteness. In cases, e.g.Fe, you may need larger KMXA for larger PWEMAX.
ELIND=0 # this is to accelarate convergence. Not affect to the final results.
# For sp-bonded solids, ELIND=-1 may give faster convergence.
# For O2 molecule, Fe, and so on, use ELIND=0(this is default).

FRZWF=F #If T, fix augmentation function. This is worth to test in future.
# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html#HAMcat

#For LDA+U calculation, see http://titus.phy.qub.ac.uk/packages/LMTO/fp.html#ldaplusu

#For QSGW. you have to set them. Better to get some samples.
RDSIG=12
SIGP[MODE=3]
# Now we use no cutoff procedure for Sigma-Vxc in lmf. (only in emax_sigm is effective in GWinput).
# default:SIGP_EMAX=9999.
RSRNGE=15.0 #If you see Exit -1 rdsigm: Bloch sum derivates mor..., Set this large enough.
# This occurs when you set large n1n2n3 in GWinput, and/or large cell.
# Reducing RSRNGE makes speed up a little ---> no effect to final results, but have chance
# to show the above message.

ScaledSigma={ssig} # ScaledSigma* \Sigma + (1-ScaledSigma)*Vxc^LDA
# This is a RPA-level hybridyzation method, in contrast to the B3LYP (hartree-fock level hybridyzation)

SO={so} #default = 0
#Spin-orbit coupling (for REL=1)
#0 : no SO coupling
#1 : Add L.S to hamiltonian (but non-colinear density yet).
#2 : Add Lz.Sz only to hamiltonian
#
# For QSGW with SO=1 pertubation, run SO=1 with --rs=1,0 with NIT=1,
# starting from converged rst.* sigm.* ESEAVR, and
# QpGpsi (it is easily generated by echo 1|qg4gw if you lost it).

OPTIONS PFLOAT=1 #not need to change this. Just for backward compatibility.

# Q=band (this is quit switch if you like to add)


# Relaxiation sample
#DYN MSTAT[MODE=5 HESS=T XTOL=.001 GTOL=0 STEP=.015] NIT=20
# See http://titus.phy.qub.ac.uk/packages/LMTO/tokens.html#DYNcat

5 changes: 5 additions & 0 deletions MATERIALS/GdNldau/ctrls.gdn
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%const nsp=2 nk=2
%const a=4.977/0.529177249
STRUC ALAT={a} PLAT= 0 .5 .5 .5 0 .5 .5 .5 0
SITE ATOM=Gd POS= 0 0 0
ATOM=N POS= .50 .50 .50
2 changes: 2 additions & 0 deletions MATERIALS/GdNldau/occnum.gdn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 1 1 1 1 1 1
0 0 0 0 0 0 0
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,3 +747,28 @@ There is an example MATERIALS/SiSigma/
============================================================
</pre>

====================
LDA+U, partially occupied core-hole
---------------------
<pre>
----------------
See
file:///home/takao/ecalj/Document/BACKUP/MarksOriginalDoc/fp.html#ldaplusu
We need to add lines such as
IDU= 0 0 2 2 UH= 0 0 0.1 0.632 JH= 0 0 0 0.055
for each SPEC_ATOM, And initial occnum.foobar file.
An example is in ecalj/MATERIALS/GdNldau/

When you just like to generate initial condition for gwsc,
you have to remove (or comment out) IDU before the 1st iteration
with sigm file, because sigm may already can contain LDA+U kind of effect.
(Thus you may need to modify gwsc or stop it at the 0th iteration,
and then remove IDU...)

Caution:
We need the initial condition file such as occnum.gdn for LDA+U.
(you may need to set "% real" at the begninig of the file).
Note that definition of spherical harmonics is in ecaljmanual.pdf.
(real harmonics is usual ones used in jobpdos).
Look for the keyword ldau in fp/lmfp.F -> sudmtu.F which read occnum.gdn.
</pre>

0 comments on commit 3d194db

Please sign in to comment.