Geometry optimization of counterpoise corrected energies is possible by performing for the total system as well as for each individual fragment separate FORCE calculations. The gradients and energies are added using the ADD directive. This requires that NOORIENT has been specified in the geometry input, in order to avoid errors due to unintended rotation of the system. This default can be disabled using the NOCHECK option, see ADD above.
The way a counterpoise corrected geometry optimization works is shown in the following example. Note that the total counterpoise corrected energy must be optimized, not just the interaction energy, since the interaction energy depends on the monomer geometries and has a different minimum than the total energy. The interaction energy could be optimized, however, if the monomer geometries were frozen. In any case, the last calculation before calling OPTG must be the calculation of the total system at the current geometry (in the example below the dimer calculation), since otherwise the optimizer gets confused.
The next example shows how the same calculations can be done using numerical gradients. In this case, first the total counter-poise corrected energy is formed and then optimized. Note that the ADD command does not work for numerical gradients.
In the last example the monomer structures are kept fixed, and the interaction energy is optimized.