19.01.2015 Views

MOLPRO

MOLPRO

MOLPRO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

56 MATRIX OPERATIONS 389<br />

memory,2,m<br />

R = 0.96488518 ANG<br />

THETA= 101.90140469<br />

geometry={H1<br />

O,H1,R;<br />

H2,O,R,H1,THETA}<br />

{hf;wf,10,1}<br />

field=0.05<br />

!define field strength<br />

{matrop<br />

load,h0,h0<br />

!load one-electron hamiltonian<br />

load,xx,oper,xx !load second moments<br />

load,yy,oper,yy<br />

load,zz,oper,zz<br />

add,h01,h0,field,zz,-0.5*field,xx,-0.5*field,yy !add second moments to h0 and store in h01<br />

save,h01,1210.1,h0} !save h0<br />

hf<br />

!do scf with modified h0<br />

{matrop<br />

load,h0,h0<br />

!load h0<br />

load,qmzz,oper,qmzz !load quadrupole moment qmzz<br />

add,h01,h0,field,qmzz !add quadrupole moment to h0 (same result as above with second moments)<br />

save,h01,1210.1,h0} !save h0<br />

hf<br />

!do scf with modified h0<br />

quad,,,field<br />

hf<br />

!add quadrupole field to h0<br />

!do scf with modified h0 (same result as above with matrop)<br />

field,zz,field,xx,-0.5*field,yy,-0.5*field ! (add general field; same result as above)<br />

hf<br />

!do scf with modified h0 (same result as above with matrop)<br />

field,zz,field !same as before with separate field commands<br />

field+,xx,-0.5*field<br />

field+,yy,-0.5*field<br />

hf<br />

!do scf with modified h0 (same result as above with matrop)<br />

http://www.molpro.net/info/current/examples/matropfield.com<br />

56.25 Exercise: SCF program<br />

Write a closed-shell SCF program for H 2 O using MATROP!<br />

Hints:<br />

First generate a starting orbital guess by finding the eigenvectors of h0. Store the orbitals in a<br />

record. Basis and geometry are defined in the usual way before the first call to MATROP.<br />

Then use a <strong>MOLPRO</strong> DO loop and call MATROP for each iteration. Save the current energy in<br />

a variable (note that the nuclear energy is stored in variable ENUC). Also, compute the dipole<br />

moment in each iteration. At the end of the iteration perform a convergence test on the energy<br />

change using the IF command. This must be done outside MATROP just before the ENDDO. At<br />

this stage, you can also store the iteration numbers, energies, and dipole moments in arrays, and<br />

print these after reaching convergence using TABLE. For the following geometry and basis set<br />

geometry={o;h1,o,r;h2,o,r,h1,theta} !Z-matrix geometry input<br />

r=1 ang !bond length<br />

theta=104<br />

!bond angle<br />

basis=vdz<br />

!basis set<br />

thresh=1.d-8<br />

!convergence threshold

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!