overview of openmx: implementation and practical aspects · pdf fileintroduction 2....

33
OpenMX/QMAS WS08, 21th April 2008 in JAIST Taisuke Ozaki (JAIST) 1. Introduction 2. Implementation Overview of OpenMX: Implementation and practical aspects 3. Ongoing and planned works 4. Summary Total energy, forces, numerical integrations, basis functions, getting SCF, geometry optimization, parallelization, codes.

Upload: phamdieu

Post on 26-Feb-2018

230 views

Category:

Documents


3 download

TRANSCRIPT

Open

MX

/QM

AS W

S08, 21th

April 2008 in JA

IST

Tai

suke

Oza

ki (J

AIS

T)

1.Introduction

2.Im

plemen

tation

Overview of OpenMX:

Implementation and practical aspects

3.Ongoing and planned works

4.Summary

Tota

l en

ergy, fo

rces

, num

eric

al inte

gra

tions,

bas

is funct

ions, g

etting S

CF, geo

met

ry o

ptim

izat

ion,

par

alle

liza

tion, co

des

.

Short history of OpenMX

Improvement of

geometry optimization

The

dev

elopm

ent of th

e co

de

has

bee

n sta

rted

from

the

mid

dle

of 2000.

The

firs

t public

rele

ase

was

done

at 2

003 Jan

uar

y, an

d

thirte

en rel

ease

sw

ere

mad

e

until now

.

The

code

has

bee

n ste

adily

dev

eloped

as sh

ow

n the

figure

,

and the

com

munity itsel

f has

bee

n a

lso g

row

ing.

The number of lines of the code

Large im

provement

of parallelization

NC-D

FT

LDA+U

Electric polarization

Transport

Contributors

•T. O

zaki (J

AIS

T)

•H

. K

ino (N

IMS)

•J. Y

u (SN

U)

•M

. J. H

an(U

C,D

avis

)

•N

. K

obay

ashi (T

sukuba

Univ

.)

•M

. O

hfu

ti (Fujitsu)

•F. Is

hii (K

anaz

awa

Univ

.)

•T. O

hw

aki (N

issa

n)

•H

. W

eng (JA

IST)

•K

. Ter

akura

(JA

IST)

Open

MX

Open

source package for Material eX

plorer

The m

emory requirementscales as O(N

),

and the computational costis proportinal to

the third power of number of atoms or linearly.

OpenMXis based on LDA, GGA,

LDA+U, local pseudo-atomic basis

functions, and norm-conserving

peudopotentials.

Features of Ver. 3.3

Implementation of OpenMX

•Total energy

•Numerical integration

•Forces

•Basis functions

•Getting SCF

•Geometry optimization

•Parallelization

•Handling of the code

Total energy No.1

The total energy is given by that of the conventional DFT. The reorganization

of the Coulomb energiesis a key

for the accurate implementation

Total energy No.2

The

reorg

aniz

atio

n o

f Coulo

mb e

ner

gie

s giv

esth

ree

new

ener

gy ter

ms.

The

neu

tral

ato

m e

ner

gy

Diffe

rence

char

ge

Har

tree

ener

gy

Scr

eened

core

-core

rep

uls

ion e

ner

gy Neu

tral

ato

m p

ote

ntial

Diffe

rence

char

ge

Total energy No.3

So, th

e to

tal en

ergy is giv

en b

y

} }

Eac

h ter

m is ev

aluat

ed b

y u

sing a

diffe

rent num

eric

al g

rid.

Spher

ical

coord

inat

e in

mom

entu

msp

ace

Rea

lsp

ace

regula

r m

esh

Rea

l sp

ace

fine

mes

h

Projector expansion of V

naNo.1

wher

e a

set of ra

dia

l fu

nct

ions {R

lζ} is

an

orthonorm

al

set def

ined

by a

norm

∫r2drRV

na,kR′

for ra

dia

l fu

nct

ions R a

nd R′

, an

d is ca

lcula

ted b

y the

follow

ing G

ram

-Sch

mid

torthogonal

izat

ion:

Vnate

nds to

be

ver

y d

eep, le

adin

g

to a

ser

ious num

eric

al p

roble

m.

Vnaca

n b

e ex

pan

ded

by p

roje

ctors

:

Thre

e ce

nte

r in

tegra

ls w

ith V

naca

n b

e tran

sform

ed to p

roduct

s

of tw

o c

ente

r in

tegra

ls b

y the

pro

ject

or ex

pan

sion m

ethod.

TO

and H

.Kin

o, PR

B 7

2, 045121 (2005)

Projector expansion of V

naNo.2

Conver

gen

ce p

roper

ties

Com

par

ison b

etw

een n

on-p

roje

ctor

and p

roje

ctor m

ethods

Two center integrals

Fourier

-tra

nsf

orm

atio

n o

f bas

is funct

ions

e.g., o

ver

lap inte

gra

l

Forces

Easy calc.

See the left

Forc

es a

re a

lway

s an

alytic

at a

ny g

rid

finen

ess an

d a

t ze

ro tem

per

ature

, ev

en if

num

eric

