Download - Basis Sets

Transcript
Page 1: Basis Sets

Basis SetsBasis Sets

Patrick BriddonPatrick Briddon

Page 2: Basis Sets

ContentsContents

What is a basis set? Why do we need What is a basis set? Why do we need them?them?

Gaussian basis setsGaussian basis sets UncontractedUncontracted ContractedContracted

Accuracy: a case studyAccuracy: a case study Some concluding thoughtsSome concluding thoughts

Page 3: Basis Sets

What is a basis set?What is a basis set?

Solutions to the SchrSolutions to the Schröödinger equation:dinger equation:

are continuous functions, are continuous functions, ψψ(x).(x).

→ → not good for a modern computer (discrete)not good for a modern computer (discrete)

EV

dx

d

2

2

2

1

Page 4: Basis Sets

Why a basis set?Why a basis set?

Idea: Idea: write the solution in terms of a series of write the solution in terms of a series of

functions:functions:

iii xcx

The function The function ΨΨ is then “stored” as a is then “stored” as a number of coefficients:number of coefficients:

,,, 321 ccc

Page 5: Basis Sets

A few questions …A few questions …

What shall I choose for the What shall I choose for the functions?functions?

How many of them do I need?How many of them do I need? How do I work out what the correct How do I work out what the correct

coefficients are?coefficients are?

Page 6: Basis Sets

Choosing Basis functionsChoosing Basis functions Try to imagine what the true Try to imagine what the true

wavefunction will be like:wavefunction will be like:

V

ψ

Page 7: Basis Sets

Choosing Basis functionsChoosing Basis functions

ψ

Basis states

Page 8: Basis Sets

The coefficientsThe coefficients

These are determined by using the These are determined by using the variationalvariational principleprinciple of quantum of quantum mechanics.mechanics.

If we have a trial wave-function:If we have a trial wave-function:

i

ii xcx

Choose the coefficients to minimise Choose the coefficients to minimise the energy.the energy.

Page 9: Basis Sets

How many basis How many basis functions?functions?

The more the better (i.e. the more The more the better (i.e. the more accurate).accurate). Energy always greater than true energy, but Energy always greater than true energy, but

approaches it from above.approaches it from above.

The more you use, the slower the The more you use, the slower the calculation!calculation! In fact time depends on number-cubed!In fact time depends on number-cubed!

The better they are, the fewer you need.The better they are, the fewer you need.

Page 10: Basis Sets

Basis sets ad LCAO/MOBasis sets ad LCAO/MO

There is a close relationship between There is a close relationship between chemistry ideas and basis sets.chemistry ideas and basis sets.

Think about the H2 molecule:Think about the H2 molecule:

2111

2111

* HH

HH

ss

ss

Page 11: Basis Sets

Basis sets and LCAOBasis sets and LCAO

Physicists call this LCAO (“linear Physicists call this LCAO (“linear combination of atomic orbitals”)combination of atomic orbitals”)

The basis functions are the atomic The basis functions are the atomic orbitalsorbitals

Chemists call this “molecular orbital Chemists call this “molecular orbital theory”theory”

There is a big difference though:There is a big difference though: In LCAO/MO the number of basis functions is In LCAO/MO the number of basis functions is

equal to the number of MOs.equal to the number of MOs. There is no “variational freedom”.There is no “variational freedom”.

Page 12: Basis Sets

What about our basis What about our basis functions?functions?

Atomic orbitals are fine, but they Atomic orbitals are fine, but they are:are: Not well defined – you can’t push a Not well defined – you can’t push a

button on a calculator and get one!button on a calculator and get one! Cumbersome to use on a computerCumbersome to use on a computer

AIMPRO used Gaussian orbitalsAIMPRO used Gaussian orbitals It is called a “Gaussian Orbital” code.It is called a “Gaussian Orbital” code.

Page 13: Basis Sets

Gaussian OrbitalsGaussian Orbitals

The idea:The idea:

i

iiic2exp Rrr

There are thus three ingredients:There are thus three ingredients: An “exponent”, An “exponent”, – controls the width of the – controls the width of the

