Next: 8 PROGRAM CONTROL Up: 7 INTRODUCTORY EXAMPLES Previous: 7.8.4 DFT frequency calculation

7.9 Do loops

Now you have the idea that one geometry is not enough. Why not compute the whole surface? DO loops make it easy. Here is an example, which computes a whole potential energy surface for $\rm H_2O$.

Input: h2o_pes_ccsdt.com

Output: h2o_pes_ccsdt.out

This produces the following table.

 Results for H2O, basis VDZ 

     R1    R2   THETA       SCF            CCSD           CCSD(T)  
    1.6   1.6   100.0   -75.99757338   -76.20140563   -76.20403920
    1.7   1.6   100.0   -76.00908379   -76.21474489   -76.21747582
    1.7   1.7   100.0   -76.02060127   -76.22812261   -76.23095473
    ...
    2.0   1.9   110.0   -76.01128923   -76.22745359   -76.23081968
    2.0   2.0   110.0   -76.00369171   -76.22185092   -76.22537212

You can use also use DO loops to repeat your input for different methods.

Input: h2o_manymethods.com

Output: h2o_manymethods.out

This calculation produces the following table.

 Results for H2O, basis DZ, R=1 Ang, Theta=104 degree

 METHOD        E             E-ESCF       E-EFCI  
 HF        -75.99897339     .00000000    .13712077
 FCI       -76.13609416    -.13712077    .00000000
 CI        -76.12844693    -.12947355    .00764722
 CEPA(0)   -76.13490643    -.13593304    .00118773
 CEPA(1)   -76.13304720    -.13407381    .00304696
 CEPA(2)   -76.13431548    -.13534209    .00177868
 CEPA(3)   -76.13179688    -.13282349    .00429728
 MP2       -76.12767140    -.12869801    .00842276
 MP3       -76.12839400    -.12942062    .00770015
 MP4       -76.13487266    -.13589927    .00122149
 QCI       -76.13461684    -.13564345    .00147732
 CCSD      -76.13431854    -.13534515    .00177561
 BCCD      -76.13410586    -.13513247    .00198830
 QCI(T)    -76.13555640    -.13658301    .00053776
 CCSD(T)   -76.13546225    -.13648886    .00063191
 BCCD(T)   -76.13546100    -.13648762    .00063315
 CASSCF    -76.05876129    -.05978790    .07733286
 MRCI      -76.13311835    -.13414496    .00297580
 ACPF      -76.13463018    -.13565679    .00146398

One can do even more fancy things, like, for instance, using macros, stored as string variables. See example oh_macros.com for a demonstration.



P.J. Knowles and H.-J. Werner
molpro@tc.bham.ac.uk
Jan 15, 2002