Page 1 of 1

error on website for dimer method

Posted: Sat Mar 01, 2008 5:09 am
by cpp6f
After looking at the source code for the dimer method, I noticed what I believe to be an error on the webpage http://theory.cm.utexas.edu/vtsttools/dimer/
At the bottom, where the input parameters are described, it looks like the descriptions of DFNMin an DFNMax are switched. DFNmin is the minimum rotational force at which at least one rotation is done. DFNMax is the rotational force at which rotations after the first stop. This seems more intuitive anyway, and I was about to change the code to make it work this way, when I realized it did, and the web page was just wrong.

Re: error on website for dimer method

Posted: Sat Mar 01, 2008 4:39 pm
by graeme
I guess I don't quite understand the issue - do you think that the Min/Max description in the variables is misleading, or are you saying that there is an error in the implementation? I've tried to clarify the variable descriptions:

DFNMin: Magnitude of the rotational force below which rotation stops
DFNMax: Magnitude of the rotational force above which at least one rotation iteration is performed

Re: error on website for dimer method

Posted: Wed Mar 05, 2008 1:47 am
by cpp6f
Based on the code in the subroutine Dimer_Step (pasted below), control will be passed to the optimizer without ever calling RotateDimer if FNr<FNMin. If this condition is not met, one CG step will be performed, and the condition FN1r<FNMax will determine whether control is passed to the optimizer or another CG step is performed. This is the opposite of what the website says and what you said in the reply. I don't know which one is correct (the website or the code), but they don't seem to match.

IF (FNr<FNMin) THEN
IF (IU6>=0) WRITE(IU6,*) 'Dimer: Rotation converged'
IF (IU6>=0) WRITE(IUdim,'(I5,5F14.5)') Itr,F0r,FN1r,U0,CN,0._q
OptFlag = .true.
ELSE
CALL RotateDimer()
IF (FdStep) CALL ProjectDimer()
IF (RotNum>RotMax) THEN
IF(IU6>=0) WRITE(IU6,'(A,/)') ' Dimer: RotNum > RotMax'
OptFlag = .true.
ELSE IF (FdStep.AND.FN1r<FNMax) THEN
IF (IU6>=0) WRITE(IU6,'(A,/)') ' Dimer: FN < FNMax'
OptFlag = .true.
END IF
END IF

Re: error on website for dimer method

Posted: Wed Mar 05, 2008 2:32 am
by graeme
Ah, I think I see the problem. Let me summarize and try another modified description - the code is doing what I want it to do.

if (FNr < FNMin): do not rotate, pass control back to the optimizer
if (FNMin < FNr < FNMax): do at least 1 rotation
if (FNr > FNMax): rotate until FNr<FNMax or the number of iterations reaches RotMax

New descriptions:

DFNMin: Magnitude of the rotational force below which the dimer is not rotated
DFNMax: Magnitude of the rotational force below which dimer rotation stops. If the rotational force is between DFNMin and DFNMax, at least one rotational iteration is done.

Thanks for your patience; hopefully I got it right this time.