Gaussian.Gaussian. A “centre” A “centre” RR – controls the location – controls the location A coefficient – varied to minimise the energyA coefficient – varied to minimise the energy

Page 14: Basis Sets

The ExponentsThe Exponents Typically vary between 0.1 and 10Typically vary between 0.1 and 10

Si: 0.12 up to 4; Si: 0.12 up to 4; F: 0.25 up to 10F: 0.25 up to 10

These are harder to find than coefficients.These are harder to find than coefficients. Small or large exponents are dangerous Small or large exponents are dangerous Fixed in a typical AIMPRO run: Fixed in a typical AIMPRO run:

determined for atom or reference solid.determined for atom or reference solid. i.e. vary exponents to get the lowest energy for i.e. vary exponents to get the lowest energy for

bulk Si;bulk Si; Put into “hgh-pots”Put into “hgh-pots” then keep them fixed when we look at other defect then keep them fixed when we look at other defect

systems. systems.

Page 15: Basis Sets

The The Positions/CoefficientsPositions/Coefficients

Positions: we put functions on all atomsPositions: we put functions on all atoms In the past we put them on bond centres tooIn the past we put them on bond centres too Abandoned – what if a bond disappears during a Abandoned – what if a bond disappears during a

run?run? You cannot put two identical functions on the You cannot put two identical functions on the

same atom – the functions must all be same atom – the functions must all be differentdifferent.. That is why small exponents are dangerous.That is why small exponents are dangerous.

Coefficients: AIMPRO does that for you!Coefficients: AIMPRO does that for you!

Page 16: Basis Sets

How good are Gaussians?How good are Gaussians?

Problems near the nucleus?Problems near the nucleus? True AE wave function was a cuspTrue AE wave function was a cusp … … but the pseudo wave function does but the pseudo wave function does

not!not!

Page 17: Basis Sets

How good are Gaussians?How good are Gaussians? Problems at large distance?Problems at large distance?

True wave function decays exponentially: exp[-True wave function decays exponentially: exp[-r]r]

Our function will decay more quickly: exp[-Our function will decay more quickly: exp[-rr22]] Not ideal, but is not usually important for Not ideal, but is not usually important for

chemical bonding.chemical bonding. Could be important for VdW forcesCould be important for VdW forces

But DFT doesn’t get them right anywayBut DFT doesn’t get them right anyway Only ever likely to be an issue for surfaces Only ever likely to be an issue for surfaces

or molecules (our solution: ghost orbitals) or molecules (our solution: ghost orbitals)

Page 18: Basis Sets

AIMPRO basis setAIMPRO basis set

We do not only use s-orbitals of course.We do not only use s-orbitals of course. Modify Gaussians to form Cartesian Modify Gaussians to form Cartesian

Gaussian functions:Gaussian functions:

2

2

2

exp

exp

exp

iiizz

iiiyy

iiixx

Rzp

Ryp

Rxp

Rr

Rr

Rr

Alongside the s orbital that will give 4 Alongside the s orbital that will give 4 independent functions for the exponent.independent functions for the exponent.

Page 19: Basis Sets

What about d’s?What about d’s?

We continue, multiplying by 2 pre-We continue, multiplying by 2 pre-factors:factors:

2

2

2

222

222

222

exp

exp

exp

exp

exp

exp

iiiziy

iiizix

iiiyix

iiiz

iiiy

iiix

RzRyyz

RzRxxz

RyRxxy

Rzz

Ryy

Rxx

Rr

Rr

Rr

Rr

Rr

Rr

Page 20: Basis Sets

What about d’s?What about d’s? This introduces 6 further functions This introduces 6 further functions

i.e. giving 10 including the s and p’si.e. giving 10 including the s and p’s Of these 6 functions, 5 are the d-orbitalsOf these 6 functions, 5 are the d-orbitals One is an additional s-type orbital:One is an additional s-type orbital:

22

2222222

exp

exp

iii

iiiziyix RzRyRxzyx

RrRr

Rr

Page 21: Basis Sets

ddpp and all thatddpp and all that We often label basis sets as “ddpp”.We often label basis sets as “ddpp”. What does this mean?What does this mean?

4 letters means 4 different exponents.4 letters means 4 different exponents. The first (smallest) has s/p/d functions The first (smallest) has s/p/d functions

