I'm trying to calculate energies controlling the distance between 2 specific atoms. So I want to perform a geometry optimization with the constraint of a fixed distance (bond length) between the two atoms.
I've learnt how to do this using
geometry
...
zcoord
bond 1 2 3.14 constant
end
end
This approach using zcoord should work best for me. But I understood from
https://nwchemgit.github.io/Constraints.html that it should be possible to achieve a similar result using
CONSTRAINTS with a spring bond. I'd like to understand how to apply that approach.
When I try adding a constraints section, it seems to get ignored. The spring bond is read in, but it does not affect the geometry optimization.
Here is a sample input file, attempting to construct a distorted water geometry with the second OH bond constrained to 3.14 a0 using a stiff spring with constant k=100 au.
start water
title "water test bond length control"
charge 0
geometry noautosym
O -1.58195 1.23767 0.00626
H -0.76502 0.97602 0.69485
H -1.24809 2.02345 -0.68735
end
basis
* library def2-svpd
end
CONSTRAINTS fixedbond
spring bond 7 15 100 3.14
END
SCF
direct
maxiter 100
noprint "final vectors analysis"
end
driver
xyz
end
task scf optimize
But it optimizes to standard symmetric water with bond lengths 1.7826 au.
What needs to be done to apply the spring bond constraint?