***,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; !3P states wf,16,1,0;state,3;wf,16,4,0;wf,16,6,0;wf,16,7,0} !1D and 1S states {ci;wf,16,1,0;save,3010.2;state,3;noexc} !save casscf wavefunctions using mrci {ci;wf,16,4,0;save,3040.2;noexc} {ci;wf,16,6,0;save,3060.2;noexc} {ci;wf,16,7,0;save,3070.2;noexc} {ci;wf,16,4,2;save,3042.2;noexc} {ci;wf,16,6,2;save,3062.2;noexc} {ci;wf,16,7,2;save,3072.2;noexc} {ci;wf,16,1,0;save,4010.2;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.2} !mrci calculations for 3P states ep=energy !save energy for 3P state in variable ep {ci;wf,16,6,2;save,4062.2} !mrci calculations for 3P states {ci;wf,16,7,2;save,4072.2} !mrci calculations for 3P states text,only triplet states, casscf lsint !compute so integrals text,3P states, casscf {ci;hlsmat,ls,3042.2,3062.2,3072.2} !Only triplet states, casscf text,3P states, mrci {ci;hlsmat,ls,4042.2,4062.2,4072.2} !Only triplet states, mrci text,3P, 1D, 1S states, casscf {ci;hlsmat,ls,3010.2,3040.2,3060.2,3070.2,3042.2,3062.2,3072.2} !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.2,3040.2,3060.2,3070.2,3042.2,3062.2,3072.2}