al b

asis

funct

ions an

d n

um

eric

al g

rids.

Basis functions in O

penMX

1) Primitive functions

gen

erat

ed b

y a

confinem

ent sc

hem

e

2) Optimized functions

by a

n o

rbital

optim

izat

ion m

ethod

Primitive basis functions

1. Solv

e an

ato

mic

Kohn-S

ham

eq.

under

a c

onfinem

ent pote

ntial

:

2. C

onst

ruct

the

norm

-conse

rvin

g

pse

udopote

ntial

s.

3. Solv

e gro

und a

nd e

xci

ted sta

tes fo

r th

e

the

peu

dopote

ntial

s.

s-orb

ital

of oxygen

In m

ost c

ases

, th

e ac

cura

cy a

nd e

ffic

iency

can

be

controlled

by

Cutoff radius

Number of orbitals

PR

B 6

7, 155108 (2003)

PR

B 6

9, 195113 (2004)

Convergence with respect to basis functions

mole

cule

bulk

The

two p

aram

eter

s ca

n b

e re

gar

ded

as var

iational

par

amet

ers.

Benchmark of primitive basis functions

Gro

und sta

te c

alcu

lations of dim

er u

sing p

rim

itiv

e bas

is funct

ions

All the

succ

esse

s an

d fai

lure

s by the

LD

A a

re rep

roduce

d

by the

modes

t size

of bas

is funct

ions (D

NP in m

ost

cas

es)

Optimization of basis functions

Pra

ctic

ally

, th

e ac

cura

cy a

nd e

ffic

iency

can

be

controlled

by

Num

ber

of bas

is funct

ions

Cuto

ff rad

ius

But, ther

e is

anoth

er o

ne

var

iational

par

amet

er:

Rad

ial sh

ape

If the

radia

l sh

ape

can b

e optim

ized

, it is ex

pec

ted that

the

hig

h a

ccura

cy w

ill be

atta

inab

le w

ith a

sm

all num

ber

of bas

is funct

ions.

Variationaloptimization of basis functions No.1

One-

par

ticl

e w

ave

funct

ions

Contrac

ted o

rbital

s

The

var

iation o

f E w

ith res

pec

t to

cw

ith fix

ed a

giv

es

Reg

ardin

g c

as dep

enden

t var

iable

s on a

and a

ssum

ing K

S

eq. is

solv

ed sel

f-co

nsisten

tly w

ith res

pec

t to

c, w

e hav

e

PR

B 6

7, 155108 (2003)

Variationaloptimization of basis functions No.2

The

bas

is funct

ions ca

n b

e optim

ized

in the

sam

e

pro

cedure

as fo

r th

e geo

met

ry o

ptim

izat

ion.

Primitive vs. O

ptimized

Energy convergence

Radial shape of carbon atom

Sin

ce the

fluorine

attrac

ts e

lect

rons sittin

g p

-orb

ital

s of ca

rbon,

the

p-o

rbital

larg

ely shrinks.

Notes in LCPAO

•It is not a complete basis

•A m

odest accuracy is attainable in practical calculations

•The double valence plus a single polarization functions

are an optimum choice.

•The use of many basis functions for dense bulk system

s

tends to be problematic due to the overcompleteness.

RMM-D

IIS for obtaining SCF

In m

ost c

ases

, th

e Res

idual

Min

imiz

atio

n M

ethod in the

direc

t In

ver

sion

of Iter

ativ

e su

bsp

ace

(RM

M-D

IIS) in

mom

entu

m spac

e w

ork

s w

ell.

Res

idual

vec

tors

Ker

ker

met

ric

with the

Ker

ker

fac

tor

Let

us as

sum

e th

e re

sidual

vec

tor at

the

nex

t step

is e

xpre

ssed

by

Min

imiz

e

with res

pec

t to

α

optim

um

αs

Assume an optimum charge is given by

G.K

ress

e an

d J. Furthm

euller

, PR

B 5

4, 11169 (1996).

Comparison of mixing m

ethods

Anderson m

ixing

→ eq

uiv

alen

t to

RM

M-D

IIS

Broyden m

ixing

→ 

RMM-D

IIS, Anderson, Broyden m

ethods are all equivalentfrom

the mathem

atical point of view and based on a quasi-N

ewton m

ethod.

→ eq

uiv

alen

t to

RM

M-D

IIS

V. Eyer

t, J. C

om

p.P

hys. 1

24, 271 (1996)

A way for im

proving the SCF convergence

→ 

Broyden m

ethod

If G

can

be

store

d, th

e Bro

yden

met

hod m

ay b

e th

e bes

t m

ethod

among them

. H

ow

ever

, G

is to

o lar

ge

to b

e store

d. Thus, fro

m

the

theo

retica

l poin

t of vie

w a

rea

sonab

le im

pro

vem

entof th

e

conver

gen

ce c

an b

e obta

ined

by incr

easing th

e num

ber

of of th

e

pre

vio

us step

s.

In fac

t, the

conver

gen

t re

sults w

ere

obta

ined

using 3

0-5

0 p

revio

us

step

s in

the

