Minimize Database


Introduction

A minimize database is created when the minimize command is invoked from BTCL. The Minimize database is of type Minimize in the CurrentDatabase table. The purpose of the minimize database is to record the series of steps taken during the minimization process. It is also possible to access the minimize database during the minimization in order, for example, to implement particular stopping strategies.

The Iteration table is always created along with the database. It has eight (8) columns:

   1. Method                     (type = string)                     
   2. SubMethod                  (type = string)                  
   3. StepsTaken                 (type = int)                    
   4. EnergyCalls                (type = int)                   
   5. InitialMaximumDerivative   (type = double)   
   6. ToleranceMaximumDerivative (type = double) 
   7. CurrentMaximumDerivative   (type = double)   
   8. TimeInMethod               (type = double)    
The contents of the columns are, respectively:

  1. The current method used (steepest descents, conjugate gradients, Newton).
  2. The specific sub-method used (BFGS, DFP, etc.).
  3. The number of iterations taken for the method.
  4. The number of energy calls taken for the method.
  5. The initial maximum derivative when the minimization begins for the method.
  6. The convergence tolerance specified for the method.
  7. The current maximum derivative when the minimization is being performed for the method.
  8. The elapsed CPU time (in seconds) taken by the method.
A new row is created every time a new method of minimization is specified.

Additionally, when BFGS is specified as the Newton method, a Misc table is created under the Minimize database, which has one (1) column, called InverseHessian, of type OA_DOUBLE, which contains the inverse Hessian. Only the latest Hessian calculated is kept in the Misc table, meaning that the Misc table has, at most, one (1) row at any time.


Example 1 - Access to the Minimize Database during a Minimization

To access the Minimize database, first create a database handle. This can be done any time that minimization is running but it may be more efficient to do so once, before the minimization starts. This is accomplished with the first execute statement in the minimize command:

BTCL > minimize \
    iteration_limit = 20 \
    execute +before frequency = 0 \
        command = {database handle min_h Minimize.; database print $min_h} \
    execute frequency = 1 before = 1 after = 1 \
        command = {$min_h print Iteration; print output energy_summary = 1 \
            internal_energy = 1 nonbond_energy = 1}
The second execute statement uses the database handle to print out the Iteration table (in addition to performing other commands to output energy summaries).

A sample output of the Iteration table looks like:

{
    Row  Method             SubMethod      StepsTak  EnergyCa  InitialM  Toleranc  CurrentM  TimeInMe
    ---  -----------------  -------------  --------  --------  --------  --------  --------  --------
     0)  SteepestDescent                          0         1     71.95    1000.0     71.95    0.3000
     1)  ConjugateGradient  PolakRibiere          4         8     71.95      10.0      7.62    0.3500
     2)  NewtonMethod       NewtonRaphson         3         4      7.62       0.0      0.00    0.5300
}

Example 2 - Access to the Inverse Hessian after a Minimization

For the Broyden-Fletcher-Goldfarb-Shanno minimization method, an inverse Hessian is produced; it can be accessed as follows:

BTCL > minimize \
          iteration_limit = 1000 movement_limit = 0.200 \
          sd \
            convergence = 1000.0 line_search_precision = 0.100 \
            final_convergence = 1000.0 \
          cg \
            convergence = 10.0 method = polak \
            line_search_precision = 0.100 final_convergence = 10.0 \
          newton \
            convergence = 1.0e-13 method = bfgs \
            line_search_precision = 0.900 max_atoms = 200 \
            final_convergence = 1.0e-13

BTCL > database handle min_h Minimize.
BTCL > database print $min_h
BTCL > $min_h get i_hess Misc.InverseHessian
BTCL > Utility_CastHessianMatrix i_hess
where Utility_CastHessianMatrix is a BTCL script to cast the inverse Hessian into a matrix object, called i_hess, which is suitable as input for other Discover commands.


Main access page Advanced-Use access.

BTCL Databases access

Copyright Biosym/MSI