stephan irle nagoya university tutorial: molecular structures and

14
1 Stephan Irle agoya University Tutorial: Molecular structures and MD of small and larger molecules using DFTB+ 2 How to connect to Lired: 1. ssh [email protected] 2. Password: DFTBwork 3. You should see prompt “[sirle@lired ~]$ 4. Create your own directory, e.g. mkdir joe” where joe is the directory you will run calculaQons in 5. cd “joe” How to visualize .xyz data files: a) MOLDEN b) JMOL c) …

Upload: dothu

Post on 06-Jan-2017

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stephan Irle Nagoya University Tutorial: Molecular structures and

1

StephanIrleagoyaUniversity

Tutorial:MolecularstructuresandMDofsmallandlargermoleculesusingDFTB+

2

HowtoconnecttoLired:1.   [email protected].   Password:DFTBwork3.   Youshouldseeprompt“[sirle@lired~]$4.   Createyourowndirectory,e.g. mkdirjoe”wherejoeisthe

directoryyouwillruncalculaQonsin5.   cd“joe”

Howtovisualize.xyzdatafiles:a)  MOLDENb)  JMOLc)  …

Page 2: Stephan Irle Nagoya University Tutorial: Molecular structures and

3

Shortinstruc8onsforimportantUNIXcommands(I):GeneralUNIXcommands:cd<dir> changedirectoryto<dir>cd.. Gobackonedirectoryls listfilesincurrentdirectoryvi <file> viewandeditfile<file>(geditisalsoavailable)cp<file><new> copyfile<file>tofile<new>mkdir<dir> createdirectory<dir>(askyourfriendsforhelpifyouarelostatany8me)

4

Shortinstruc8onsforimportantUNIXcommands(II):Importantcommands:dJb+ (theDFTB+program) waveplot (ploPngmolecularorbitals,electrondensi8e ,etc.) gnuplot (thegnuplotprogram)VisualizaQon:DFTB+produces.xyzfileswhichcanbeviewedwithMOLDENorJMOLor…ToinstallMOLDENonyourcomputers,open:hbp://qc.chem.nagoya-u.ac.jpClickon“Teaching”

Page 3: Stephan Irle Nagoya University Tutorial: Molecular structures and

5

Youwillsee:

Todownload,youareaskedtoprovideauseridandpassword.Userid:qcguestPassword:qcigf!(quantumchemistryisgreatfun!)

6

For isualizaQonofmolecularorbitalsordensiQes, oucanuseVMDoranyothersofwarethatcanplotGaussian s“cube fileshbp://www.ks.uiuc.edu/Research/vmd/

Page 4: Stephan Irle Nagoya University Tutorial: Molecular structures and

Directoriesontheserver

7

ThefollowingdirectorystructureexistswithcorrespondinginputsforDFTB+inourhomedirectory/gpfs/home/sirle:Directory Descrip8on H2O Watermoleculegeometryop8miza8onformamide inputforformamiderota8onalbarriercalcula8onbenzene benzenemoleculargeometryop8miza8onC60 C60geometryop8miza8onnanotube (5,5)nanotubegeometryop8miza8onFe38 Fe38geometryop8miza8onC82 singlepointcalcula8onforMOvisualiza8onSc2C2C82 singlepointcalcula8onforMOvisualiza8onMD waterNVE/NVTBOMDsimula8ons

Frequentlyoccurringproblems

8

Theloca8onoftheDFTBparameterfileshastobespecifiedinthedftb_in.hsdinputfile.Ifthespecifieddirectorydoesnotexistortheparameterfilesdonotexist,theprogramwillstopwithanerrormessage.Theparameterfilesarestoredinthedirectorygpfs/home/sirle/SKfilesThedefaultmaximumnumberofgeometryupdatesduringgeometryop8miza8onis200.YoumayhavetochangethistoconvergeyourgeometriesbysePngMaxSteps=300(anumberlargerthan200)intheDriver{}Sec8onofdftb_in.hsd

Page 5: Stephan Irle Nagoya University Tutorial: Molecular structures and

1a)H2OsinglepointcalculaQon(input)

Geometryfile:

h2o.gen:3COH110.00.00.0221.00.00.0320.01.00.0

Geometry=GenFormat{<<<"h2o.gen"}Driver={}Hamiltonian=DFTB{Charge=0SpinPolarisa8on{}SCC=YesSCCTolerance=1e-6MaxSCCItera8ons=100Mixer=Broyden{}MaxAngularMomentum={O="p"H="s"}SlaterKosterFiles=Type2FileNames{Prefix="/gpfs/home/sirle/SKfiles/"Separator="-"Suffix=".skf"LowerCaseTypeName=No}}