RM

M-D

IIS for 20 d

ifficu

lt system

s th

at the

SCF is har

dly

obta

ined

using a

sm

alle

r num

ber

of pre

vio

us step

s.

The

resu

lts ca

n b

e fo

und in h

ttp://w

ww

.jai

st.a

c.jp

/~t-oza

ki/la

rge_

exam

ple

.tar

.gz

Geometry optimization

The

geo

met

ry o

ptim

izat

ion in O

pen

MX

is bas

ed o

n q

uas

i N

ewto

n

type

optim

izat

ion m

ethods . F

our kin

d o

f m

ethods ar

e av

aila

ble

.

Bro

yden

-Fle

tcher

-Gold

farb

-Shan

no

(BFG

S) m

ethod

Treatm

ent of H

DII

S BFG

S RF

(rat

ional

funct

ion)

EF

(eig

envec

tor fo

llow

ing)

H=I

BFG

SBFG

S+RF

BFG

S p

lus m

onitoring

of ei

gen

val

ues

of H

If the

red p

art is

positive,

the

positive

def

initiv

enes

s of H

iskep

t.

Mole

cule

sBulk

s

The comparison of four quasi Newton m

ethods

It turn

ed o

ut th

at the

EF m

ethod is ro

bust

and e

ffic

ient, w

hile

the

RF a

lso show

s co

mpar

able

per

form

ance

.

The

input file

s an

d o

ut file

s use

d in the

calc

ula

tions sh

ow

n in the

figure

can

be

found in "open

mx3.3

/work

/geo

opt_

exam

ple

".

Parallelization

•The

par

alle

liza

tion is bas

ical

ly d

one

by a

1D

-dom

ain d

ecom

position.

•A

lso a

diffe

rent par

alle

liza

tion

schem

e is c

onsider

ed d

epen

din

g o

n

the

dat

a stru

cture

in e

ach subro

utine.

•The

dynam

ic load

bal

anci

ng is at

tem

pte

d a

t ev

ery M

D ste

p.

1-D

domain decomposition

Dynamic load balancing

Parallel efficiency

(a)

Dia

mond (512 a

tom

s)

(b)SM

M (148 a

tom

s)

(c)

Dia

mond (64 a

tom

s,

k-p

oin

ts=3x3x3)

Cra

y-X

T3

2.4

GH

z

Inte

rconnec

t

actu

al p

erfo

rman

ce 1

.0G

B/s

The code

is w

ritten

by a

sta

ndar

d C

, an

d c

onsist

s of 800 subro

utines

,

about 210000 lin

es, an

d is nee

ded

to incl

ude

lapac

k, bla

s, fftw

.

Mai

n c

ode:

open

mx

VPS a

nd P

AO

gen

erat

or: a

dpac

k

About te

n p

ost

pro

cess

ing c

odes

:

ban

dgnu13: b

and d

isper

ion

dosM

ain: D

OS

jx: ex

chan

ge

coupling c

onst

ant

polB

: m

acro

scopic

pola

riza

tion

esp: an

alysi

s of ch

arge

stat

e

……

How to handle the large software ?

The number of combination of parameters: ∝ ∝∝∝     2N

Thus, it is

not ea

sy to a

ssure

the

reliab

ility o

f th

e co

de

as the

code

bec

om

es c

om

plica

ted.

In o

rder

to c

hec

k the

reliab

ility o

f th

e m

ost

funct

ional

itie

s,

sever

al a

uto

mat

ic tes

ting syst

ems hav

e bee

n d

evel

oped

:

runte

st:

a te

ster

of in

stal

lation a

nd M

PI

mltes

t:

a te

ster

of m

emory

lea

k

forc

etes

t:

a te

ster

of an

alytic

forc

es

filA

3:

a ch

ecker

of dynam

ic a

lloca

tion

Ongoing and planned works

1.

Hybrid p

aral

leliza

tion u

sing M

PI an

d O

pen

MP b

y T

O

2.

Monkhors

t-Pac

k k

-poin

ts b

y H

.Wen

g

3.

Cal

cula

tion o

f W

annie

r fu

nct

ions by H

.Wen

g

4.

Impro

vem

ent of num

eric

al inte

gra

tions by T

O

5.

Rel

ease

of N

EG

F b

y T

O

1.

Imple

men

tation o

f D

MFT b

y J.Y

u’s

gro

up

2.

Cal

cula

tion o

f an

om

alous H

all ef

fect

by S

. O

noda

3.

Imple

men

tation o

f st

ress

by T

O

4.

Ref

inem

ent of pse

udopote

ntial

s by T

O

5.

Imple

men

tation o

f hybrid funct

ional

by M

. Toyoda

Ongoing

Planned

Summary

OpenMX is a state-of-the art software package based on the local

PAO basis functions and norm

-conserving pseudopotentials.

The method can provide reasonable computational accuracy and

effciency

in a balanced way for a wide variety of system

s including

solid state and m

olecular system

as with careful consideration for

the basis functions and pseudopotentials.

To improve the reliability and efficiency, and to add m

ore

functionalities, the code is still under development.