### Download RCSB Data and Start Redis Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Download the CCD RDB file and start a Redis server. Ensure Redis is installed and accessible. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/ccd.rdb redis-server --dbfilename ccd.rdb --port 7777 ``` -------------------------------- ### Install Project Requirements Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Installs Python dependencies from the requirements.txt file. Ensure you have pip installed. ```bash pip install -r requirements.txt ``` -------------------------------- ### Configure Multiple Dataset Sources Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Example configuration for setting up multiple dataset sources, such as PDB and OpenFold distillation datasets, for training the structure model. Each dataset can have its own probability, sampler, cropper, and split configuration. ```yaml datasets: - _target_: boltz.data.module.training.DatasetConfig target_dir: PATH_TO_PDB_TARGETS_DIR msa_dir: PATH_TO_PDB_MSA_DIR prob: 0.5 sampler: _target_: boltz.data.sample.cluster.ClusterSampler cropper: _target_: boltz.data.crop.boltz.BoltzCropper min_neighborhood: 0 max_neighborhood: 40 split: ./scripts/train/assets/validation_ids.txt - _target_: boltz.data.module.training.DatasetConfig target_dir: PATH_TO_DISTILLATION_TARGETS_DIR msa_dir: PATH_TO_DISTILLATION_MSA_DIR prob: 0.5 sampler: _target_: boltz.data.sample.cluster.ClusterSampler cropper: _target_: boltz.data.crop.boltz.BoltzCropper min_neighborhood: 0 max_neighborhood: 40 ``` -------------------------------- ### Install Boltz from GitHub Source: https://github.com/jwohlwend/boltz/blob/main/README.md Install the latest development version of Boltz directly from its GitHub repository. This method is useful for accessing daily updates. ```bash git clone https://github.com/jwohlwend/boltz.git cd boltz; pip install -e .[cuda] ``` -------------------------------- ### Launch Redis Server for MSA Processing Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Starts a Redis server instance configured to use the downloaded taxonomy database. This is used for parallel MSA processing. ```bash redis-server --dbfilename taxonomy.rdb --port 7777 ``` -------------------------------- ### Install Boltz with CUDA Support Source: https://github.com/jwohlwend/boltz/blob/main/README.md Install the Boltz package with CUDA acceleration using pip. This is the recommended method for GPU users. ```bash pip install boltz[cuda] -U ``` -------------------------------- ### FASTA Format Example Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Example of input entries in the deprecated FASTA format, including chain ID, entity type, and MSA path or sequence. ```plaintext >A|protein|./examples/msa/seq1.a3m MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ >B|protein|./examples/msa/seq1.a3m MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ >C|ccd SAH >D|ccd SAH >E|smiles N[C@@H](Cc1ccc(O)cc1)C(=O)O >F|smiles N[C@@H](Cc1ccc(O)cc1)C(=O)O ``` -------------------------------- ### Example Prediction Configuration Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md This YAML configuration specifies sequences for protein and ligands, including MSA path and SMILES notation. It serves as a foundational example for setting up a prediction task in Boltz. ```yaml version: 1 sequences: - protein: id: [A, B] sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ msa: ./examples/msa/seq1.a3m - ligand: id: [C, D] ccd: SAH - ligand: id: [E, F] smiles: 'N[C@@H](Cc1ccc(O)cc1)C(=O)O' ``` -------------------------------- ### Run Training Script (Full) Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Launch the full training run using the specified configuration file. This command assumes debug mode has been tested and is working correctly. ```bash python scripts/train/train.py scripts/train/configs/structure.yaml ``` -------------------------------- ### Basic Authentication using CLI Options Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Provide username and password directly as command-line arguments for basic authentication with the MSA server. ```bash boltz predict ... --use_msa_server --msa_server_username myuser --msa_server_password mypassword ``` -------------------------------- ### Download Symmetry Files Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Download the pre-computed symmetry information for ligands, which is provided as a pickle file. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/symmetry.pkl ``` -------------------------------- ### Basic Authentication using Environment Variables Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Set username and password via environment variables for basic authentication with the MSA server. Recommended for security. ```bash export BOLTZ_MSA_USERNAME=myuser export BOLTZ_MSA_PASSWORD=mypassword boltz predict ... --use_msa_server ``` -------------------------------- ### API Key Authentication using CLI Options Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Specify API key header and value using command-line options for API key authentication with the MSA server. ```bash boltz predict ... --use_msa_server --api_key_header X-API-Key --api_key_value ``` -------------------------------- ### Run Training Script (Confidence Model) Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Execute the training script using the configuration file specifically designed for training the confidence model. ```bash python scripts/train/train.py scripts/train/configs/confidence.yaml ``` -------------------------------- ### Download CCD Dictionary Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Downloads the preprocessed CCD dictionary file. This is a necessary step if you are not recreating it yourself. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/ccd.pkl ``` -------------------------------- ### Navigate to Processing Folder Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Change the current directory to the 'scripts/process' folder to begin the data processing pipeline. ```bash cd scripts/process ``` -------------------------------- ### Download Pre-processed RCSB (PDB) Structures Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Use wget to download the compressed PDB structures, then extract them and remove the archive. Ensure you have sufficient storage. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/rcsb_processed_targets.tar tar -xf rcsb_processed_targets.tar rm rcsb_processed_targets.tar ``` -------------------------------- ### Configure Training Parameters (Structure Model) Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Modify the training configuration file (e.g., structure.yaml) to specify data paths, output directories, and model/training parameters. Adjust max_tokens and max_atoms based on GPU size and desired training speed. ```yaml trainer: devices: 1 output: SET_PATH_HERE # Path to the output directory resume: PATH_TO_CHECKPOINT_FILE # Path to a checkpoint file to resume training from if any null otherwise data: datasets: - _target_: boltz.data.module.training.DatasetConfig target_dir: PATH_TO_TARGETS_DIR # Path to the directory containing the processed structure files msa_dir: PATH_TO_MSA_DIR # Path to the directory containing the processed MSA files symmetries: PATH_TO_SYMMETRY_FILE # Path to the file containing molecule the symmetry information max_tokens: 512 # Maximum number of tokens in the input sequence max_atoms: 4608 # Maximum number of atoms in the input structure ``` -------------------------------- ### Download Taxonomy Database Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Downloads the taxonomy database file required for MSA processing. Place it in the current folder. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/taxonomy.rdb ``` -------------------------------- ### Create Sequence Clusters Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Runs the clustering script to assign proteins, RNA/DNA, and ligands to similarity clusters. Requires the CCD dictionary, sequence data, and the path to the mmseqs executable. ```bash python cluster.py --ccd ccd.pkl --sequences pdb_seqres.txt --mmseqs PATH_TO_MMSEQS_EXECUTABLE --outdir ./clustering ``` -------------------------------- ### Predict Structure with Custom Recycling and Sampling Steps Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Configure the number of recycling steps and diffusion samples for prediction. Note that increasing these values will significantly increase prediction time. ```bash boltz predict input_path --recycling_steps 10 --diffusion_samples 25 ``` -------------------------------- ### API Key Authentication using Environment Variable Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Set the API key value via an environment variable for API key authentication with the MSA server. The default header is X-API-Key. ```bash export MSA_API_KEY_VALUE= boltz predict ... --use_msa_server --api_key_header X-API-Key ``` -------------------------------- ### Download and Extract OpenFold MSAs Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Downloads a large archive of raw OpenFold MSAs and extracts them. Ensure sufficient disk space. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/openfold_raw_msa.tar tar -xf openfold_raw_msa.tar rm openfold_raw_msa.tar ``` -------------------------------- ### Run Training Script (Debug Mode) Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Execute the training script with the debug flag enabled. This disables DDP, sets num_workers to 0 for single-process execution, and disables wandb for testing. ```bash python scripts/train/train.py scripts/train/configs/structure.yaml debug=1 ``` -------------------------------- ### Download Pre-processed OpenFold Structures Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Download the processed structure files from OpenFold using wget, extract the tar archive, and clean up by removing the tar file. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/openfold_processed_targets.tar tar -xf openfold_processed_targets.tar rm openfold_processed_targets.tar ``` -------------------------------- ### Download Pre-processed RCSB (PDB) MSAs Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Download the Multiple Sequence Alignments (MSAs) for PDB structures using wget, extract the archive, and then remove the tar file. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/rcsb_processed_msa.tar tar -xf rcsb_processed_msa.tar rm rcsb_processed_msa.tar ``` -------------------------------- ### Recreate CCD Dictionary Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Recreates the CCD dictionary from the PDB components CIF file. Requires the ccd.py script. ```bash wget https://files.wwpdb.org/pub/pdb/data/monomers/components.cif python ccd.py --components components.cif --outdir ./ccd ``` -------------------------------- ### Predict Structure with MSA Server Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Use this option to automatically generate the MSA with the mmseqs2 server. ```bash boltz predict input_path --use_msa_server ``` -------------------------------- ### Download Pre-processed OpenFold MSAs Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Obtain the pre-processed MSAs from OpenFold by downloading the tar archive, extracting its contents, and then deleting the archive. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/openfold_processed_msa.tar tar -xf openfold_processed_msa.tar rm openfold_processed_msa.tar ``` -------------------------------- ### Download PDB Sequence Data Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Downloads and unzips the PDB sequence data. This is used as input for the clustering script. ```bash wget https://files.rcsb.org/pub/pdb/derived_data/pdb_seqres.txt.gz gunzip -d pdb_seqres.txt.gz ``` -------------------------------- ### Predict Structure with Inference Time Potential Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Enables the use of an inference time potential to improve the physical quality of poses. ```bash boltz predict input_path --use_potentials ``` -------------------------------- ### Process Raw MSAs Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Runs the MSA processing script. Requires the directory containing raw MSAs, an output directory, and the Redis port. Ensure MSA files have .a3m or .a3m.gz extensions. ```bash python msa.py --msadir YOUR_MSA_DIR --outdir YOUR_OUTPUT_DIR --redis-port 7777 ``` -------------------------------- ### Boltz-1 Evaluation File Structure Source: https://github.com/jwohlwend/boltz/blob/main/docs/evaluation.md This structure outlines the organization of input, target, output, and evaluation files for Boltz-1, Boltz-1x, Chai-1, and AlphaFold3. It includes summary CSV files for evaluation results. ```bash boltz_results_final/ ├── inputs/ # Input files for every model ├── casp15/ ├── af3 ├── boltz ├── boltzx ├── chai └── msa └── test/ ├── targets/ # Target files from PDB ├── casp15 └── test ├── outputs/ # Output files for every model ├── casp15 └── test ├── evals/ # Output of evaluation script for every ├── casp15 └── test ├── results_casp.csv # Summary of evaluation results for CASP15 └── results_test.csv # Summary of evaluation results for test set ``` -------------------------------- ### Download and Extract PDB MSAs Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Downloads a large archive of raw PDB Multiple Sequence Alignments (MSAs) and extracts them. Ensure sufficient disk space. ```bash wget https://boltz1.s3.us-east-2.amazonaws.com/rcsb_raw_msa.tar tar -xf rcsb_raw_msa.tar rm rcsb_raw_msa.tar ``` -------------------------------- ### Run Boltz Prediction Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md Execute a prediction using Boltz. Specify the input path and any desired options. Use --override to force re-computation. ```bash boltz predict [OPTIONS] ``` -------------------------------- ### Run Boltz Inference Source: https://github.com/jwohlwend/boltz/blob/main/README.md Execute the Boltz prediction command. Specify the input path for biomolecule descriptions and desired properties. Use --use_msa_server for remote MSA processing. ```bash boltz predict input_path --use_msa_server ``` -------------------------------- ### Process PDB Data with rcsb.py Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Run the `rcsb.py` script to process PDB data. Specify the directory containing mmcif files, the clustering configuration, output directory, and Redis port. The script processes `.cif` or `cif.gz` files and can filter by file size. ```bash python rcsb.py --datadir PATH_TO_MMCIF_DIR --cluster clustering/clustering.json --outdir YOUR_OUTPUT_DIR --use-assembly --max-file-size 7000000 --redis-port 7777 ``` -------------------------------- ### Boltz YAML Input Schema Source: https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md The complete schema for defining complexes in YAML format for Boltz predictions. Includes sequences, constraints, templates, and properties. ```yaml sequences: - ENTITY_TYPE: id: CHAIN_ID sequence: SEQUENCE # only for protein, dna, rna smiles: 'SMILES' # only for ligand, exclusive with ccd ccd: CCD # only for ligand, exclusive with smiles msa: MSA_PATH # only for protein modifications: - position: RES_IDX # index of residue, starting from 1 ccd: CCD # CCD code of the modified residue cyclic: false - ENTITY_TYPE: id: [CHAIN_ID, CHAIN_ID] # multiple ids in case of multiple identical entities ... constraints: - bond: atom1: [CHAIN_ID, RES_IDX, ATOM_NAME] atom2: [CHAIN_ID, RES_IDX, ATOM_NAME] - pocket: binder: CHAIN_ID contacts: [[CHAIN_ID, RES_IDX/ATOM_NAME], [CHAIN_ID, RES_IDX/ATOM_NAME]] max_distance: DIST_ANGSTROM force: false # if force is set to true (default is false), a potential will be used to enforce the pocket constraint - contact: token1: [CHAIN_ID, RES_IDX/ATOM_NAME] token2: [CHAIN_ID, RES_IDX/ATOM_NAME] max_distance: DIST_ANGSTROM force: false # if force is set to true (default is false), a potential will be used to enforce the contact constraint templates: - cif: CIF_PATH # if only a path is provided, Boltz will find the best matchings force: true # optional, if force is set to true (default is false), a potential will be used to enforce the template threshold: DISTANCE_THRESHOLD # optional, controls the distance (in Angstroms) that the prediction can deviate from the template - cif: CIF_PATH chain_id: CHAIN_ID # optional, specify which chain to find a template for - cif: CIF_PATH chain_id: [CHAIN_ID, CHAIN_ID] # can be more than one template_id: [TEMPLATE_CHAIN_ID, TEMPLATE_CHAIN_ID] - pdb: PDB_PATH # if a pdb path is provided, Boltz will incrementally assign template chain ids based on the chain names in the PDB file (A1, A2, B1, etc) chain_id: [CHAIN_ID, CHAIN_ID] template_id: [TEMPLATE_CHAIN_ID, TEMPLATE_CHAIN_ID] properties: - affinity: binder: CHAIN_ID ``` -------------------------------- ### Hash Sequence Function Source: https://github.com/jwohlwend/boltz/blob/main/docs/training.md Python function to generate a SHA256 hash for a given sequence string. Used for naming MSA files. ```python import hashlib def hash_sequence(seq: str) -> str: """Hash a sequence.""" return hashlib.sha256(seq.encode()).hexdigest() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.