dfb_in.hsd:

9

Necessarycommands:cdjoecp–r/gpfs/home/sirle/H2O.cdH2OLsdJb+>dJb+.out&

**********************************************************************************Geometrystep:0********************************************************************************iSCCTotalelectronicDiffelectronicSCCerror1-0.41146057E+010.00000000E+000.77431585E+002-0.41189864E+01-0.43807053E-020.56529143E+003-0.41241083E+01-0.51219356E-020.62694765E-024-0.41241090E+01-0.64734819E-060.72216815E-045-0.41241090E+01-0.85880636E-100.52564193E-08>>Chargessavedforrestartincharges.binTotalEnergy:-4.0698274647HTotalMerminfreeenergy:-4.0698274647H

DFTBinThailand

dfbp.out:

detailed.out:

Netatomiccharges(e)AtomNetcharge1-0.5690887920.2845443930.28454439Eigenvalues/eV-23.02217599-10.69768502-9.04017641-7.065009977.8094676713.40675941Fillings2.000002.000002.000002.000000.000000.00000

1a)H2OsinglepointcalculaQon(output)

10

Page 6: Stephan Irle Nagoya University Tutorial: Molecular structures and

1b)H2OgeometryopQmizaQon

OpQmizedgeometry,14geom.updates:TotalEnergy:-4.0779379339HTotalMerminfreeenergy:-4.0779379339HMaximalforcecomponent:0.873636E-06

IniQalgeometry:TotalEnergy:-4.0698274647HTotalMerminfreeenergy:-4.0698274647HMaximalforcecomponent:0.466498E-01

11

Necessarycommands:vidJb_in.hsd(orgeditdJb_in.hsd)Jb+>dJb+.out&

Task:UseMOLDENtocheckbondlengthsandanglesbeforeandaJerop8miza8onCommand:moldengeo_end.xyz

EditthedJb_in.hsdfileusingthevicommand,andchangetheline:

Driver = {}To:

Driver = ConjugateGradient{}

DFTBinThailand 1c)rotaQonalbarrierinformamide

TransiQonstategeometry(TS):TotalEnergy:-8.5123283430HTotalMerminfreeenergy:-8.5123283430HMaximalforcecomponent:0.448038E-04Minimumgeometry(planar):

TotalEnergy:-8.5347931959HTotalMerminfreeenergy:-8.5347931959HMaximalforcecomponent:0.686719E-04

ΔE

ΔE=-8.5123283430--8.5347931959ha=-.0224648529ha=14.1kcal/mol 12

Necessarycommands:p-r/gpfs/home/sirle/formamide.lscdformamide/planardJb+>dJb+.out&<recordfinalenergy>moldengeo_end.xyzd../cdTSdJb+>dJb+.out&<recordfinalenergy>moldengeo_end.xyz

Page 7: Stephan Irle Nagoya University Tutorial: Molecular structures and

1d-1)waterdimergeometryopQmizaQon

13

CCSD(T)/cc-pVQZop8mizedstructurefromHobzaetal.takenfromhwp://www.begdb.com

1.952Å

Task:MakeappropriateinputbyyourselfusingH2Oop8miza8on(task1b).ComputeSCC-DFTBbindingenergyBE=-[Edimer–2*Emonomer]Forthisconforma8on:Edimer=-8.1611635663haBE=-[-8.1611635663–2*(-4.0779379339)]ha=.0052876985=3.3kcal/mol

Slater-KirkwooddispersiontermforSCC-DFTB* *Elstner,M.etal.,J.Chem.Phys.,114,5149-5155,(2001).

14

∑ −−=αβ

αβαβ

αβαβ6

