物質科学のための計算数理 II Numerical Analysis for Material Science II

Slides:



Advertisements
Similar presentations
Spin order in correlated electron systems
Advertisements

Modelling of Defects DFT and complementary methods
DFT – Practice Simple Molecules & Solids [based on Chapters 5 & 2, Sholl & Steckel] Input files Supercells Molecules Solids.
DFT Calculations Shaun Swanson.
Introduction to git Alan Orth Nairobi, Kenya September, 2010 version control for serious hackers ;)
Large-Scale Density Functional Calculations James E. Raynolds, College of Nanoscale Science and Engineering Lenore R. Mullin, College of Computing and.
FUNDAMENTALS The quantum-mechanical many-electron problem and Density Functional Theory Emilio Artacho Department of Earth Sciences University of Cambridge.
Introduction to run Siesta
Javier Junquera Exercises on basis set generation Increasing the angular flexibility: polarization orbitals.
RMG Study Group Session I: Git, Sphinx, webRMG Connie Gao 9/20/
Network for Computational Nanotechnology (NCN) Purdue, Norfolk State, Northwestern, MIT, Molecular Foundry, UC Berkeley, Univ. of Illinois, UTEP DFT Calculations.
Physics “Advanced Electronic Structure” Pseudopotentials Contents: 1. Plane Wave Representation 2. Solution for Weak Periodic Potential 3. Solution.
Lectures Introduction to computational modelling and statistics1 Potential models2 Density Functional.
Algorithms for Total Energy and Forces in Condensed-Matter DFT codes
Computational Solid State Physics 計算物性学特論 第4回 4. Electronic structure of crystals.
Lecture 17: Excitations: TDDFT Successes and Failures of approximate functionals Build up to many-body methods Electronic Structure of Condensed Matter,
The Nuts and Bolts of First-Principles Simulation Durham, 6th-13th December : DFT Plane Wave Pseudopotential versus Other Approaches CASTEP Developers’
The Bandstructure Problem A one-dimensional model (“easily generalized” to 3D!)
- Compute and analyze the band structure of an ionic solid
Electronic Band Structures electrons in solids: in a periodic potential due to the periodic arrays of atoms electronic band structure: electron states.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
The eggbox effect: converging the mesh cutoff Objectives - study the convergence of the energy and the forces with respect to the real space grid.
Comp. Mat. Science School 2001 Lecture 21 Density Functional Theory for Electrons in Materials Richard M. Martin Bands in GaAs Prediction of Phase Diagram.
TBPW: A Modular Framework for Pedagogical Electronic Structure Codes Todd D. Beaudet, Dyutiman Das, Nichols A. Romero, William D. Mattson, Jeongnim Kim.
Density Functional Theory A long way in 80 years L. de Broglie – Nature 112, 540 (1923). E. Schrodinger – 1925, …. Pauli exclusion Principle.
1 Lecture VIII Band theory dr hab. Ewa Popko. 2 Band Theory The calculation of the allowed electron states in a solid is referred to as band theory or.
Physics “Advanced Electronic Structure” Lecture 1. Theoretical Background Contents: 1. Historical Overview. 2. Basic Equations for Interacting Electrons.
For review of Schrodinger equation: monroecc
Solid State Computing Peter Ballo. Models Classical: Quantum mechanical: H  = E  Semi-empirical methods Ab-initio methods.
Numerical Aspects of Many-Body Theory Choice of basis for crystalline solids Local orbital versus Plane wave Plane waves e i(q+G).r Complete (in practice.
MODELING MATTER AT NANOSCALES 4. Introduction to quantum treatments Eigenvectors and eigenvalues of a matrix.
1 Material Model 2 Single Electron Band Structure in Bulk Semiconductors.
2/09/2015PHY 752 Spring Lecture 111 PHY 752 Solid State Physics 11-11:50 AM MWF Olin 107 Plan for Lecture 11: Reading: Chapter 9 in MPM Approximations.
Advanced methods of molecular dynamics 1.Monte Carlo methods 2.Free energy calculations 3.Ab initio molecular dynamics 4.Quantum molecular dynamics 5.Trajectory.
© copyright 2011 William A. Goddard III, all rights reservedCh121a-Goddard-L14 Periodic Boundary Methods and Applications: Ab-initio Quantum Mechanics.
Comp. Mat. Science School Electrons in Materials Density Functional Theory Richard M. Martin Electron density in La 2 CuO 4 - difference from sum.
Ch.1. Elementary Quantum Chemistry
Jun-Ru Chang Introduction GIT Jun-Ru Chang
Molecular Bonding Molecular Schrödinger equation
Energy bands (Nearly-free electron model)
Solid State Computing Peter Ballo.
Integrated Computational Materials Engineering Education Calculation of Equation of State Using Density Functional Theory Mark Asta1, Katsuyo Thornton2,
Band structure of a cubic perovskite oxide:
PHY 752 Solid State Physics
Version Control overview
PHY 752 Solid State Physics Review: Chapters 1-6 in GGGPP
Observation functional An exact generalization of DFT
PHY 752 Solid State Physics
Solids: From Bonds to Bands
PHY 752 Solid State Physics 11-11:50 AM MWF Olin 103
Lecture Thursday 6. March 2008
Tutorial - Practice #2 - QnMSG Yong-Hyun Kim.
Integrated Computational Materials Engineering Education Calculation of Equation of State Using Density Functional Theory Mark Asta1, Katsuyo Thornton2,
Yosuke Harashima, Keith Slevin
Akshay Narayan git up to speed with RCS Akshay Narayan
Electronic Structure Theory
Band-structure calculation
Prof. Sanjay. V. Khare Department of Physics and Astronomy,
The Nuts and Bolts of First-Principles Simulation
A One-Dimensional Bandstructure Model
Bandstructure Problem: A One Dimensional Model
3-Dimensional Crystal Structure.
Integrated Computational Materials Engineering Education Calculation of Equation of State Using Density Functional Theory Mark Asta1, Katsuyo Thornton2,
物質科学のための計算数理 II Numerical Analysis for Material Science II
Version Control with Git and GitHub
Group theory for the periodic lattice
Group theory for the periodic lattice
PHY 752 Solid State Physics
Integrated Computational Materials Engineering Education Calculation of Equation of State Using Density Functional Theory Mark Asta1, Katsuyo Thornton2,
Quantum One.
Presentation transcript:

物質科学のための計算数理 II Numerical Analysis for Material Science II 9th: Density Functional Theory (2) Dec. 7 (Fri) Lecturer: Mitsuaki Kawamura (河村光晶)

Schedule (This semester W1, W2) Sep. 28 (Fri) Guidance Y Oct. 5 (Fri) Monte Carlo method O Oct. 12 (Fri) Monte Carlo method O Oct. 19 (Fri) Monte Carlo method O Oct. 26 (Fri) Exact diagonalization Y Nov. 2 (Fri) Exact diagonalization Y Nov. 9 (Fri) Molecular dynamics O (1st report problem will be announced.) Nov. 30 (Fri) Standard DFT code K Dec. 7 (Fri) Density functional theory K Dec. 14 (Fri) Density functional theory K Dec. 21 (Fri) Density functional theory K Dec. 25 (Tue) (2nd)Report problem K (遠隔講義室) Jan. 11 (Fri) Density functional theory K ※ Lecturers: Y … Yamaji, K … Kawamura, O… Ohgoe

Schedule in this section (DFT) Nov. 30 (Fri) Standard DFT code First-principles calculation and Density functional theory (Lecture) One-body Schrödinger eq. for periodic system and Bloch theorem (L) Numerical solution of Kohn-Sham (one-body Schrödinger) eq. (L) Hands-on DFT code (Tutorial) Version control system : Git (T) Dec. 7 (Fri) Kohn-Sham eq. Plane-wave basis and Pseudopotentials (L) Iterative eigenvalue solution method (L & T) Dec. 14 (Fri) Self-Consistent loop Hartree potential (Poisson eq.) Brillouin-zone integral (Tetrahedron method) Visualization (T) Dec. 21 (Fri) Total Energy Coulomb potential for periodic point charge (Ewald sum) Dec. 25 (Tue) (2nd)Report problem K (遠隔講義室) Jan. 11 (Fri) Density functional theory K

Today’s Schedule Kohn-Sham eq. in periodic system Plane-wave representation Iterative diagonalization Matrix-vector product Kinetic energy term Potential term Visualize

Kohn-Sham method last week 𝐸 𝜌 = 𝑑 3 𝑟𝜌 𝒓 𝑣 𝒓 + 𝐸 𝑢𝑛𝑖𝑣 𝜌 𝐸 𝜌 = 𝑑 3 𝑟𝜌 𝒓 𝑣 𝒓 + 𝐸 𝑢𝑛𝑖𝑣 𝜌 𝑣 𝒓 ≡ 𝐼=1 𝑁 atom 𝑍 𝐼 𝒓− 𝑹 𝐼 𝐸 𝑢𝑛𝑖𝑣 𝜌 = 𝑇 𝐾𝑆 𝜌 + 1 2 𝑑 3 𝑟 𝑑 3 𝑟 ′ 𝜌(𝒓)𝜌( 𝒓 ′ ) 𝒓− 𝒓 ′ + 𝐸 𝑋𝐶 𝜌 Kinetic energy of non-interacting system whose charge density is 𝜌(𝒓) − 𝛁 2 2 + 𝑣 𝐾𝑆 [𝜌] 𝒓 𝜑 𝑛 𝒓 = 𝜀 𝑛 𝜑 𝑛 𝒓 𝜌 𝒓 =2 𝑛=1 𝑁/2 𝜑 𝑛 𝒓 2 𝑣 𝐾𝑆 [𝜌] 𝒓 =𝑣 𝒓 + 𝑑 3 𝑟 ′ 𝜌 𝒓 ′ 𝒓− 𝒓 ′ + 𝑣 𝑋𝐶 𝜌 𝒓 𝑣 𝑋𝐶 𝜌 𝒓 ≡ 𝛿 𝐸 𝑋𝐶 𝜌 𝛿𝜌 𝒓 Self-consistent field (SCF)

Kohn-Sham eq. for periodic system (1) last week 𝑣 𝐾𝑆 𝒓 is periodic, i.e., 𝑣 𝐾𝑆 𝒓+ 𝑛 1 𝒂 1 + 𝑛 2 𝒂 2 + 𝑛 3 𝒂 3 = 𝑣 𝐾𝑆 𝒓 − 𝛁 2 2 + 𝑣 𝐾𝑆 𝒓 𝜑 𝒓 =𝜀𝜑 𝒓 Unit lattice vectors (Not unique) 𝜌 𝒓 = 𝑛=1 𝑁× 𝑁 𝑐 𝜑 𝑛 𝒓 2 𝑁 electrons per unit cell 𝑁 𝑐 cells → ∞ Equation to solve in the whole region of bulk crystal 𝒂 1 𝒂 1 𝒂 2 Unit cell

Kohn-Sham eq. for periodic system (2) last week 𝜑 𝒓 = 1 𝑁 𝐶 𝑒 𝑖𝒌⋅𝒓 𝑢 𝑛𝒌 (𝒓) 𝜑(𝒓) can be written as Bloch’s theorem 𝑈.𝐶. 𝑑 3 𝑟𝜌 𝑟 =𝑁 − 𝛁+𝒌 2 2 + 𝑉 𝐾𝑆 𝒓 𝑢 𝑛𝒌 𝒓 =𝜀 𝑢 𝑛𝒌 𝒓 𝜌 𝒓 =2 1 𝑉 𝐵𝑍 𝐵𝑍 𝑑 3 𝑘 𝑛=1 ∞ 𝑢 𝑛𝒌 𝒓 2 𝜃( 𝜀 F − 𝜀 𝑛𝑘 ) Equation to solve only in the unit cell 𝜀 𝑛𝑘 Band structure 𝒂 1 𝒂 2 𝒂 3 𝒃 1 , 𝒃 2 , 𝒃 3 =2𝜋 𝐼 Unit reciprocal lattice vectors 𝜀 𝑛𝑘 and 𝑢 𝑛𝒌 𝒓 is periodic with 𝒃 𝛼 in the k space. 𝒌 𝒃 1

How to solve Kohn-Sham eq. : Basis last week − 𝛁+𝑖𝒌 2 2 + 𝑣 𝐾𝑆 𝒓 𝑢 𝑛𝒌 𝒓 = 𝜀 𝑛𝑘 𝑢 𝑛𝒌 𝒓 𝑢 𝑛𝒌 𝒓 = 𝐺 𝑢 𝑛𝒌 𝑮 𝑒 𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑮 ′ 𝑮+𝒌 2 2 𝛿 𝑮 𝑮 ′ + 𝑣 𝐾𝑆 (𝑮− 𝑮 ′ ) 𝑢 𝑛𝒌 𝑮 ′ = 𝜀 𝑛𝑘 𝑢 𝑛𝒌 𝑮 𝑣 𝐾𝑆 𝑮 = 𝑢𝑐 𝑑 3 𝑟 𝑒 −𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑣 𝐾𝑆 (𝒓)

Unit in this lecture Input and output : Length : Angstrom Energy : Electron volt Useful to read by VESTA Inside program code: Length : Atomic unit (Bohr radius). 1 [Bohr] = 0.529177249 [Å] Energy : Atomic unit (Hartree). 1 [Eh] = 27.21138456 [eV] [Bohr-1] 𝑮 ′ 𝑮+𝒌 2 2 𝛿 𝑮 𝑮 ′ + 𝑣 𝐾𝑆 (𝑮− 𝑮 ′ ) 𝑢 𝑛𝒌 𝑮 = 𝜀 𝑛𝑘 𝑢 𝑛𝒌 𝑮 [Eh] [Eh]

Fourier Transformation 𝑣 𝐾𝑆 𝑮 = 𝑢𝑐 𝑑 3 𝑟 𝑒 −𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑣 𝐾𝑆 (𝒓) Discretize (considering one dimension) 𝑣 2𝜋 𝐿 𝑚 = 𝑛=1 𝑁 𝑃𝑊 1 𝑁 𝑃𝑊 𝑒 −𝑖 2𝜋 𝐿 𝑚×𝐿 𝑛 𝑁 𝑃𝑊 𝑣 𝐿 𝑛 𝑁 𝑃𝑊 𝑁 𝑃𝑊 → ∞ : Exact 𝑚=− 𝑁 𝑃𝑊 2 ,⋯,−1,0,1,⋯, 𝑁 𝑃𝑊 2 𝑁 𝑃𝑊 × 𝑁 𝑃𝑊 𝑉 𝑂 𝑁 𝑃𝑊 2 numerical cost Fast Fourier Transformation (FFT) : 𝑂 𝑁 𝑃𝑊 ln 𝑁 𝑃𝑊 numerical cost We do not detail in this lecture. We just use FFT numerical library.

Cutoff frequency 𝑢 𝑛𝒌 𝒓 = 𝑮 𝑮 2 2 < 𝐸 𝑐𝑢𝑡 𝑢 𝑛𝒌 𝑮 𝑒 𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑢 𝑛𝒌 𝒓 = 𝑮 𝑮 2 2 < 𝐸 𝑐𝑢𝑡 𝑢 𝑛𝒌 𝑮 𝑒 𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑢 2𝜋 𝐿 𝑁 𝑃𝑊 −𝑚 = 𝑛=1 𝑁 𝑃𝑊 1 𝑁 𝑃𝑊 𝑒 −𝑖2𝜋 𝑛 𝑁 𝑃𝑊 −𝑚 𝑁 𝑃𝑊 𝑉 𝐿 𝑛 𝑁 𝑃𝑊 = 𝑉 − 2𝜋 𝐿 𝑚

Very simple plane-wave DFT program $ cd ~ $ git clone git://git.osdn.net/gitroot/educational-pwdft/pwdft.git $ cd pwdft $ cp make.inc.mac make.inc $ make $ cd sample/Al/ $ ../../src/pwdft.x < direct.in &CONTROL calculation = 'direct' / &SYSTEM nbnd = 10 nat = 1 ntyp = 1 ecutwfc = 60.000000 ecutrho = 240.000000 &ELECTRONS CELL_PARAMETERS 0.000000 2.024700 2.024700 2.024700 0.000000 2.024700 2.024700 2.024700 0.000000 ATOMIC_SPECIES Al al.lda.lps ATOMIC_POSITIONS Al 0.000000 0.000000 0.000000 K_POINTS 1 0.0 0.0 0.0 Aluminum Face centered cubic (fcc) Metal Almost free electron keep "ecutrho" ≧ 4*ecutwfc Only perform first SCF step 𝜌 𝑟 = 𝑁 𝑉 𝑢𝑐 Initial density is uniform

direct@diag_direct.F90 http://mitsuaki1987.github.io/pwdft/index.html lwork = -1 allocate(work(1)) call zheev('V', 'U', npw, ham, npw, eval_full, work, lwork, rwork, info) lwork = nint(dble(work(1))) deallocate(work) allocate(work(lwork)) Workspace (memory size) query : Do not need to care. Diagonalize Hamiltonian matrix "ham" Computational cost : 𝑂 𝑁 𝑃𝑊 3 Memory size : 𝑂( 𝑁 𝑃𝑊 3 ) keep ecutrho ≧ 4*ecutwfc Changing "ecutrho" and "ecutwfc" and see "Kohn-Sham Time" in Standard output Large numerical cost for large 𝑁 𝑃𝑊 We only need lower energy (occupied) band.

Locally Optimal Block Preconditioned Conjugate Gradient (LOBPCG) method One of the iterative eigen solution methods A. V. Knyazev, SIAM J. Sci. Compute. 23, 517 (2001). 山田進 他, 日本計算工学会論文集, 20060027 (2006). For computing 𝑁 𝑏 eigenvector, at each step Construct subspace Hamiltonian (3 𝑁 𝑏 dim.) Approx. eigenvector 𝒙 1 , 𝒙 2 ,⋯ 𝒙 𝑁 𝑏 𝒙 𝑖 † 𝒘 𝑖 † 𝒑 𝑖 † 𝐻 ( 𝒙 𝑖 , 𝒘 𝑖 ,{ 𝒑 𝑖 }) Residual vector 𝒘 𝑖 = 𝐻 𝒙 𝑖 − 𝜀 𝑖 𝒙 𝑖 CG vector 𝒑 1 , 𝒑 2 ,⋯ 𝒑 𝑁 𝑏 Diagonalize with direct method Take lowest 𝑁 𝑏 vectors as approximate eigenvectors at next step Loop until all 𝑟 𝑖 become smaller than the threshold Computational cost : 𝑂 𝛼 𝑁 𝑏 3 +𝛽 𝑁 𝑏 𝑁 𝑃𝑊 ln 𝑁 𝑃𝑊 +𝛾 𝑁 𝑏 2 𝑁 𝑃𝑊 Memory : 𝑂 𝑁 𝑏 𝑁 𝑃𝑊

Algorithm of LOBPCG method lobpcg_main@lobpcg.F90 Initial guess 𝒙 𝑖 (Random or atomic) 𝒑 𝑖 =𝟎 𝑷 𝑖 =𝟎 𝑿 𝑖 = 𝐻 𝒙 𝑖 𝜀 𝑖 = 𝑿 𝑖 † 𝒙 𝑖 do iteration 𝒘 𝑖 = 𝑿 𝑖 − 𝜀 𝑖 𝒙 𝑖 All 𝒘 𝑖 are small enough ? → Exit 𝒘 𝑖 = 𝑃 𝒘 𝑖 𝒘 𝑖 = 𝒘 𝑖 / 𝒘 𝑖 𝑾 𝑖 = 𝐻 𝒘 𝑖 𝐻 𝑠𝑢𝑏 = 𝑾 𝑖 , 𝑿 𝑖 , 𝑷 𝑖 † 𝒘 𝑖 , 𝒙 𝑖 , 𝒑 𝑖 𝑂 𝑠𝑢𝑏 = 𝒘 𝑖 , 𝒙 𝑖 , 𝒑 𝑖 † 𝒘 𝑖 , 𝒙 𝑖 , 𝒑 𝑖 Solve 𝐻 𝑠𝑢𝑏 𝑥 𝑖,𝑠𝑢𝑏 = 𝜀 𝑖,𝑠𝑢𝑏 𝑥 𝑖,𝑠𝑢𝑏 Take lowest 𝑁 𝑏 : 𝑥 𝑖,𝑠𝑢𝑏 𝑙𝑜𝑤 𝒙 𝑖 = 𝒘 𝑖 , 𝒙 𝑖 , 𝒑 𝑖 𝑥 𝑖,𝑠𝑢𝑏 𝑙𝑜𝑤 𝒑 𝑖 = 𝒘 𝑖 , 𝟎 , 𝒑 𝑖 𝑥 𝑖,𝑠𝑢𝑏 𝑙𝑜𝑤 𝑿 𝑖 = 𝑾 𝑖 , 𝑿 𝑖 , 𝑷 𝑖 𝑥 𝑖,𝑠𝑢𝑏 𝑙𝑜𝑤 𝑷 𝑖 = 𝑾 𝑖 , 𝟎 , 𝑷 𝑖 𝑥 𝑖,𝑠𝑢𝑏 𝑙𝑜𝑤 𝒙 𝑖 = 𝒙 𝑖 / 𝒙 𝑖 𝑿 𝑖 = 𝑿 𝑖 / 𝑿 𝑖 𝒑 𝑖 = 𝒑 𝑖 / 𝒑 𝑖 𝑷 𝑖 = 𝑷 𝑖 / 𝑷 𝑖 end do iteration

Hamiltonian vector product h_psi@hamiltonian.F90 𝑾 𝑖 = 𝐻 𝒘 𝑖 H 𝑢 𝑮 = − 𝑮+𝒌 2 2 + 𝑣 𝐾𝑆 𝑢 𝑮 𝑣 𝐾𝑆 𝑢 𝑮 = 𝑢𝑐 𝑑 3 𝑟 𝑒 −𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 𝑣 𝐾𝑆 𝒓 𝑢 𝒓 ≈ 𝒓 𝑉 𝑢𝑐 𝑁 𝒓 𝑒 −𝑖𝑮⋅𝒓 𝑣 𝐾𝑆 𝒓 𝑢 𝒓 𝑢 𝑛𝒌 𝒓 = 𝑮 𝑢 𝑛𝒌 𝑮 𝑒 𝑖𝑮⋅𝒓 𝑉 𝑢𝑐 Done in subroutine hpsi in hamiltonian.F90

Running iterative method $ cd ~/pwdft/sample/Al/ $ ../../src/pwdft.x < iterative.in &CONTROL calculation = 'iterative' / &SYSTEM nbnd = 10 nat = 1 ntyp = 1 ecutwfc = 60.000000 ecutrho = 240.000000 &ELECTRONS CELL_PARAMETERS 0.000000 2.024700 2.024700 2.024700 0.000000 2.024700 2.024700 2.024700 0.000000 ATOMIC_SPECIES Al al.lda.lps ATOMIC_POSITIONS Al 0.000000 0.000000 0.000000 K_POINTS 1 0.0 0.0 0.0 See "Kohn-Sham Time" in Standard output keep ecutrho ≧ 4*ecutwfc

Report problem 1 (1) Compare the computational time of direct method and LOBPCG method by changing ecutrho and ecutwfc. keep ecutrho ≧ 4*ecutwfc Time [sec] ecutwfc [Ry] (2) Plot the cutoff-energy dependence of Kohn-Sham energy 𝜀 𝑛𝑘 for 𝑘=(0,0,0) and 𝑛=1, 2 (they are outputted to a file band.dat).

What is the command "git" Backup code Port program in any system $ git clone ssh://user-name@133.11.72.58:/home/Student/Public/pwdft Backup code Port program in any system Merge modifications Compare diff Log each modification with comment Etc.

Considered case 1 ・ Where is the latest source code ? System C PC cluster Laptop PC Labo PC System B Home PC ・ Where is the latest source code ? ・ We need to update source code easily.

Considered case 2 ・ We need to trace when was it broken. Program System A System B Speed up with symmetry Program System A OpenMP Program System A OpenMP+MPI System A System B Program ・ We need to trace when was it broken. ・ We need to be available to return the stable (no error) code.

Version control $ git pull update modification $ git commit $ git pull Logging : Who When What modified Program (commit 1) Program (commit 2) Repository server Program (commit 3) ⋮ Program (commit 10) Latest $ git pull update modification Program (commit 11) $ git commit $ git push $ git pull Update latest version local repository local repository Modify

When modified simultaneously Program (commit 1) Program (commit 2) Repository server Program(commit 3) $ git push ⋮ Program (commit 10) Program (commit 11) Latest Program (commit 12) $ git pull commit 10+ commit 11+ local repo local repo $ git push commit

Tutorial $ cd ~/pwdft/ $ git branch -a $ git config --global user.name "user-name" $ git config --global user.email "user-name@bkks" $ git checkout -b user-name $ echo "Hello, I am user-name." > user-name.txt $ git add user-name.txt $ git commit (vi is used) $ git push --set-upstream origin user-name

Example of branches V0.2 V1.0 V0.1 Master Hotfix (Bug fix) Release Develop Feature (new features) "A successful branch in git"

Today's summary Plane-wave representation of Kohn-Sham eq. Direct method and LOBPCG method Hamiltonian-vector product with FFT Git