(10)(10) The next also has s/p/d functions (10)The next also has s/p/d functions (10) The last two (largest exponents) have The last two (largest exponents) have

s/p (4 each)s/p (4 each) Total of 28 functionsTotal of 28 functions

Page 22: Basis Sets

Can we do better?Can we do better? Add more d-functions: Add more d-functions:

““dddd” with 40 functions per atomdddd” with 40 functions per atom this can be important if states high in the this can be important if states high in the

conduction band are needed (EELS). conduction band are needed (EELS). Clearly crucial for elements like Fe!Clearly crucial for elements like Fe!

Add more exponentsAdd more exponents ddpppddppp PddpppPddppp

Put functions in extra places (bond Put functions in extra places (bond centres)centres) Not recommendedNot recommended

Page 23: Basis Sets

How good is the energy?How good is the energy? We can get the energy of an atom to 1 We can get the energy of an atom to 1

meV when the basis fitted.meV when the basis fitted. BUT: larger errors encountered when BUT: larger errors encountered when

transferring that basis set to a defect.transferring that basis set to a defect. The energy is The energy is notnot well converged. well converged. But But energy differencesenergy differences can be can be

converged.converged.

So: So: ONLY SUBTRACT ENERGIES ONLY SUBTRACT ENERGIES CALCULATED WITH THE SAME BASIS CALCULATED WITH THE SAME BASIS SET!SET!

Page 24: Basis Sets

Other propertiesOther properties

Structure converges fastest with basis setStructure converges fastest with basis set Energy differences converge next fastestEnergy differences converge next fastest Conduction band converges more slowlyConduction band converges more slowly Vibrational frequencies also require care.Vibrational frequencies also require care.

Important to be sure, the basis set you are Important to be sure, the basis set you are using is good enough for the property that using is good enough for the property that you are calculating!you are calculating!

Page 25: Basis Sets

Contracted basis setsContracted basis sets

A way to reduce the number of functions A way to reduce the number of functions whilst maintaining accuracy.whilst maintaining accuracy.

Combine all four s-functions together to Combine all four s-functions together to create a single combination:create a single combination:

2222 5.34.15.01.0 e3.0e7.0e2.0e1.0 rrrrs

The 0.1, 0.2, etc. are chosen to do the best for bulk The 0.1, 0.2, etc. are chosen to do the best for bulk Si.Si.

They are then frozen – kept the same for large runs.They are then frozen – kept the same for large runs. Do the same for the p-orbitals.Do the same for the p-orbitals. This gives 4 contracted orbitalsThis gives 4 contracted orbitals

Page 26: Basis Sets

The C4G basis The C4G basis

These 4 orbitals provide a very small These 4 orbitals provide a very small basis set.basis set.

How much faster than ddpp?How much faster than ddpp? Answer: (28/7)Answer: (28/7)33 or 343 times! or 343 times!

Sadly: not good enough!Sadly: not good enough! You will probably never hear this You will probably never hear this

spoken of!spoken of! Chemistry equivalent: “STO-3G”Chemistry equivalent: “STO-3G”

Also regarded as rubbish!Also regarded as rubbish!

Page 27: Basis Sets

The C44G basis The C44G basis

Next step up: choose two different s/p Next step up: choose two different s/p combinations:combinations:

We will now have 8 functions per atom.We will now have 8 functions per atom. (8/4)(8/4)33 or 8 times slower than C4G! or 8 times slower than C4G! (28/8)(28/8)33 or 43 times faster than ddpp. or 43 times faster than ddpp.

Sadly: still not good enough!Sadly: still not good enough!

2222

2222

5.34.15.01.02

5.34.15.01.01

e4.0e5.0e2.0e4.0

e3.0e7.0e2.0e1.0rrrr

rrrr

s

s

Page 28: Basis Sets

The C44G* basis The C44G* basis

Main shortcoming: change of shape Main shortcoming: change of shape of s/p functions when solid is formed.of s/p functions when solid is formed.

