***,H2O potential symmetry,x !use cs symmetry geometry={ o; !z-matrix h1,o,r1(i); h2,o,r2(i),h1,theta(i) } basis=vdz !define basis set angles=[100,104,110] !list of angles distances=[1.6,1.7,1.8,1.9,2.0] !list of distances i=0 !initialize a counter do ith=1,#angles !loop over all angles H1-O-H2 do ir1=1,#distances !loop over distances for O-H1 do ir2=1,ir1 !loop over O-H2 distances(r1.ge.r2) i=i+1 !increment counter r1(i)=distances(ir1) !save r1 for this geometry r2(i)=distances(ir2) !save r2 for this geometry theta(i)=angles(ith) !save theta for this geometry hf; !do SCF calculation escf(i)=energy !save scf energy for this geometry ccsd(t); !do CCSD(T) calculation eccsd(i)=energc !save CCSD energy eccsdt(i)=energy !save CCSD(T) energy enddo !end of do loop ith enddo !end of do loop ir1 enddo !end of do loop ir2 {table,r1,r2,theta,escf,eccsd,eccsdt !produce a table with results head, r1,r2,theta,scf,ccsd,ccsd(t) !modify column headers for table save,h2o.tab !save the table in file h2o.tab title,Results for H2O, basis $basis !title for table sort,3,1,2} !sort table