Synopsis | Description | Input | Output | Program limits | Notes |
bx1fitPlls
program derives coefficients for
potential-energy function by a linear least-squares method.
bx1VIBsol
or bx1HRsol
are stored in a file
named 'basefilename.inp' when a key 'outputOption'
is found in 'basefilename.fit'.
bx1fitPlls
consists of;
1) | * title, |
2) | * output option, |
3) | regression function, |
4) | x–y (or y', y'', ...) data table, and |
5) | * 'continue' block which are
merely copied into an input file for bx1HRsol or bx1VIBsol . |
'#'
followed by at least one white-space character is a title line, which
is transferred to the head part of bx1HRsol
or
bx1VIBsol
input file 'basefilename.inp'.
'!'
, to the end of the
line is regarded as comments and ignored, except in the
'continue'
block, in which any text including
'!'
is copied to the input for bx1HRsol
or
bx1VIBsol
.
outputOption potential-typewhere
potential-type
must be either
'powerSeries'
or 'FourierSeries'
for the input
for bx1VIBsol
or bx1HRsol
, respectively.
It should be noted that bx1fitPlls
can use any function
consist of the function listed below (constant, power, sine, cosine,
logarithm), bx1VIBsol
can only use a power series potential
and, for bx1HRsol
, it must be a Fourier series.
'optFuncs'
block is used to specify the
parameter-terms, ai fi(x),
as;optFuncs{ func-1 (order-1) [mult-1] func-2 (order-2) [mult-2] ... }where
func-i
, order-i
, and mult-i
are
function type, order, and multiplication factor, respectively, of the
i'th function. Below is an example input for a
second-order polynomial,optFuncs{ const pow 1 pow 2 }The function type,
func-i
, must be one of 'pow'
[xk], 'cos'
[cos(kx)],
'sin'
[sin(kx)], 'ln'
[ln(x)]
(natural logarithm), and 'const'
[1] (constant).
The order input,
order-i
, is necessary for pow
, cos
,
and sin
. The i'th function value is multiplied by
mult-i
when it is specified. For example,optFuncs{ pow 2 0.5 }specifies a harmonic oscillator function, y = (1/2)kx2. Clearly, this is a redundant parameter since the same problem can be also solved by specifying a function, y = ax2, and, afterward, the force constant, k, can be derived from a using a = (1/2)k. However, it may be useful to retain the physical meaning of the parameter.
'fixFuncs'
block as;fixFuncs{ c-1 func-1 (order-1) [mult-1] c-2 func-2 (order-2) [mult-2] ... }where c-i is the constant coefficient. The example below is a second-order polynomial, but the coefficient for the first-order term is fixed to 0.324.
optFuncs{ const pow 2 } fixFuncs{ 0.324 pow 1 }
'xyTable'
block as follows.xyTable{ [deriv_order-1] x-1 dny-1 [w-1] [deriv_order-2] x-2 dny-2 [w-2] ... }where
deriv_order-i
, x-i
, dny-i
,
and w-i
are order of the derivative,
x (independent variable), y (dependent variable) or its
derivative, and weight, respectively, for the regression analysis.
Below is a simple examples containing the x-y data only.xyTable{ -1.02 122.8 0.03 0. 1.11 111.2 }
'deriv_order-i'
optional term,
for which 'deriv'
or 'deriv1'
stands for the
first derivative, 'deriv2'
for second derivative,
etc. The following is an example using first and second
derivative at x = 0.03.xyTable{ -1.02 122.8 0.03 0. deriv1 0.03 0. deriv2 0.03 229.1 1.11 111.2 }When the third field, w-i, is present, it is used to weight the regression analysis. Default weight is unity (1.0).
'continue{'
and terminates with
'}'
, is nothing to do with the
bx1fitPlls
, but are merely transferred to the input
for a subsequent tool, bx1VIBsol
or bx1HRsol
.
It is a convenience for repeated fit-and-solve procedures
in which one may need to repeat manual 'copy & paste' tasks
without this feature.
===== results of linear least squares regression ===== Function: y = a0 + a1 * x + a2 * x^2 y' = a1 + a2 * 2*x y" = a2 * 2 Optimum parameters (+-) standard deviations (relative) a0 = -6.7444281e+000 (+-) 5.7137802e+000 ( 84.72 %) a1 = -1.2905306e+001 (+-) 4.7173646e+000 ( 36.55 %) a2 = 1.1251074e+002 (+-) 3.8602164e+000 ( 3.43 %) Parameter correlation coefficients a0 a1 a1 0.00229 a2 -0.50969 -0.06898
bx1VIBsol
or
bx1HRsol
bx1VIBsol
,
basefilename.inp, is created when
outputOption powerSeries
is found in the bx1fitPlls input
and the regression function is confirmed to be a power series.
Similarly, outputOption FourierSeries
option is
used to prepare a Fourier series input for bx1HRsol
.
See reference manuals for bx1VIBsol and
bx1HRsol for details of these input files.
bx1FitPlls
calls DPOSV routine (linear
equation solver for real symmetric matrix) in
LAPACK
written by FORTRAN. Only one limitation hard-wired in the source
codes is in the declaration part of static arrays which are passed to
FORTRAN routines. This can be found in 'libnumLls.h' file
at the beginning of basicLinLsSq
class
declaration;class basicLinLsSq { protected: enum { MXNPAR = 50 }; // maximum number of fitting parametersthat is, the maximum number of fitting parameters is 50. All the other working variables use dynamically allocated memory and the system resource may limit the program execution.