6 )()()( RCRfREdis

470 )])(3exp(1[)( RRRf αβαβ −−=

ββ

αα

βαβα

αβ

62

62

666

2CpCpppCC

C+

=

36 75.0 ααα pNC =

R

f(R)

pα:polarizability(differentvaluesfordifferenthybridstatesofatoms)R0:cufoffdistance N α:effec8venumberofelectrons

Dampingfunc8on

~1/R6behavior Pauli repulsion AvailableforC,H,N,O,P(onlyPO4),andS(notSO2)

Page 8: Stephan Irle Nagoya University Tutorial: Molecular structures and

1d-2)DispersioninteracQon:benzenedimer

15

Task1:op8mizebenzenemonomerwithandwithoutdispersioninterac8on;whatdifferencesdoyouobserve?Task2:Usingdispersioninterac8on,op8mizeS,PD,andTdimerstructuresandcompareyourenergieswithliteraturevalues:

S T PD BE 1.65 2.69 2.67[kcal/mol]NotethatDFTB-Dinterac8onsareintherange3-5kcal/mol.

benzene/inputs> lsbenzene-disp benzene-nodisp PD-disp S-disp T-disp

SandwichS

T-shapeT

Parallel-displacedPD

2a)C60geometryopQmizaQon

16

OpQmizedgeometry,18geom.updates:TotalEnergy:-103.2321663552HTotalMerminfreeenergy:-103.2321663552HMaximalforcecomponent:0.693582E-04

IniQalgeometry:TotalEnergy:-103.1220165514HTotalMerminfreeenergy:-103.1220165514HMaximalforcecomponent:0.639238E-01

FromTn=2000KMDsimula8onDirectory:C60

Page 9: Stephan Irle Nagoya University Tutorial: Molecular structures and

17

SCC-DFTBw/fracQonalorbitaloccupaQonnumbers

122tot i i rep

i

E f E q qαβ α βαβ

ε γ= + + Δ Δ∑ ∑

( ) 0vi iv

c H Sµν µνε− =∑

Frac8onaloccupa8onnumbersfiofKohn-Shameigenstatesreplaceintegerni

TB-eigenvalueequa8on

E

2fi012

µ

Finitetemperatureapproach(MerminfreeenergyEMermin)

( )1

exp / 1ii B e

fk Tε µ

=− +⎡ ⎤⎣ ⎦

( ) ( )2 ln 1 ln 1e B i i i ii

S k f f f f∞

= − + − −∑

Te: electronic temperature Se: electronic entropy

0 1

2N

repi i i i

i

EH H SF f c c q q

SR R R Rµν µν µν αξ

α µ ν α ξµν ξµνα α α α

γε

⎡ ⎤⎛ ⎞ ∂∂ ∂ ∂= − − − −Δ Δ −⎢ ⎥⎜ ⎟⎜ ⎟∂ ∂ ∂ ∂⎢ ⎥⎝ ⎠⎣ ⎦

∑ ∑ ∑r r r r r

0 1if≤ ≤

Atomicforce

M.Weinert,J.W.Davenport,Phys.Rev.B45,13709(1992)

EMermin=Etot-TeSe

2b)OxidaQonof(5,5)SWCNT

18

Important:NeedtouseelectronictemperatureTe=1000KorsimilartoobtainSCCconvergenceOAtom:SCC-DFTBenergy:-3.0982859370haSWCNT:op8mizedSCC-DFTBenergy:-128.1960247645haOxidizedSWCNT:op8mizedSCC-DFTBenergy:-131.4584328407ha

+O

BindingenergyBE=-[E(SWCNT+O)–E(SWCNT)–E(O)]=103.0kcal/mol

SWCNTSWCNT+O

Directories:nanotube/inputs/pris8ne&oxidized&o_atom

Page 10: Stephan Irle Nagoya University Tutorial: Molecular structures and

OpQmizedgeometry,Te=1500K,144geom.updates:TotalEnergy:-55.6471927268HTotalMerminfreeenergy:-56.0689013490HMaximalforcecomponent:0.575369E-04

IniQalgeometry:TotalEnergy:-55.2723102833HTotalMerminfreeenergy:-55.7289532045HMaximalforcecomponent:0.736021E-01

2c)Fe38geometryopQmizaQon

19

Directory:Fe38

2d)MOplotsofC82andSc2C2@C82

20

Directories:C82andSc2C2C82,subdirectoriesinputandinput/orbitalinbothImportant:NeedtouseelectronictemperatureTe=1000KorsimilartoobtainSCCconvergenceWriteMO’sindJb_in.hsd:Op8ons={WriteDetailedXML=YesWriteEigenvectors=Yes}

C82 Sc2C2@C82

Bonus:CalculatebindingenergyofC2andScatoms:BE=-[E(Sc2C2@C82)–E(C82)–2E(Sc)–E(C2)]

Page 11: Stephan Irle Nagoya University Tutorial: Molecular structures and

21

Sample“waveplot_in.hsd” #Generalop8onsOp8ons={TotalChargeDensity=Yes#Totaldensitybeplowed?TotalChargeDifference=Yes#Totaldensitydifferenceplowed?ChargeDensity=Yes#Chargedensityforeachstate?RealComponent=Yes#Plotrealcomponentofthewavefunc8onPlowedSpins={1-1}PlowedLevels={111415161718}#LevelstoplotPlowedRegion=Op8malCuboid{}#RegiontoplotNrOfPoints={505050}#Numberofgridpointsineachdirec8onNrOfCachedGrids=-1#Nrofcachedgrids(speedsupthings)Verbose=Yes#Wannaseealotofmessages?}DetailedXML="detailed.xml"#FilecontainingthedetailedxmloutputofDFTB+EigenvecBin="eigenvec.bin"#Filecointainingthebinaryeigenvecs#Defini8onofthebasisBasis={Resolu8on=0.01#Includingmio-0-1.hsd.(Ifyouuseaset,whichdependsonothersets,#thewfc.*.hsdfilesforeachrequiredsetmustbeincludedinasimilar#way.)<<+"wfc.mio-0-1.hsd"}

