Disclaimer: This answer concerns the use of Gaussian 16. While the
ModRedundant interface is retained and therefore the same restrictions also apply to it as mentioned in the other answer. However, there is now a newer way of using internal coordinates as explained below.
The new magic is provided by the generalised internal coordinates (GIC), which provide awesome new ways of defining input. It is invoked via the
opt interface and the option specified is
GIC. That alone doesn't let you perform scans, it just changes the internal use of coordinates and builds them. It has to be combined with the usual
ModRedundant, or the new
GIC would then be redundant) options.
The latter invokes the reading of a new input section after the molecule definition, just like in Gaussian 09. However, if you read through the info page, you will quickly notice, that many more options are possible, including mathematical operations. In this way you can define intermediate anchors which you may use as substitutes for dummy atoms. Dummy atoms in the geometry definition still don't count, and are completely superfluous with this approach.
The following input will perform the scan that you initially intended. It will break close to the end, as a four-membered ring will form and with two sides and the mid-points distance fixed, it simply runs out of cycles. You may want to adopt the input according to your needs. I'll explain a little more below the input-file.
C 0.000000 0.000000 0.000000
N 0.000000 0.000000 1.451901
C 1.325038 0.000000 2.055476
C 1.991320 1.377897 2.032970
C 1.229182 2.449098 2.809397
C 1.309917 2.335179 4.306919
H 1.218960 -0.323776 3.083767
H 1.990264 -0.714465 1.564774
H 2.993872 1.281489 2.436811
H 2.106328 1.711600 1.006802
H 1.602469 3.443240 2.566292
H 0.178120 2.455789 2.536445
H 0.708887 3.065770 4.854632
H -1.016528 -0.113770 -0.358506
H 0.375985 0.943036 -0.379032
H 0.606031 -0.798850 -0.431982
O 1.974063 1.543637 4.907309
H -0.496745 -0.808017 1.771266
The first line of the GIC input defines the x-coordinate of the centre of the CO bond, and the following two do the same for y and z. They are set to inactive as we only need them as an intermediate anchor for the distance. They will therefore not show up in the output.
The fourth line freezes the CO bond length. I decided to include that because it is part of your initial set-up. After running the calculation I think it should be relaxed though.
The four lines after that define the same as above for the NH bond.
The second to last line defines the distance between the centres. The multiplication with
0.529 converts from bohr to angstrom. That is basically only necessary because it makes the following operation, the actual scan in the last line, easier to specify.
This new interface therefore provides many wonderful opportunities, and possibilities for the most exotic scans. However, it also lets you define certain values to be printed in the output, for much easier post-processing. I can only recommend reading the manual and making a lot of use of this new system.
In order to not leave you hanging dry, here is the resulting scan animated: