### Install PRODIGY Python Package Source: https://github.com/haddocking/prodigy/blob/main/README.md This command installs the PRODIGY protein binding affinity prediction package from PyPI. It requires pip to be installed on the system. The installation fetches the latest stable version of the package and its dependencies. ```bash pip install prodigy-prot ``` -------------------------------- ### Prepare Directory and Download Multiple PDBs for PRODIGY Source: https://github.com/haddocking/prodigy/blob/main/README.md This example shows the bash commands to create a directory for input molecules and download multiple PDB files using curl. These files will be used for batch processing with PRODIGY. ```bash mkdir input curl -o input/3bzd.pdb https://files.rcsb.org/download/3BZD.pdb curl -o input/2oob.pdb https://files.rcsb.org/download/2OOB.pdb curl -o input/1ppe.pdb https://files.rcsb.org/download/1PPE.pdb ``` -------------------------------- ### Batch Processing with Parallel Execution using PRODIGY CLI Source: https://context7.com/haddocking/prodigy/llms.txt This example shows how to perform batch processing of multiple protein structures using PRODIGY's command-line interface with parallel execution. It covers creating an input directory, downloading structures, and running PRODIGY with quiet mode and a specified number of processors. The output summarizes the predictions for each structure. ```bash # Create input directory and download structures mkdir input curl -o input/3bzd.pdb https://files.rcsb.org/download/3BZD.pdb curl -o input/2oob.pdb https://files.rcsb.org/download/2OOB.pdb curl -o input/1ppe.pdb https://files.rcsb.org/download/1PPE.pdb # Run with quiet mode and 2 processors prodigy -q -np 2 input/ ``` -------------------------------- ### Custom PRODIGY CLI Analysis with Chain Selection and Parameters Source: https://context7.com/haddocking/prodigy/llms.txt This snippet illustrates advanced usage of the PRODIGY command-line interface, including specifying chains for analysis, custom distance cutoffs, temperature, and accessibility thresholds. It also shows how to generate contact lists and PyMOL visualization scripts. The examples demonstrate analyzing specific chains and antibody-antigen complexes. ```bash # Analyze only chains A and B with custom parameters prodigy 3bzd.pdb --selection A B --distance-cutoff 6.0 --temperature 37.0 --acc-threshold 0.1 # Analyze antibody-antigen complex where heavy and light chains form one molecule prodigy complex.pdb --selection H,L A # Generate contact list and PyMOL visualization script prodigy 3bzd.pdb --contact_list --pymol_selection ``` -------------------------------- ### IC-NIS Binding Affinity Model Calculation Source: https://context7.com/haddocking/prodigy/llms.txt Provides an example of how to use the IC-NIS (Intermolecular Contacts - Non-Interacting Surface) model to calculate binding affinity. It uses pre-calculated contact counts and NIS percentages. ```Python from prodigy_prot.modules.models import IC_NIS # Example contact counts and NIS percentages ic_cc = 4.0 # Charged-Charged contacts ic_ca = 6.0 # Charged-Apolar contacts ic_pp = 7.0 # Polar-Polar contacts ic_pa = 15.0 # Polar-Apolar contacts p_nis_a = 29.48 # % Apolar NIS residues p_nis_c = 29.48 # % Charged NIS residues # To use the model, you would typically instantiate it and pass these values # model = IC_NIS() # affinity = model.predict(ic_cc, ic_ca, ic_pp, ic_pa, p_nis_a, p_nis_c) ``` -------------------------------- ### PRODIGY Help and Options Source: https://github.com/haddocking/prodigy/blob/main/README.md This command displays the help message for PRODIGY, listing all available command-line options and their descriptions. It's useful for understanding the full range of customization for binding affinity prediction, including distance cutoffs, thresholds, and parallel processing. ```bash prodigy -h ``` -------------------------------- ### Download and Analyze Single PDB with PRODIGY Source: https://github.com/haddocking/prodigy/blob/main/README.md This snippet demonstrates how to download a PDB file using curl and then run PRODIGY on the single structure to predict binding affinity. It shows the command-line execution and sample output, including predicted affinity and dissociation constant. ```bash $ curl -o 3bzd.pdb https://files.rcsb.org/download/3BZD.pdb $ prodigy 3bzd.pdb [+] Reading structure file: /Users/rvhonorato/dbg/3bzd.pdb [+] Parsed structure file 3bzd (2 chains, 343 residues) [+] No. of intermolecular contacts: 51 [+] No. of charged-charged contacts: 4 [+] No. of charged-polar contacts: 7 [+] No. of charged-apolar contacts: 6 [+] No. of polar-polar contacts: 7 [+] No. of apolar-polar contacts: 15 [+] No. of apolar-apolar contacts: 12 [+] Percentage of apolar NIS residues: 29.48 [+] Percentage of charged NIS residues: 29.48 [++] Predicted binding affinity (kcal.mol-1): -9.4 [++] Predicted dissociation constant (M) at 25.0˚C: 1.3e-07 ``` -------------------------------- ### Print Prodigy Prediction Results Source: https://context7.com/haddocking/prodigy/llms.txt Demonstrates how to print Prodigy prediction results. Supports outputting to standard output, a specified file, or in a compact format. ```Python from prodigy_prot.modules.prodigy import Prodigy # Assuming 'prodigy' is an initialized Prodigy object with prediction results # prodigy.predict() # Print formatted output prodigy.print_prediction() # Prints to stdout prodigy.print_prediction(outfile="results.txt") # Save to file prodigy.print_prediction(quiet=True) # Compact format ``` -------------------------------- ### Run PRODIGY on a Multi-Model PDB File Source: https://github.com/haddocking/prodigy/blob/main/README.md This command allows PRODIGY to process a PDB file containing multiple models, often representing an ensemble of conformations. The tool will analyze each model for binding affinity predictions. ```bash prodigy ``` -------------------------------- ### Run PRODIGY on Multiple Structures with Options Source: https://github.com/haddocking/prodigy/blob/main/README.md This snippet illustrates how to run PRODIGY on multiple PDB files located in a specified directory. It utilizes the 'quiet' option for cleaner output and the 'np' option to specify the number of processors for faster analysis. ```bash $ prodigy -q -np 2 input/ 3bzd -9.373 2oob -6.230 1ppe -14.727 ``` -------------------------------- ### Complete Prediction Workflow using PRODIGY Python API Source: https://context7.com/haddocking/prodigy/llms.txt This Python code demonstrates a complete prediction workflow using the PRODIGY library. It shows how to parse structure files, initialize the Prodigy class with specific parameters, run predictions, and access detailed results like binding affinity, dissociation constant, contact counts, and NIS percentages. The results can also be exported as a dictionary. ```python from pathlib import Path from prodigy_prot.modules.parsers import parse_structure from prodigy_prot.modules.prodigy import Prodigy # Parse structure file (PDB or mmCIF) structure_path = "3bzd.pdb" models, n_chains, n_residues = parse_structure(structure_path) # Initialize Prodigy with first model prodigy = Prodigy( model=models[0], name="3bzd", selection=["A", "B"], # Optional: specify chains temp=25.0 # Temperature in Celsius ) # Run prediction prodigy.predict( distance_cutoff=5.5, acc_threshold=0.05 ) # Access results print(f"Binding affinity: {prodigy.ba_val:.2f} kcal/mol") print(f"Dissociation constant: {prodigy.kd_val:.2e} M") print(f"Number of contacts: {len(prodigy.ic_network)}") print(f"Charged contacts: {prodigy.bins['CC']}") print(f"Apolar-Polar contacts: {prodigy.bins['AP']}") print(f"% Apolar NIS: {prodigy.nis_a:.2f}") print(f"% Charged NIS: {prodigy.nis_c:.2f}") # Export as dictionary results_dict = prodigy.as_dict() # Returns: {'model': 0, 'selection': ['A', 'B'], 'temp': 25.0, # 'ICs': 51, 'nis_a': 29.48, 'nis_c': 29.48, # 'ba_val': -9.4, 'kd_val': 1.3e-07 ``` -------------------------------- ### Run PRODIGY on a Directory of Structures Source: https://github.com/haddocking/prodigy/blob/main/README.md This command runs PRODIGY on all structure files within a specified directory. PRODIGY will process each structure file found in the directory to predict binding affinities. ```bash prodigy ``` -------------------------------- ### Generate PyMOL Visualization Script for Protein Interface Source: https://context7.com/haddocking/prodigy/llms.txt Creates a PyMOL script to visually represent the protein-protein interface identified by Prodigy. Following the prediction of interactions, the print_pymol_script method generates a file (e.g., visualize_interface.pml) containing PyMOL commands. These commands can be loaded into PyMOL along with the protein structure file to highlight interacting residues, color chains, and display them as sticks. This facilitates intuitive understanding of the interface. ```python from prodigy_prot.modules.parsers import parse_structure from prodigy_prot.modules.prodigy import Prodigy # Setup and run prediction models, _, _ = parse_structure("3bzd.pdb") prodigy = Prodigy(model=models[0], name="3bzd", selection=["A", "B"]) prodigy.predict() # Generate PyMOL script prodigy.print_pymol_script(outfile="visualize_interface.pml") # Load in PyMOL: pymol 3bzd.pdb visualize_interface.pml ``` -------------------------------- ### Basic Single Structure Analysis with PRODIGY CLI Source: https://context7.com/haddocking/prodigy/llms.txt This snippet demonstrates how to use the PRODIGY command-line interface to predict binding affinity for a single protein structure. It includes downloading a PDB file and running the basic prediction command. The output shows various contact types, NIS percentages, binding affinity, and dissociation constant. ```bash # Download a sample PDB structure curl -o 3bzd.pdb https://files.rcsb.org/download/3BZD.pdb # Run basic prediction prodigy 3bzd.pdb ``` -------------------------------- ### PRODIGY with Specific Chain Selection (All Pairs) Source: https://github.com/haddocking/prodigy/blob/main/README.md This command uses the `--selection` option to calculate contacts between all pairs of specified chains (A and B, B and C, A and C). This allows for a comprehensive analysis of pairwise interactions within a multi-chain complex. ```bash prodigy --selection A B C input_path ``` -------------------------------- ### Run PRODIGY on a Single Structure Source: https://github.com/haddocking/prodigy/blob/main/README.md This command executes PRODIGY on a single protein structure file. The input can be in PDB or mmCIF format. PRODIGY will analyze the structure to predict binding affinity based on intermolecular contacts. ```bash prodigy ``` -------------------------------- ### PRODIGY Output PyMOL Selection Script Source: https://github.com/haddocking/prodigy/blob/main/README.md This option generates a PyMOL script that can be used to visually highlight the identified intermolecular interface in a protein structure. This aids in the structural interpretation of the binding prediction. ```bash prodigy --pymol_selection input_path ``` -------------------------------- ### Analyze Multi-Model PDB Structures with Prodigy Source: https://context7.com/haddocking/prodigy/llms.txt Processes ensemble structures containing multiple models from a PDB file. It parses the structure, runs Prodigy predictions on each model, and calculates average binding affinity. ```Python from prodigy_prot.modules.parsers import parse_structure from prodigy_prot.modules.prodigy import Prodigy # Parse multi-model PDB file models, n_chains, n_residues = parse_structure("ensemble.pdb") results = [] for model in models: prodigy = Prodigy( model=model, name=f"model_{model.id}", selection=None, # Analyze all chains temp=25.0 ) prodigy.predict() results.append({ 'model_id': model.id, 'affinity': prodigy.ba_val, 'kd': prodigy.kd_val, 'contacts': len(prodigy.ic_network) }) # Calculate average affinity across ensemble avg_affinity = sum(r['affinity'] for r in results) / len(results) print(f"Average binding affinity: {avg_affinity:.2f} kcal/mol") ``` -------------------------------- ### Export Protein-Protein Interface Contact List Source: https://context7.com/haddocking/prodigy/llms.txt Generates a detailed residue-level contact list for the protein-protein interface identified by the Prodigy prediction. After setting up Prodigy with parsed structure models and specifying the interacting chains, the predict() method runs the interface analysis. The resulting contacts can then be exported to a text file using print_contacts(outfile=...) or printed directly to standard output. This is essential for understanding the specific residues involved in the interaction. ```python from prodigy_prot.modules.parsers import parse_structure from prodigy_prot.modules.prodigy import Prodigy # Setup and run prediction models, _, _ = parse_structure("3bzd.pdb") prodigy = Prodigy(model=models[0], name="3bzd", selection=["A", "B"]) prodigy.predict() # Export contacts to file prodigy.print_contacts(outfile="3bzd_contacts.txt") # Print to stdout prodigy.print_contacts() ``` -------------------------------- ### PRODIGY with Multiple Processors Source: https://github.com/haddocking/prodigy/blob/main/README.md This command runs PRODIGY using multiple processors to speed up calculations, especially when analyzing several structures. The `-np` argument specifies the number of processors to utilize. ```bash prodigy -np NUMBER_OF_PROCESSORS input_path ``` -------------------------------- ### PRODIGY with Specific Chain Selection (Two Molecules) Source: https://github.com/haddocking/prodigy/blob/main/README.md This command uses the `--selection` option to calculate intermolecular contacts exclusively between two specified chains (A and B). This is useful for analyzing specific interactions within a complex structure. ```bash prodigy --selection A B input_path ``` -------------------------------- ### PRODIGY with Specific Chain Selection (Multiple Chains in One Group) Source: https://github.com/haddocking/prodigy/blob/main/README.md This command uses the `--selection` option to calculate contacts between chains A and C, and between B and C. Chains A and B are grouped as one entity, and C is considered separately for contact calculations. ```bash prodigy --selection A,B C input_path ``` -------------------------------- ### PRODIGY Output Contact List Source: https://github.com/haddocking/prodigy/blob/main/README.md This option enables PRODIGY to output a detailed list of all identified intermolecular contacts. This is valuable for understanding the specific interactions contributing to the predicted binding affinity. ```bash prodigy --contact_list input_path ``` -------------------------------- ### PRODIGY Output All Features (excluding BSA) Source: https://github.com/haddocking/prodigy/blob/main/README.md This option instructs PRODIGY to output all calculated features used in the prediction, except for the Binding Site Accessibility (BSA) values. It is mutually exclusive with the `-q` option. ```bash prodigy -s input_path ``` -------------------------------- ### Analyze Non-Interacting Surface (NIS) Residues Source: https://context7.com/haddocking/prodigy/llms.txt Calculates the residue composition at the non-interacting surface of a protein. It uses freeSASA to compute solvent accessible surface area and then analyzes the composition based on a given accessibility threshold. ```Python from prodigy_prot.modules.freesasa_tools import execute_freesasa_api from prodigy_prot.modules.prodigy import analyse_nis from Bio.PDB.PDBParser import PDBParser # Parse structure parser = PDBParser() structure = parser.get_structure("3bzd", "3bzd.pdb") model = structure[0] # Calculate solvent accessible surface area asa_data, rsa_data = execute_freesasa_api(model) # Analyze non-interacting surface with default threshold nis_apolar, nis_charged, nis_polar = analyse_nis( sasa_dict=rsa_data, acc_threshold=0.05 ) print(f"Percentage of apolar NIS residues: {nis_apolar:.2f}%") print(f"Percentage of charged NIS residues: {nis_charged:.2f}%") print(f"Percentage of polar NIS residues: {nis_polar:.2f}%") # Use custom accessibility threshold nis_apolar_custom, nis_charged_custom, nis_polar_custom = analyse_nis( sasa_dict=rsa_data, acc_threshold=0.10 ) ``` -------------------------------- ### Calculate Binding Affinity with IC_NIS Source: https://context7.com/haddocking/prodigy/llms.txt Calculates the predicted binding affinity between two proteins using the IC_NIS function. This function takes several interaction terms (ic_cc, ic_ca, ic_pp, ic_pa) and protein specific terms (p_nis_a, p_nis_c) as input. The output is a predicted binding affinity in kcal/mol, which can be formatted for display. ```python affinity = IC_NIS( ic_cc=ic_cc, ic_ca=ic_ca, ic_pp=ic_pp, ic_pa=ic_pa, p_nis_a=p_nis_a, p_nis_c=p_nis_c ) print(f"Predicted binding affinity: {affinity:.2f} kcal/mol") ``` -------------------------------- ### Calculate Intermolecular Contacts using Prodigy Source: https://context7.com/haddocking/prodigy/llms.txt Computes contacts between residues in a protein complex using Biopython's PDBParser and Prodigy's calculate_ic function. Supports default cutoffs and custom chain selections. ```Python from Bio.PDB.PDBParser import PDBParser from prodigy_prot.modules.prodigy import calculate_ic # Parse structure parser = PDBParser() structure = parser.get_structure("3bzd", "3bzd.pdb") model = structure[0] # Calculate contacts with default cutoff (5.5 Å) contacts = calculate_ic(model=model, d_cutoff=5.5) print(f"Found {len(contacts)} intermolecular contacts") # Access contact information for res1, res2 in contacts[:5]: print(f"{res1.resname} {res1.id[1]} (chain {res1.parent.id}) - " f"{res2.resname} {res2.id[1]} (chain {res2.parent.id})") # Calculate contacts with chain selection # Only contacts between chains A and B selection_dict = {"A": 0, "B": 1} contacts_ab = calculate_ic(model=model, d_cutoff=5.5, selection=selection_dict) # For antibody-antigen: H and L chains form one molecule, A is antigen selection_dict = {"H": 0, "L": 0, "A": 1} contacts_antibody = calculate_ic(model=model, d_cutoff=5.5, selection=selection_dict) ``` -------------------------------- ### Analyze Intermolecular Contact Types Source: https://context7.com/haddocking/prodigy/llms.txt Classifies intermolecular contacts based on amino acid chemical properties. It takes a list of residue contacts and returns a dictionary with counts for different contact types. ```Python from prodigy_prot.modules.prodigy import calculate_ic, analyse_contacts from Bio.PDB.PDBParser import PDBParser # Get contacts parser = PDBParser() structure = parser.get_structure("2oob", "2oob.pdb") model = structure[0] contacts = calculate_ic(model=model, d_cutoff=5.5) # Analyze contact types bins = analyse_contacts(contacts) print(f"Charged-Charged contacts: {bins['CC']}") print(f"Charged-Polar contacts: {bins['CP']}") print(f"Charged-Apolar contacts: {bins['AC']}") print(f"Polar-Polar contacts: {bins['PP']}") print(f"Apolar-Polar contacts: {bins['AP']}") print(f"Apolar-Apolar contacts: {bins['AA']}") print(f"HydrophiLic-HydrophiLic contacts: {bins['LL']}") print(f"HydrophoBic-HydrophiLic contacts: {bins['BL']}") print(f"HydrophoBic-HydrophoBic contacts: {bins['BB']}") ``` -------------------------------- ### PRODIGY Output Only Affinity Value Source: https://github.com/haddocking/prodigy/blob/main/README.md This option makes PRODIGY output only the predicted binding affinity value, suppressing all other detailed results. This is useful for quick predictions or when integrating PRODIGY into automated workflows. ```bash prodigy -q input_path ``` -------------------------------- ### Parse Protein Structure Files (PDB/mmCIF) Source: https://context7.com/haddocking/prodigy/llms.txt Parses protein structure files in PDB or mmCIF format using the parse_structure function. This function automatically cleans the structure by removing HETATM records, solvent, disordered atoms (keeping highest occupancy), insertion codes, and hydrogen atoms. It also validates amino acids and checks for chain continuity gaps. The function returns a tuple containing a list of Biopython Model objects, the number of chains, and the number of residues. This is crucial for preparing structural data for downstream analysis. ```python from prodigy_prot.modules.parsers import parse_structure # Parse PDB file models, n_chains, n_residues = parse_structure("3bzd.pdb") print(f"Loaded {len(models)} model(s), {n_chains} chains, {n_residues} residues") # Parse mmCIF file models, n_chains, n_residues = parse_structure("3bzd.cif") # Access parsed model model = models[0] for chain in model.get_chains(): print(f"Chain {chain.id}: {len(list(chain.get_residues()))} residues") ``` -------------------------------- ### Custom Protein Structure Validation Source: https://context7.com/haddocking/prodigy/llms.txt Provides custom validation for protein structures loaded via Biopython's PDBParser. The validate_structure function allows for specific chain selection and cleaning options. Users can choose to keep all chains or a subset, and can opt to remove HETATMs, hydrogens, and solvent ('clean=True'). If 'clean=False', all atoms are retained. This function is useful for focusing analysis on specific parts of a complex or for detailed raw structure examination. It handles complex selections like antibody heavy and light chains. ```python from Bio.PDB.PDBParser import PDBParser from prodigy_prot.modules.parsers import validate_structure # Parse structure parser = PDBParser() structure = parser.get_structure("complex", "complex.pdb") # Validate with chain selection (only keep chains A and B) models = validate_structure( input_strcture_obj=structure, selection=["A", "B"], clean=True # Remove HETATMs, hydrogens, solvent ) # Validate without cleaning (keep all atoms) models_raw = validate_structure( input_strcture_obj=structure, selection=None, # Keep all chains clean=False ) # Validate antibody-antigen with heavy+light chains as one molecule models_ab = validate_structure( input_strcture_obj=structure, selection=["H,L", "A"], # H and L form one molecule, A is separate clean=True ) ``` -------------------------------- ### Convert Binding Energy to Dissociation Constant (Kd) Source: https://context7.com/haddocking/prodigy/llms.txt Converts binding free energy (ΔG) in kcal/mol to the dissociation constant (Kd) in Molar (M). The conversion is performed at a specified temperature in Celsius using the dg_to_kd utility function. The function utilizes the formula Kd = exp(ΔG / RT), where R is the gas constant and T is temperature in Kelvin. It supports different temperatures, including a default of 25°C and physiological temperature of 37°C. ```python from prodigy_prot.modules.utils import dg_to_kd # Binding affinity in kcal/mol dg = -9.37 # Convert to Kd at 25°C (default) kd_25 = dg_to_kd(dg, temperature=25.0) print(f"Kd at 25°C: {kd_25:.2e} M") # Convert to Kd at 37°C (physiological temperature) kd_37 = dg_to_kd(dg, temperature=37.0) print(f"Kd at 37°C: {kd_37:.2e} M") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.