22

VisualizetheMOswithVMD

• StartVMD:RunAllPrograms/University-of-Illinois/VMD/VMD1.8.7• File→NewMolecule,thenloadthethedesiredcubefilefrom(followtheprocedurebelow)-Browse-Mycomputer-Z:drive(longnamewithZ:attheend,double-click)-terminal_<color>_<M>(seelabelonyourterminal)-C82(orEr2C2C82)(double-click)-input(double-click)-orbital(double-click)-selectdesiredcubefile

Note:RunthesecommandsonyourTerminal!

Note:theloca8onofyourfileswilldependonthedirectoryinwhichyourantheDFTB+andwaveplotprograms

Page 12: Stephan Irle Nagoya University Tutorial: Molecular structures and

23

VisualizetheMOswithVMD

• Graphics→Representa8ons,thenchoosethedrawingmethod(hereCPK)• Pushthe“CreateRep”buwon• Changethedrawingmethod“Isosurface”,thenchangethedrawtypefromPointstoSolidsurfacesandshowtypetoIsosurface• ChangethecoloringmethodfromNametoColorID(color0:blue)• SettheIsovalue(posi8venumber;forexample,0.01etc.)• Performthesamethingfornega8veIsovalue(forexample,-0.01,color1:red)

2d)MOplotsofC82andSc2C2@C82

24

Energy[eV]

Page 13: Stephan Irle Nagoya University Tutorial: Molecular structures and

3a)H2ONVESCC-DFTB/MDsimulaQon

25

dJb_in.hsd:

NVE

BOMD

e.dat:totalMDenergyv.dat:MDpoten8alenergy

Directory:MD/NVE

3a)H2ONVESCC-DFTB/MDsimulaQon

26

dJb_in.hsd:

NVE

BOMD

T:grep"Kine8cEnergy:"md.out|awk'{print$4}'>t.datV:grep"Poten8alEnergy:"md.out|awk'{print$3}'>v.datE:grep"TotalMDEnergy:"md.out|awk'{print$4}'>e.datE=T+VEisconservedinNVE(microcanonical)simula8onsVisaliza8oningnuplot:Type“gnuplot”gnuplot> set style data linesplot ‘v.dat’,’e.dat’plot ‘t.dat’exitInterpretyourresults.HowareTandVrelated?

Page 14: Stephan Irle Nagoya University Tutorial: Molecular structures and

3b)H2ONVTSCC-DFTB/MDsimulaQon

27

dJb_in.hsd:

NVT

BOMD

e.dat:totalMDenergyv.dat:MDpoten8alenergy

Geometry = GenFormat { <<< "h2o.gen" } Driver = VelocityVerlet{ Steps = 999 TimeStep [Femtosecond] = 0.10 Thermostat = Berendsen { Temperature [K] = 298.0 CouplingStrength = 0.1 } Velocities [AA/ps] = { <<< "VELOC.DAT" } OutputPrefix = "geo_stp" }

Hamiltonian = DFTB{ Charge = 0 SpinPolarisation{} SCC = Yes SCCTolerance = 1e-6 MaxSCCIterations = 100 Mixer = Broyden{} MaxAngularMomentum = { O = "p" H = "s" }SlaterKosterFiles = { O-O = "../SKfiles/O-O.skf" O-H = "../SKfiles/O-H.skf" H-O = "../SKfiles/H-O.skf" H-H = "../SKfiles/H-H.skf" } }

Directory:MD/NVT

3b)H2ONVTSCC-DFTB/MDsimulaQon

28

dJb_in.hsd:

NVE

BOMD

EisNOTconservedinNVTsimula8ons,butTis:½mv2=3/2kbTIncaseofonewatermolecule,1au=105258.2Kawk'{print$1*105258.2}'t.dat>temp.datInterpretyourresults.TrydifferentvaluesofthecouplingconstantτT.WhatistheinfluenceofτT?

δ = 1+ΔtτT

T0T(t −Δt)

−1⎧ ⎨ ⎩

⎫ ⎬ ⎭

⎣ ⎢

⎦ ⎥

1/ 2

vi = δvi,