Need d-type functions.Need d-type functions. Add 5 of these.Add 5 of these. Gives 13 functionsGives 13 functions What we call C44G* (again “PRB What we call C44G* (again “PRB

speak”)speak”) Similar to chemists 6-31G*Similar to chemists 6-31G*

Page 29: Basis Sets

The C44G* basis The C44G* basis

13 functions still (28/13)13 functions still (28/13)33 times times faster than ddppfaster than ddpp

Diamond generally very goodDiamond generally very good Si: conduction band not converged – Si: conduction band not converged –

various approaches (Jon’s article on various approaches (Jon’s article on Wiki)Wiki)

Chemists use 6-31G* for much Chemists use 6-31G* for much routine work.routine work.

Page 30: Basis Sets

Results for Si (JPG)Results for Si (JPG)Basis Num

Etot/at

(Ha)

Erel/at

(eV)

a0

(au)

B0

(GPa)

Eg

(eV)Time (s)

Expt       10.263 97.9 1.17 216 512

dddd 40 -3.96667 0.000 10.175 95.7 0.47 25339  

ddpp 28 -3.96431 0.064 10.195 96.9 0.52 8348 27173

C44G* 13 -3.96350 0.086 10.192 98.5 0.74 1149 4085

Si-C4G 4 -3.94271 0.652 10.390 92.1 2.28 107 411

Page 31: Basis Sets

The way forwards? The way forwards?

13 functions still (28/13)13 functions still (28/13)33 times times faster than ddppfaster than ddpp

4 functions was (28/4)4 functions was (28/4)3 3 times faster.times faster. Idea at Nantes: form combinations Idea at Nantes: form combinations

not just of functions on one atom.not just of functions on one atom. Be very careful how you do this.Be very careful how you do this. Accuracy can be “as good as” ddpp.Accuracy can be “as good as” ddpp.

Page 32: Basis Sets

Plane WavesPlane Waves Another common basis set is the set of plane Another common basis set is the set of plane

waves – recall the nearly free electron model.waves – recall the nearly free electron model. We can form simple ideas about the band We can form simple ideas about the band

structure of solids by considering free structure of solids by considering free electrons.electrons.

Plane waves are the equivalent to “atomic Plane waves are the equivalent to “atomic orbitals” for free electrons.orbitals” for free electrons.

G

rGGr iec

Page 33: Basis Sets

Gaussians vs Plane Gaussians vs Plane WavesWaves

Number of Gaussians is very small Number of Gaussians is very small Gaussians: 20/atomGaussians: 20/atom Plane Waves: 1000/atomPlane Waves: 1000/atom

Well written Gaussian codes are therefore Well written Gaussian codes are therefore faster.faster.

Plane waves are systematic: no Plane waves are systematic: no assumption as to true wave functionassumption as to true wave function Assumptions are dangerous (they can be Assumptions are dangerous (they can be

wrong!)wrong!) … … but they enable more work if they are fasterbut they enable more work if they are faster

Page 34: Basis Sets

Gaussians vs Plane Gaussians vs Plane WavesWaves

Plane waves can be increased until energy Plane waves can be increased until energy convergesconverges In reality it is not possible for large systems.In reality it is not possible for large systems. Number of Gaussians cannot be increased indefinitely Number of Gaussians cannot be increased indefinitely

Gaussians good when we have a single “difficult Gaussians good when we have a single “difficult atom” atom” Carbon needs a lot of pane waves → SLOW!Carbon needs a lot of pane waves → SLOW! 1 C atom in 512 atom Si cell as slow as diamond1 C atom in 512 atom Si cell as slow as diamond True for 2p elements (C, N, O, F) and 3d metals.True for 2p elements (C, N, O, F) and 3d metals. Gaussians codes are much faster for these.Gaussians codes are much faster for these.

Page 35: Basis Sets

In conclusionIn conclusion

Basis set is fundamental to what we do.Basis set is fundamental to what we do. A quick look at the mysterious “hgh-pots”.A quick look at the mysterious “hgh-pots”. Uncontracted and contracted Gaussian Uncontracted and contracted Gaussian

bases.bases. Rate of convergence depends on property.Rate of convergence depends on property. A good publication will demonstrate that A good publication will demonstrate that

results are converged with respect to results are converged with respect to basis.basis.