doNonLinearFit(self,
ipoint,
guessparams,
reactiveatoms,
mixprevious,
logger=None)
|
|
Using the interpolated redundant internal coordinates and
interpolated Cartesian coordinates obtain the final set of
Cartesian coordinates for this reaction path point by
minimizing a sum-of-squares error function using non-linear
least sqaures, i.e.
error = \sum_{bonds} bondweight*(r(a,b) - r^{i}(a,b))**2
+ \sum_{angles} angleweight*(theta(a,b,c) - theta^{i}(a,b,c))**2
+ \sum_{dihedrals} dihedralweight*(tau(a,b,c,d) - tau^{i}(a,b,c,d))**2
+ \sum_{atoms} cartweight*[(x(a) - x^{i}(a))**2 + (y(a) - y^{i}(a))**2
+ (z(a) - z^{i}(a))**2]
where those variables marked with "^{i}" are the interpolated
quantities and where
r(a,b) = r(x(a), y(a), z(a), x(b), y(b), z(b)) = norm(vec(a,b))
theta(a,b,c) = arccos[(vec(a,b) \dot vec(c,b))/(norm(vec(a,b))*norm(vec(c,b)))]
tau(a,b,c,d) = arccos[((vec(c,b) \cross vec(a,b)) \dot (vec(d,c) \cross vec(b,c)))
/ (norm((vec(c,b) \cross vec(a,b)))*norm((vec(d,c) \cross vec(b,c))))]
The 3N Cartesian coordinates, x(a), y(a), z(a), x(b), ..., z(N),
are choosen so as to minimize the error.
@type ipoint: Point
@param ipoint: interpolated point information
@type guessparams: list of floats
@param guessparams: initial parameters, i.e. Cartesian coordinates of the
reactive atoms
@type reactiveatoms: list of ints
@param reactiveatoms: atomic indicies of reactive atoms
@type mixprevious: float
@param mixprevious: specifies to what extent the optimized
Cartesian coordinates from the previous reaction path point
are mixed with the coordinates determined by interpolation
at the current point.
@type logger: logging.getLogger
@param logger: output logger
@rtype: list
@return: optcartesians, non-linear-optimized Cartesian
coordinates for this sample point.
|