## 5.3.1 Monte Carlo optimization

In the Monte Carlo (MC) optimization we start from an initial guess for the energies (=1,,10,loop) and do a random walk in the space of parameters in order to minimize the error function defined in Eq. 5.2. All MC techniques require the introduction of a fictive temperature that controls how the space of parameters is explored. This method is just a standard Simulated Annealing optimization algorithm [140] adapted to our particular problem that speeds up considerably the time to find the minimum as compared to standard Steepest Descent algorithms. The MC optimization is composed of the following steps:

1. Initial guess. The error function is initially evaluated with the UO energies. We start from the unified values to enforce the system to explore the basin of attraction of these values.
2. Quench algorithm. The system is allowed to evolve until the total error reaches a minimum. This stage involves several steps. First, a random variation of the NNBP energies is proposed. The set of new energies is accepted if the new calculated value of the error function decreases and the process is repeated. If the error function increases, the set of energies is rejected and a new energy values are proposed. When the acceptance ratio of the proposed steps is lower than 3%, the system is considered to have newly reached a minimum. This method is essentially a steepest descent algorithm with the advantage that the free energy derivatives need not be calculated (see Fig. 5.8a).
3. Heat-quench algorithm. Once the system has found the first minimum, we start another MC search to explore other solutions in the vicinity of the minimum. Here we have to define a fictive temperature to accept or reject the proposed NNBP energies. Each new proposal is accepted or rejected using a Metropolis algorithm. According to the Metropolis algorithm, a move is always accepted if (where is the change in the error after the proposal). If , a random number from a standard uniform distribution is generated and the move accepted if and rejected if .

During the heat-quench algorithm, the system is heated up to a large fictive temperature until the error is 50% higher than the error of the first minimum. Afterwards, the system is quenched until the acceptance ratio of steps is lower than 3%. This procedure is repeated many times. The multiple solutions found after the initial minimum allow us to estimate the error in the NNBP energies (see Fig. 5.8b). The possible values for the NNBP energies are Gaussian distributed in a region of width approximately equal to 0.05 kcalmol (see Fig. 5.8c).

The error landscape defined by Eq. 5.2 is not rough and there is no necessity to use a MC algorithm. Nevertheless, we find that the MC optimization with the heat-quench scheme is computationally more efficient (i.e., faster) than other optimization algorithms and other fictive temperature schemes (see Figs. 5.7 and 5.9). The analysis revealed that the optimization algorithm is robust and leads to the same solution when the initial conditions are modified, as will be shown in the next section. Different molecules and different sequences converge to energy values that are clustered around the same value. Appendix L describes in further details the errors in the MC optimization.

JM Huguet 2014-02-12