Customizing the Workflow#
BindFlow is highly customizable. In this section, we will discuss the options accessible through the global_config keyword of the BindFlow’s runners. The global_config is a nested Python dictionary. A useful tip is to write this dictionary in YAML format, which is essentially a “human-readable dictionary.” Here, we will go through each section of this YAML file:
Important
The options provided on this configuration have higher priority to those ones passed as keywords to the runner function. For example:
Pass to the runner
dt_max=0.003and specify for an specific simulationdt=0.004(see MDP section)Pass to the runner
threads=12and specify formdrunthe flag-nt 10(see mdrun section)
cluster#
This section specifies the computational resources required by the selected scheduler (see the BindFlow’s deploy section). It allows you to control the allocated resources for two types of jobs:
Main Job (
job): This job primarily waits and launches other jobs.Calculation Jobs (
calculation): These jobs perform the actual calculations.
The job section is optional; if it is not defined, the main job will use the same resources specified in the mandatory calculation section.
extra_directives (optional)#
dependencies (optional)#
This is a list of executable commands that should be run before any gmx command. These commands inject the necessary dependencies to ensure the proper execution of the gmx command.
mdrun (optional)#
The user can customize the gmx mdrun command. By default, the command gmx mdrun -nt {threads} -deffnm {simulation_step_name} is built. You can adjust the mdrun options for the ligand, complex, or both simultaneously using the keywords ligand, complex, and all, respectively.
nwindows (optional)#
Number of windows for each step of the perturbation simulations for both the ligand in the solvent and the (membrane) protein-ligand complex. The following is the thermodynamic cycle followed in BindFlow:
graph TB
no_interacted_lig_in_prot(Non Interacted Restrained Ligand)
no_coul_lig_in_prot(Restrained Ligand without Coulomb)
lig_in_prot(Restrained Interacted Ligand)
free_lig_in_prot(Free Fully Interacted Ligand)
free_lig_in_water(Free Fully Interacted Ligand)
free_no_coul_lig_in_water(Free Ligand without Coulomb)
free_no_interacted_lig_in_water(Free Non Interacted Ligand)
no_interacted_lig_in_water(Non Interacted Restrained Ligand)
subgraph In the Protein Pocket - 'protein'
direction BT
no_interacted_lig_in_prot -- Activate van der Waal - 'vdw' --> no_coul_lig_in_prot -- Activate Coulomb - 'coul' --> lig_in_prot -- Remove Restraints - 'bonded' --> free_lig_in_prot
end
subgraph In Water - 'ligand'
direction TB
free_lig_in_water -- Remove Coulomb - 'coul' --> free_no_coul_lig_in_water -- Remove van der Waal - 'vdw' --> free_no_interacted_lig_in_water -- Activate Restraints --> no_interacted_lig_in_water
end
free_lig_in_water -- dG_binding --> free_lig_in_prot
no_interacted_lig_in_water -- dG = 0 --> no_interacted_lig_in_prot
mmpbsa (optional)#
This section is used to set the MM(PB/GB)SA calculations. These parameters are passed to gmx_MMPBSA package through the .in file.
mdp (optional)#
This section is used to control all Molecular Dynamic Parameters for every single simulation
You can explore what are the steps involved in your calculation:
from bindflow.utils.tools import list_if_file
from bindflow.mdp._path_handler import _TemplatePath
print(list_if_file(_TemplatePath.complex.membrane.equi))
from bindflow.utils.tools import list_if_file
from bindflow.mdp._path_handler import _TemplatePath
print(list_if_file(_TemplatePath.complex.soluble.fep))
from bindflow.utils.tools import list_if_file
from bindflow.mdp._path_handler import _TemplatePath
print(list_if_file(_TemplatePath.complex.membrane.mmpbsa))
from bindflow.utils.tools import list_if_file
from bindflow.mdp._path_handler import _TemplatePath
print(list_if_file(_TemplatePath.ligand.equi))
You can also take a look a the default parameters of the step. In the following example, you can print the parameters for the prod step of the membrane protein-ligand complex equilibration phase in the MDP format.
from bindflow.mdp._path_handler import _TemplatePath
from bindflow.mdp.mdp import MDP
print(MDP().from_file(_TemplatePath.complex.membrane.equi + "/prod.mdp").to_string())
Suggested options for MM(PB/GB)SA calculations#
The default MDP options are optimized for FEP calculations. However, for MM(PB/GB)SA calculations, we recommend using a less resource-intensive scheme. This approach has been shown to be effective, as demonstrated in the main BindFlow publication.