ILS Driver
The ILS Driver performs the Iterated Local Search algorithm, introducing a large conformational change in between local optimization runs.
ProtoSyn.Drivers.ILS — TypeILS(eval!::Union{Function, EnergyFunction}, jump!::Union{Function, AbstractMutator, Driver}, inner_driver!::Driver, callback::Opt{Callback}, max_steps::Int, temperature::Function)An ILS Driver instance. As such, this object is callable as a functor with the following signature:
(driver::ILS)(pose::Pose)This simulation performs an Iterated Local Search algorithm. In this type of simulation, an inner_driver! takes the system from a state to another, possibly optimizing the structure into a local minimum. As an example, this can be a MonteCarlo or a SteepestDescent Driver. The resulting structure is evaluated (according to an eval! EnergyFunction instance or custom function) and accepted or rejected according to the Metropolis Criterion, based on the current temperature of the simulation (see MonteCarlo for more information regarding the Metropolis Criterion). In either case, the accepted structure or the recovered previous state structure is subjected to a jump!, that is, a large conformational change, taking the system to a new conformational space. This simulation loop runs for max_steps iteration. Each step, a call to an optional Callback callback is performed. A companion ILSState DriverState instance is also updated each step and provided to the Callback callback.
Fields
eval!::Union{Function, EnergyFunction}- The evaluatorEnergyFunctionor custom function, receives aPoseposeas the single argument;jump!::Union{Function, AbstractMutator, Driver}- The jump method, receives aPoseposeas the single input argument, should introduce a relative high change in the conformation;inner_driver!::Driver- The inner loopDriver;callback::Opt{Callback}- An optionalCallbackinstance for the outer loop, receives two input arguments: the currentPoseposeand the currentDriverStatedriver_state;max_steps::Int- The total number of simulation steps to be performed in the outer loop;temperature::Function- The temperature function thermostat for the outer loop (see Available thermostats), receives the current step (as anInt) as the single input argument.
See also
Examples
julia> ils = ProtoSyn.Drivers.ILS(energy_function, dihedral_mutator, monte_carlo, cb, 1000, ProtoSyn.Drivers.get_linear_quench(1.0, 1000))
⚒ ILS Driver:
├── ● Evaluator:
| └── 🗲 Energy Function (4 components):
| +----------------------------------------------------------------------+
| | Index | Component name | Weight (α) |
| +----------------------------------------------------------------------+
| | 1 | TorchANI_ML_Model | 1.000 |
| | 2 | Caterpillar_Solvation | 0.010 |
| | 3 | Bond_Distance_Restraint | 1.000 |
| | 4 | Cα-Cα_Clash_Restraint | 100.000 |
| +----------------------------------------------------------------------+
|
├── ● Jump:
| └── ⚯ Dihedral Mutator:
| +----------------------------------------------------------------------+
| | Index | Field | Value |
| +----------------------------------------------------------------------+
| | 1 | angle_sampler | Function randn |
| | 2 | p_mut | 0.0100 |
| | 3 | step_size | 0.5000 |
| +----------------------------------------------------------------------+
| ● Selection: Set
| └── FieldSelection › Atom.name = r"C|N"
|
├── ● Inner Driver:
| └── ⚒ Monte Carlo Driver:
| ├── ● Evaluator:
| | └── 🗲 Energy Function (4 components):
| | +----------------------------------------------------------------------+
| | | Index | Component name | Weight (α) |
| | +----------------------------------------------------------------------+
| | | 1 | TorchANI_ML_Model | 1.000 |
| | | 2 | Caterpillar_Solvation | 0.010 |
| | | 3 | Bond_Distance_Restraint | 1.000 |
| | | 4 | Cα-Cα_Clash_Restraint | 100.000 |
| | +----------------------------------------------------------------------+
| |
| ├── ● Sampler:
| | └── ⚯ Dihedral Mutator:
| | +----------------------------------------------------------------------+
| | | Index | Field | Value |
| | +----------------------------------------------------------------------+
| | | 1 | angle_sampler | Function randn |
| | | 2 | p_mut | 0.0100 |
| | | 3 | step_size | 0.5000 |
| | +----------------------------------------------------------------------+
| | ● Selection: Set
| | └── FieldSelection › Atom.name = r"C|N"
| |
| ├── ○ Callback: Not set
| |
| └── ● Settings:
| Max steps: 10
| Temperature: linear_quench
|
├── ● Callback:
| └── ✉ Callback:
| +----------------------------------------------------------------------+
| | Index | Field | Value |
| +----------------------------------------------------------------------+
| | 1 | Event | energy_step_frame |
| | 2 | Frequency | 10 |
| +----------------------------------------------------------------------+
|
└── ● Settings:
Max steps: 1000
Temperature: linear_quenchProtoSyn.Drivers.ILSState — TypeILSState{T <: AbstractFloat}(step::Int = 0, converged::Bool = false, completed::Bool = false, stalled::Bool = false, acceptance_count = 0, temperature::T = T(0.0))
ILSState{T <: AbstractFloat}()A ILSState instance is a DriverState that keeps track of a ILS simulation status. Besides the default :step, :converged, :completed and :stalled fields, a ILSState instance adds the following tracking fields specific for ILS simulations:
acceptance_count::Int- The number of acceptedPosechanges by the Metropolis criterion;temperature::T- The current temperature of the simulation.
See also
Examples
julia> ProtoSyn.Drivers.ILSState{Float64}()
ProtoSyn.Drivers.ILSState{Float64}(0, false, false, false, 0, 0.0)
Figure 1 | A schematic overview of the different stages in a ILS Driver: (1) - A jump! introduces a relative large conformational change into the system's structure, taking the Pose into a new conformational space; (2) - An inner_driver! optimizes the new structure, finding new local minima.