AdaptiveFlow
AdaptiveFlow is an in silico platform consisting of three modules (AFLP, AFVS and AFU) and readymade ligand libraries for digital screens. On this part, common platform-wide options are described that span a number of modules.
Python codebase
AdaptiveFlow has been solely rewritten in Python, a programming language that allows the implementation of extra refined and superior code whereas lowering upkeep work. This rewrite has additionally made it simpler for scientists and programmers to affix the open-source venture and/or lengthen AdaptiveFlow independently, as Python is essentially the most extensively used programming language in scientific communities. In distinction, the earlier model of AdaptiveFlow was written in Bash.
Parallelization
Along with being rewritten in Python, a key purpose for AdaptiveFlow was to enhance parallelism to lower the general time required for screening. AdaptiveFlow has elevated the degrees of parallelism in comparison with the earlier model. To assist handle this elevated parallelism, it maintains the usage of collections that group round 1,000 ligands collectively, lowering the overhead of scheduling particular person ligands for processing.
AdaptiveFlow additionally introduces the idea of subjobs, that are atomic items of computational work that embrace a number of collections for processing. These subjobs are routinely generated by AdaptiveFlow to match the runtime necessities specified within the job configuration. Subjobs are then mixed into bigger teams referred to as work items, that are designed to permit schedulers to effectively course of the excessive ranges of parallelism generated by AdaptiveFlow. These work items are despatched as job arrays to the top schedulers for processing. By optimizing for parallelism, the group was in a position to obtain 5.6 million concurrent vCPUs operating AdaptiveFlow.
Native cloud help
The AFLP and AFVS modules of AdaptiveFlow can run on pc clusters or on the cloud through the use of a batch system. Presently, two batch programs are supported, Slurm and AWS Batch. Slurm is ready to run on many cloud infrastructures, together with Google Cloud, Microsoft Azure and AWS. Inside AWS, AdaptiveFlow makes use of AWS Batch and S3 object storage. CloudFormation is used to arrange AdaptiveFlow and all needed parts. The AWS-native structure permits AdaptiveFlow to make use of thousands and thousands of vCPUs in parallel, whereas the earlier model was solely demonstrated to scale as much as 160,000 vCPUs.
AdaptiveFlow is ready to use varied options from AWS along with supporting conventional clusters, making it simpler to make use of and growing the dimensions of computations obtainable to researchers. A few of these options are as follows:
-
Scheduling and orchestration. AWS Batch is a cloud-native scheduler and orchestrator for containerized jobs. As a part of operating a job, AdaptiveFlow could make use of AWS Batch to routinely scale cloud infrastructure up and down as wanted and run the entire particular person subjobs. AdaptiveFlow also can routinely generate the Docker container used for processing, eliminating the necessity to perceive containerization or different infrastructure.
-
Object storage (Amazon S3). Along with the utilization of ordinary cluster filesystems, AdaptiveFlow helps the utilization of object storage for each ingesting of enter datasets and the output of the ensuing information from the processing.
-
Spot capability consciousness and spot resilience. Spot capability is unused computing capability that cloud suppliers make obtainable at tremendously discounted costs in comparison with regular on-demand entry. In alternate for a cheaper price, a workload operating on a spot occasion could also be reclaimed (stopped) with a brief warning. AdaptiveFlow is designed to reap the benefits of this capability mannequin through the use of shorter operating subjobs (roughly 30 min) and routinely rerunning jobs which have prematurely exited by integration with AWS Batch. Moreover, by integration with AWS Batch, AdaptiveFlow is ready to choose cases which might be much less prone to be interrupted by the ‘spot-capacity-aware’ scheduling technique.
The structure of AdaptiveFlow when deployed on AWS is proven in Supplementary Fig. 1. The structure makes use of a number of compute environments, every of which can comprise hundreds of cases (compute nodes). The cases are routinely allotted and deallocated when the job begins and ends, respectively. Particular person subjobs are allotted to the cases by AWS Batch till all subjobs have been accomplished. These subjobs run as Docker containers on the cases.
ARM
AdaptiveFlow can be in a position to run on the compute ARM structure when utilizing ARM-compatible decisions within the settings. AFLP is totally ARM suitable and AFVS is ARM suitable when docking applications are used that both make the supply code obtainable or present binaries for ARM. ARM-based computing infrastructure could be extra cost-efficient than conventional x86-based architectures.
Enamine REAL House
The REAL House (enumerated, model 2022q1-2) was ready utilizing AFVS. JChem Suite was used for molecule neutralization, stereoisomer enumeration, tautomer era, protonation state prediction, 3D coordinate calculation and the calculation of a number of molecular properties (JChem Suite 18.20.0; ChemAxon, Open Babel56 (model 2.3.2) was used as a backup program for protonation state prediction, 3D coordinate calculation and goal format conversion (all codecs besides SELFIES). The pip-installable SELFIES bundle ( was used for the conversion of molecules between SMILES and SELFIES. An outline of the processing steps and preparation strategies used is proven in Supplementary Desk 2.
A number of codecs
AdaptiveFlow supplies the REAL House library in ready-to-dock 3D codecs together with PDB, PDBQT, MOL2 and SDF. These codecs are suitable with a variety of docking applications for small molecules. The whole dimension of the ready-to-dock library is roughly 50 TB in compressed type for every of those codecs, totaling round 200 TB in compressed type (uncompressed, the library is round 2 PB). Along with these ready-to-dock codecs, the REAL House library can be supplied within the SELFIES31, SMILES57 and Parquet codecs.
AFLP
AFLP is the module of AdaptiveFlow devoted to the preparation of ligand libraries right into a ready-to-dock format and may deal with libraries of any dimension, together with ultralarge libraries. AFLP requires a batch system and helps Slurm and AWS Batch as batch programs. AFLP is configured utilizing a configuration file (instance proven within the Supplementary Data). Particulars on the workflow can be found within the Supplementary Data. The brand new model of AFLP has the below-described options.
Preparation into ready-to-dock format
The first activity of AFLP is to arrange ligands right into a ready-to-dock format. To perform this, AFLP desalts the unique ligands (in case they’re salts), neutralizes them, generates stereoisomers and tautomers, predicts the protonation states, computes the minimum-potential power conformation of the ligand (3D coordinates), optionally validates the generated 3D conformers and converts them into the specified goal codecs. In whole, over 100 output codecs are supported. An in depth overview of the processing steps could be seen in Supplementary Fig. 3. The help enter codecs are SMILES, SELFIES and amino acid sequences. AFLP makes use of exterior instruments reminiscent of ChemAxon’s JChem, Open Babel and RDKit ( to hold out the preparation steps. For lots of the preparation steps, the consumer can select which exterior software ought to be used. Particulars on which instruments can be found for every processing step could be present in Supplementary Desk 3.
Molecular property calculation
AFLP allows researchers to calculate quite a lot of physicochemical properties and molecular descriptors for the molecules within the enter ligand library, along with its major activity of getting ready them for molecular docking. By calculating properties reminiscent of quantitative estimate of drug likeness, logP, molecular weight and others (full checklist of supported properties in Supplementary Desk 2), researchers can extra successfully choose and prioritize ligands, which will help scale back the fee and time required for screens utilizing AFVS. AFLP makes use of principally exterior instruments to calculate the molecular properties, reminiscent of ChemAxon’s JChem ( Open Babel and RDKit (particulars in Supplementary Desk 3).
Automated tranche assignments
In AdaptiveFlow, ligand libraries are organized into tranches. Every tranche corresponds to a property of the ligands and is split into a number of intervals or classes. For instance, the molecular weight of the ligands can be utilized as a tranche kind after which partitioned into a number of classes or intervals reminiscent of 0–200, 200–300, 300–400, 400–500 and >500 Da. A number of tranches enable for the partitioning of a ligand library right into a multidimensional grid or desk, with one dimension corresponding to every tranche kind (ligand property).
Whereas the earlier model of AdaptiveFlow required that the enter ligand assortment was already organized and structured within the tranche format, AdaptiveFlow can routinely reorganize the enter ligand library into a brand new tranche output format on the premise of the computation of particular molecular properties of the ligands, as described above. This function is helpful as a result of most ligand libraries (for instance, from chemical compound distributors) are initially within the SMILES format and never within the tranche format. AFLP can then be used to arrange your entire library within the multidimensional grid or tranche format for AFVS.
To characterize how the Enamine REAL House library populates the 18-dimensional property grid utilized by AdaptiveFlow, we quantified tranche occupancy (the variety of molecules assigned to every grid cell) and summarized it as a histogram (Supplementary Fig. 37). We counted molecules per tranche throughout the complete library. The ensuing occupancy counts span a number of orders of magnitude; thus, we report the distribution utilizing logarithmically spaced occupancy ranges (1, 2–10, 11–100, 101–1,000, 1,000–10,000, 10,000–100,000, 100,000–1 million, 1 million–10 million and >10 million molecules per tranche). The histogram shows the variety of tranches in every occupancy vary (y axis), highlighting that solely a small fraction of the theoretical grid cells are populated and that populated tranches fluctuate extensively in dimension (from single-molecule tranches to extremely populated tranches exceeding 10 million molecules), with a mean of 5,600 molecules per populated tranche.
Assist of SELFIES
SELFIES31,32 has turn out to be one of the crucial in style line notation codecs for small molecules inside ML communities. The first purpose is that SELFIES are totally sturdy, which means that each SELFIES string corresponds to a sound molecule, which isn’t the case for SMILES. Thus, generative ML fashions can not create invalid molecules when utilizing SELFIES. AFLP now helps SELFIES as an enter format for the molecules along with SMILES. Moreover, your entire REAL House is free to be downloaded within the SELFIES format, enabling the creation of highly effective datasets.
Stereoisomer enumeration
One of many principal duties of AFLP is to arrange ligand libraries from unprepared codecs (for instance, SMILES) into ready-to-dock codecs. The brand new model of AFLP allows the enumeration of stereoisomers for the ligands, which was not attainable within the earlier model. Correct stereochemistry is crucial for digital screenings utilizing structure-based molecular docking however many ligand libraries in unprepared codecs (for instance, from chemical compound distributors) don’t comprise stereochemical data. The power to enumerate stereoisomers permits AFLP to incorporate this data within the ready ligand library, guaranteeing that the digital screening outcomes are correct.
Prolonged open-source help
The earlier model of AFLP required exterior instruments (from ChemAxon) that aren’t open supply for a number of the steps when getting ready ligands in a ready-to-dock format. The brand new model supplies the choice to decide on open-source alternate options for every of the steps to arrange molecules right into a ready-to-dock format. Particularly, Open Babel and RDKit are supported by AdaptiveFlow as open-source alternate options.
Enhanced velocity
AFLP has been improved by way of velocity in comparison with the unique model. Firstly, this has been achieved by AFLP utilizing its personal Java code to name the mandatory capabilities of ChemAxon’s JChem bundle by Nailgun, which tremendously reduces the variety of calls to Nailgun. Moreover, timeout parameters that may be adjusted by customers have been added to the management file, permitting AFLP to skip ligands that require unusually lengthy processing instances throughout preparation. These enhancements make AFLP extra environment friendly, sturdy and in a position to deal with bigger and extra chemically advanced ligand libraries.
Enhanced high quality checks
AFLP checks the validity of every ligand that it prepares within the ready-to-dock format by calculating the potential power of the ligand in 3D format utilizing Open Babel. This enables AFLP to routinely take away ligands which have an excessively excessive potential power, which could be a sign that the compound was broken or corrupted through the preparation course of. Moreover, AFLP helps elective plausibility checks on generated 3D conformers utilizing PoseBusters58. This helps to make sure the integrity and accuracy of the ready ligand library.
Software
AFLP was used to arrange the REAL House (model 2022q1-2). It was run on AWS utilizing over 5.6 million Intel vCPUs in parallel. Spot cases have been used and the used capability was sustained with out notable preemption. In whole, <0.1% of the used CPU hours have been interrupted due to preemption. The scaling conduct of AFLP was discovered to be completely linear (as proven in Supplementary Fig. 2). This demonstrates the effectivity and effectiveness of AFLP in getting ready massive ligand libraries in a ready-to-dock format.
AFVS
AFVS is the module of AdaptiveFlow devoted to ULVSs however also can display libraries of smaller sizes. It requires a batch system and helps Slurm and AWS Batch. AFVS is configured utilizing a configuration file (instance within the Supplementary Data). AFVS and AFU share many digital screening options, that are described in a later part. AFVS and AFLP share the identical parallelization mechanisms when utilizing Slurm or AWS Batch; subsequently, the scaling conduct of AFVS is predicted to be the identical as for AFLP, which was proven to be completely linear as much as 5.6 million CPUs (Supplementary Fig. 2).
Parquet output format
AFVS has the power to retailer output information within the Apache Parquet format, an open-source column-oriented information storage format. When utilizing this format, AFVS can reap the benefits of any database and question system that may learn this format, together with Amazon Athena, a serverless service that enables customers to effectively question output rating recordsdata saved in Amazon S3 (object storage) on AWS. Moreover, AFVS has a function for routinely postprocessing ATG prescreens utilizing Amazon Athena, enabling researchers to effectively put together the enter information for the ATG major screens. Instruments are supplied with AFVS to facilitate frequent queries however researchers also can create their very own queries utilizing the open-source format of the dataset.
ATG-VSs and benchmarks
Following completion of the ATG prescreen, tranches could be chosen for the ATG major display utilizing two principal methods. Within the first, particular person tranches from the 18-dimensional REAL House matrix could be manually chosen, providing fine-grained management over particular chemical subspaces. Within the second, choice could be restricted to a hyperrectangular area of the grid. That is achieved by figuring out the top-performing intervals (that’s, bins) inside every of the 18 molecular property dimensions and computing their Cartesian product to type a structured, intersecting subset of tranches. This hyperrectangle strategy allows chemically numerous but focused choice based mostly on a number of favorable properties. In each choice modes, customers outline the whole variety of molecules to incorporate within the ATG major display and AdaptiveFlow routinely prioritizes the tranches containing the best-performing consultant ligands.
To judge the effectiveness of ATG-VS, we carried out two sorts of benchmark research: (1) full-scale manufacturing benchmarks utilizing your entire Enamine REAL House and (2) smaller-scale ‘test-set-based’ benchmarks designed for fast prototyping and detailed comparability throughout completely different ATG configurations. Within the test-set-based benchmarks, we randomly chosen artificial reactions from the Enamine area to create a compound subset totaling roughly 5 million molecules. For every of the ten protein targets examined (listed in Supplementary Desk 7), a special random subset was used to make sure unbiased analysis throughout targets and screening situations.
The test-set-based benchmarks allowed us to systematically assess the advantages of ATG-VS in three configurations: customary ULVS (random choice), ATG with out lively studying and ATG augmented with the elective ML-based lively studying element. In distinction, the full-scale manufacturing benchmarks have been performed utilizing your entire 69-billion-compound library, however with out the lively studying step, to attenuate computational overhead whereas validating the efficiency of ATG-VS at scale. All docking in these benchmarks was carried out utilizing QuickVina 2 with default parameters, except in any other case specified. For the 100K ATG benchmark configuration introduced in Prolonged Knowledge Fig. 5, tranches for the first display have been chosen utilizing the hyperrectangle technique, enabling a balanced, property-informed sampling of chemical area.
ML classifier for tranche prioritization
To enhance the effectivity of ATG-VSs, the AdaptiveFlow platform incorporates an elective ML classification step into the first screening stage. This step prioritizes compounds which might be almost certainly to be high-affinity binders, thereby lowering the variety of molecules subjected to full docking. The ML classifier is utilized after the ATG prescreen and is used to filter undocked molecules throughout the chosen tranches earlier than docking.
The classifier is applied as a totally linked feedforward neural community designed to differentiate between promising and fewer seemingly binders. Compounds are represented utilizing Morgan fingerprints of size = 1,024 and radius = 2, generated by RDKit (model 2023.03.1). The mannequin is educated on docking scores obtained from all consultant molecules used within the prescreen. These scores are transformed into binary classification labels utilizing a percentile-based thresholding technique: the highest 25% of compounds with essentially the most destructive docking scores are labeled as optimistic examples (‘high-confidence binders’), whereas the remaining compounds are labeled as negatives. To mitigate class imbalance, the bulk class is undersampled throughout coaching.
The neural community structure contains 4 totally linked layers: an enter layer of 1,024 nodes, adopted by hidden layers of 512, 256 and 128 nodes, every utilizing ReLU activation. The output layer consists of a single sigmoid-activated node that outputs the anticipated binding chance. Hyperparameters and layer configurations have been chosen by restricted tuning utilizing cross-validation on the prescreen information. The mannequin is educated with the Adam optimizer (studying price: 0.001), binary cross-entropy loss and early stopping based mostly on validation loss with a persistence of 5 epochs. A validation cut up of 10% is used, with coaching capped at 50 epochs and a batch dimension of 256, though convergence usually happens earlier.
As soon as educated, the mannequin is utilized to all undocked compounds throughout the chosen tranches. Compounds with predicted binding chances larger than 0.5 are retained for full docking, whereas the remaining are filtered out. This filtering step usually reduces the variety of compounds subjected to docking by 30–70%, relying on the goal, whereas sustaining or bettering hit enrichment.
The ML classification module is totally built-in into the AFU surroundings and could be activated by a configuration parameter. The coaching and inference pipeline is applied in PyTorch (model 2.0.1) and helps GPU acceleration for scalable and environment friendly deployment.
AFU
AFU is the all-in-one model of AdaptiveFlow, combining each ligand preparation and digital screening right into a single streamlined workflow. It’s the third module alongside AFLP and AFVS. This new module provides many conveniences for workflows the place each ligand preparation and digital screenings must be carried out in tandem. Notably, AFU is designed to be run as a bundle, supporting roughly 1,500 docking protocols that may be run independently of job schedulers (Supplementary Desk 8). A conceptual overview of the workflow of AFU could be present in Supplementary Fig. 8 and an in depth UML workflow diagram is proven in Supplementary Fig. 14. Particularly, as enter, a consumer specifies the molecule to be docked (as a SMILES, SELFIES or amino acid sequence), the protein file, the docking web site and the docking program to be run. On the premise of the consumer’s decisions, error checks within the type of lacking docking-choice-specific recordsdata are carried out and calculations are run. Because of a profitable calculation, the docking rating and pose are returned. AFU could be run in standalone mode, the place it’s run by the command line and specifies the choices utilizing a configuration file. This mode is for instance helpful for scientists within the drug discovery communities who need to perform molecular dockings in essentially the most handy and easy means, with out requiring computational experience, whereas having numerous docking protocols obtainable. As well as, AFU could be run in API mode to straight interface with different applications and code, which might, as an example, be helpful for the ML communities that develop new strategies for drug discovery.
AFU is available in two variations. The primary is devoted to single workstations or compute nodes with out multinode parallelization. The second, AFUparr, is the parallelized model of VitualFlow Unity. Designed to function seamlessly on SLURM programs, AFUparr permits customers to simply parallelize the workflow on a bigger variety of CPUs and GPUs. Execution inside SLURM environments is extremely optimized, with computations distributed in parallel throughout a number of CPUs and nodes. This design ensures environment friendly linear scaling relative to the variety of molecules supplied.
Joint options of AFVS and AFU
The AFU and AFVS modules help the identical docking protocols and, subsequently, share all docking-specific options.
Supported docking protocols
AdaptiveFlow helps roughly 40 docking protocols, listed in Supplementary Tables 4–6. These embrace software program that performs each pose prediction and scoring (Supplementary Desk 4), solely pose prediction (Supplementary Desk 6) and solely scoring (Supplementary Desk 5). Notably, inside AdaptiveFlow, the scoring capabilities could be mixed with pose prediction strategies, giving rise to roughly 1,500 strategies (listed in Supplementary Desk 8). We notice that lots of the newly supported docking software program possess particular options reminiscent of protein–protein or RNA docking, specific parameterization of solvents or metals and covalent docking. In Supplementary Tables 4–6, we describe these as ‘particular options’. Moreover, a key consideration for ULVS is the timing required for finishing up a single calculation. As such, in Prolonged Knowledge Fig. 9, we offer timing estimates for operating a single calculation, averaging over 25 unbiased runs for all docking applications.
Particular sorts of ligands
Along with conventional small molecule ligands, AdaptiveFlow helps the usage of peptides, protein ligands and covalently bonded ligands in AFVS. Peptides are of accelerating curiosity as therapeutics and several other docking applications already help their use. For protein–protein or RNA docking, specialised applications require two protein or RNA targets to generate co-complexes. Covalent docking includes decreased flexibility for sure components of the enter molecule throughout pose sampling and some specialised docking applications help this ligand kind (Supplementary Desk 4).
Enhanced efficiency
The QuickVina 2 molecular docking software is used to speed up AutoDock Vina with no lack of accuracy27. QuickVina 2 execution was profiled in an effort to enhance efficiency even additional. To ascertain baseline efficiency, the open-source GitHub repository was cloned and the qvina_1buffer department was compiled utilizing the GNU C++ compiler (model 9.4), the Increase C++ libraries (model 1.79, and the default parameters (construct directions: A single docking experiment of avanafil binding to unsolvated PDB 5FNQ was run by the Intel VTune Profiler to search for efficiency bottlenecks. Sadly, the execution profile was flat. Probably the most time-consuming perform accounted for lower than 20% of the whole runtime. Tuning the supply code would give quickly diminishing returns on the threat of affecting accuracy; therefore, compiler-level optimization was the best choice to enhance efficiency. QuickVina 2 was rebuilt utilizing the Intel oneAPI DPC++/C++ Compiler (model 2022.2.0.20220730) and aggressive optimization: automated vectorization, interprocedural optimization and relaxed floating-point constraints. Profile-guided optimization was additionally tried nevertheless it didn’t enhance efficiency. The ultimate executable was 18% sooner than the default builds with no lack of accuracy. The brand new binaries are supplied on the QuickVina and AF homepages.
GPU help
A number of of the docking applications help GPUs, which might strongly scale back computation time and value. For pose prediction, these embrace AutoDock-GPU52, QVina2-GPU53, QVina2-W-GPU53 and Vina=GPU53. Gnina59, NNScore (model 2.0)60, DeepBindRG61 and DeepAffinity62 use GPU-compatible deep studying fashions for scoring protein–ligand complexes. Moreover, deep studying strategies reminiscent of TANKBind12, DiffDock13 and EquiBind28 use GPU-compatible neural networks for direct pose prediction of a number of ligands in parallel. AdaptiveFlow helps GPU compatibility of all these software program. The relative speedups of those strategies for single calculations could be in contrast inside Prolonged Knowledge Fig. 9.
Molecular-dynamics-based strategies
The mix of molecular docking and molecular dynamics can yield outcomes close to experimentally decided crystal constructions63,64. AFVS consists of strategies for choosing and scoring poses on the premise of molecular dynamics simulations, reminiscent of MM/PBSA and MM/GBSA65, for evaluating docking poses and predicting binding affinities. MM/PBSA and MM/GBSA are in style for predicting binding free power as a result of they’re extra correct than molecular docking and fewer computationally intensive than alchemical strategies. AdaptiveFlow additionally helps binding pose metadynamics (BPMD), which makes use of a stability rating based mostly on the resistance of the ligand to perturbation away from the preliminary pose to rerank predicted binding poses from docking. The OpenBPMD algorithm66 can precisely predict binding poses inside 2 Å (root-mean-square deviation) of the crystallographic advanced construction for a lot of programs and effectively rerank docked poses. The MM/PBSA, MM/GBSA and BPMD strategies can be utilized inside AdaptiveFlow as rescoring and pose refinement strategies.
Enhanced high quality checks
AFVS helps elective plausibility checks on generated docking poses of Vina-based docking protocols utilizing PoseBusters, an open-source software, which checks for chemical in addition to intramolecular ligand and intermolecular validity of ligand–protein complexes58.
Reporting abstract
Additional data on analysis design is offered within the Nature Portfolio Reporting Abstract linked to this text.