[Ifeffit] Hard restraints?
Matt Newville
newville at cars.uchicago.edu
Wed Feb 9 21:46:16 CST 2005
Hi Norbert, Scott,
On Wed, 9 Feb 2005, Norbert Weiher wrote:
> towards the "bound (min,max)" issue:
>
> I think that is what many people dream of in IFEFFIT. By now,
> the implementation of a restraint is (as Matt's example
> showed) a bit scary. And we all have seen the tricks of fits
> like negative DW factors, silly CNs and so on. So a simple
> "bound" command as mentioned would for sure make - especially
> for new users - life a bit easier.
Just for completeness, there are two different ways to give
bounds to variables. The first uses max/min:
guess x_var = 1
def x = max(low, min(high, x_var))
which gives infinitely hard walls: x will never go outside the
bounds.
The second approach is to calculate a penalty when the value
goes out of bounds. My earlier post gave an ugly way to do
this, and a built-in 'bound()' function could also do this:
penalty = bound(x_var, low, high, scale)
x_var may go outside the limits, but with a penalty of
penalty = (x_var-high)*scale for x_var > high
penalty = -(x_var-low)*scale for x_var < low
A very large value for scale would make a very hard wall, but
the strength of the wall is tweakable. This penalty can then be
used as a restraint.
A bound() function would be easy enough to implement, and I'll
do this for the next vesion (but see below).
Possibly related to this, Bruce has suggested a couple of times
that restraints should be implemented with a command restraint()
similar to set() or def() rather than an additional scaler
parameter to feffit(). That might fit in with this....
--Matt
On upcoming versions:
The source code for next version of Ifeffit won't be for several
weeks (I won't start working on it for at least two weeks). No
estimate on a Windows dll. Did I mention that releases of
Windows binaries and dlls will lag significantly? I did ask for
feedback about a recent windows update and got exactly two
responses. I also asked for help building windows executables
and heard no replies. I take this to mean that there is little
interest in the Windows versions of these programs. I cannot
make Windows executables for Athena, Artemis, etc even if I
wanted too, and don't expect that Bruce will be making them real
soon either. That's all to say that if you're expecting a
windows version with these changes, you'll be waiting a while.
More information about the Ifeffit
mailing list