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 388<br />

***,h2o matrop examples<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 />

hf<br />

!do scf calculation<br />

{multi<br />

natorb<br />

canonical}<br />

{matrop<br />

load,D_ao,DEN,2140.2<br />

!load mcscf density matrix<br />

load,Cnat,ORB,2140.2,natural<br />

!load mcscf natural orbitals<br />

load,Ccan,ORB,2140.2,canonical !load mcscf canonical orbitals<br />

load,Dscf,DEN,2100.2<br />

!load scf density matrix<br />

load,S<br />

!load overlap matrix<br />

prio,Cnat,4,1,2<br />

elem,d11,Dscf,1.1,1.1<br />

elem,d21,Dscf,2.1,1.1<br />

elem,d12,Dscf,1.1,2.1<br />

tran,S_mo,s,Cnat<br />

print,S_mo<br />

trace,Nao,S_mo<br />

trace,Nel,D_ao,S<br />

mult,SC,S,Cnat<br />

tran,D_nat,D_ao,SC<br />

prid,D_nat<br />

!prints occupied casscf orbitals<br />

!print element D(1,1)<br />

!print element D(2,1)<br />

!print element D(1,2)<br />

!transform s into MO basis (same as above)<br />

!print result - should be unit matrix<br />

!trace of S_MO = number of basis functions<br />

!form trace(DS) = number of electrons<br />

!form SC=S*Cnat<br />

!transform density to natural MO (could also be done usin<br />

!print diagonal elements (occupation numbers)<br />

dmo,D_can,D_ao,Ccan<br />

!transform D_ao to canonical MO basis. Same as above simp<br />

add,D_neg,-1,D_can !multiply d_can by -1<br />

diag,U,EIG,D_neg<br />

!diagonalizes density D_can<br />

mult,Cnat1,Ccan,U<br />

!transforms canonical orbitals to natural orbitals<br />

prio,Cnat1,4,1,2<br />

!prints new natural orbitals<br />

natorb,Cnat2,D_ao<br />

prio,Cnat2,4,1,2<br />

add,diffden,D_ao,-1,Dscf<br />

natorb,C_diff,diffden<br />

write,diffden,denfile<br />

save,C_diff,2500.2<br />

}<br />

!make natural orbitals using MCSCF density D_ao directly<br />

!prints new natural orbitals (should be the same as above<br />

!form mcscf-scf difference density<br />

!make natural orbitals for difference density<br />

!write difference density to ASCII file denfile<br />

!store natural orbitals for difference density in dump re<br />

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

This second example adds a quadrupole field to H0. The result is exactly the same as using the<br />

QUAD command. H0 is overwritten by the modified one-electron matrix, and the nuclear energy<br />

is automatically changed appropriately. The subsequent SCF calculations use the modified oneelectron<br />

operator.<br />

Note that it is usually recommended to add fields with the ⁀DIP, QUAD, or FIELD commands.

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

Saved successfully!

Ooh no, something went wrong!