***,SO calculation for the S-atom geometry={s} basis={spd,s,vtz} !use uncontracted basis rhf;occ,3,2,2,,2;wf,16,4,2 !rhf for 3P state multi !casscf wf,16,4,2;wf,16,6,2;wf,16,7,2;wf,16,1,0;state,3; !1D and 1S states wf,16,4,0;wf,16,6,0;wf,16,7,0; !3P states ci;wf,16,1,0;save,3010.1;state,3 !save casscf wavefunctions using mrci noexc ci;wf,16,4,0;save,3040.1 noexc ci;wf,16,6,0;save,3060.1 noexc ci;wf,16,7,0;save,3070.1 noexc ci;wf,16,4,2;save,3042.1 noexc ci;wf,16,6,2;save,3062.1 noexc ci;wf,16,7,2;save,3072.1 noexc ci;wf,16,1,0;save,4010.1;state,3 !mrci calculations for 1D, 1S states ed=energy(1) !save energy for 1D state in variable ed es=energy(3) !save energy for 1S state in variable es ci;wf,16,4,2;save,4042.1 !mrci calculations for 3P states ep=energy !save energy for 3P state in variable ep ci;wf,16,6,2;save,4062.1 !mrci calculations for 3P states ci;wf,16,7,2;save,4072.1 !mrci calculations for 3P states text,only triplet states, casscf lsint !compute so integrals text,3P states, casscf ci;hlsmat,ls,3042.1,3062.1,3072.1 !Only triplet states, casscf text,3P states, mrci ci;hlsmat,ls,4042.1,4062.1,4072.1 !Only triplet states, mrci text,3P, 1D, 1S states, casscf ci;hlsmat,ls,3010.1,3040.1,3060.1,3070.1,3042.1,3062.1,3072.1 !All states, casscf text,only triplet states, use mrci energies and casscf SO-matrix elements hlsdiag=[ed,ed,es,ed,ed,ed,ep,ep,ep] !set variable hlsdiag to mrci energies ci;hlsmat,ls,3010.1,3040.1,3060.1,3070.1,3042.1,3062.1,3072.1