Compound Driver
Similar to the Compound Mutator, a Compound Driver joins and sequentially calls a set of Driver
and AbstractMutator
instances, as well as custom sampling functions (the only difference to a CompoundMutator
is the addition of Driver
instances as callable objects).
ProtoSyn.Drivers.CompoundDriver
— TypeCompoundDriver(drivers::Vector{Union{Function, AbstractMutator, Driver}}; [p::Float64 = 1.0])
A CompoundDriver
Driver
instance. As such, this object is callable as a functor with the following signature:
(driver::CompoundDriver)(pose::Pose)
A CompoundDriver
Driver
groups several Driver
, AbstractMutator
and custom functions, calling each of the components sequentially. Does not sync!
changes, this task is left to each individual Driver
or AbstractMutator
instance. p
defines the probability of running this CompoundDriver
when called (From 0.0 to 1.0).
In contrast with CompoundMutator
, this Driver
does not accept an AbstractSelection
modifier. This may change in future versions of ProtoSyn.
Examples
julia> ProtoSyn.Drivers.CompoundDriver([monte_carlo, monte_carlo])
⚒ CompoundDriver Driver (2 elements) (p: 1.0):
├── ⚒ 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
|
└── ⚒ 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