PRODIGY (PROtein binDIng enerGY prediction)

repository·main·Indexed 41 days ago

https://github.com/haddocking/prodigy

A tool for predicting the binding affinity (ΔG) and dissociation constants (Kd) of protein-protein complexes based on intermolecular contacts (ICs). It provides a CLI for processing single structures, ensembles, or directories in PDB, mmCIF, and ENT formats, as well as a Python API via the prodigy-prot package (v2.4.0) for structural parsing, IC-NIS/NIS model calculations, and PyMOL script generation.

Tokens
4.7K
Snippets
19
Records
22
Agent score
53%

What's inside PRODIGY

  1. Configure chain selections with --selection

    main

    By default, PRODIGY treats each chain identifier as an isolated molecule. For complexes like antibody-antigen interactions, you can use the --selection option to group multiple chains into a single molecule or define specific pairs for contact calculation.

    Syntax Rules:

    • Use a space to separate chains that should be considered different molecules.
    • Use a comma to include multiple chains as part of a single group.

    Examples:

    • --selection A B: Calculates contacts only between chains A and B.
    • --selection A,B C: Calculates contacts between (A and C) and (B and C).
    • --selection A B C: Calculates contacts between (A and B), (B and C), and (A and C).
    # Example: Grouping chains A and B as one molecule, and C as another
    prodigy --selection A,B C input.pdb
  2. Install PRODIGY for development

    main

    PRODIGY uses poetry for dependency management and virtual environment handling. To set up a development environment, clone the repository and run poetry install to install all necessary dependencies.

    git clone https://github.com/haddocking/prodigy.git && cd prodigy
    poetry install
  3. Use the PRODIGY CLI

    main

    PRODIGY predicts binding affinity based on Intermolecular Contacts (ICs). You can run it on a single structure, a directory of structures, or a multi-model PDB file (ensemble).

    Basic Usage Patterns:

    • Single structure: prodigy <structure_file>
    • Directory of molecules: prodigy <directory_with_molecules>
    • Multi-model ensemble: prodigy <multi_model.pdb>

    To speed up processing when running multiple structures, use the -np argument to specify the number of processors.

    # Single structure
    prodigy 3bzd.pdb
    
    # Directory of structures with 2 processors
    prodigy -np 2 input/
    
    # Multi-model PDB
    prodigy multi_model.pdb
  4. Configure output verbosity with --quiet and --showall

    main

    PRODIGY provides different levels of output detail:

    • --quiet (-q): Minimizes output to only the predicted affinity value. This is useful for programmatic parsing.
    • --showall (-s): Outputs all original PRODIGY features, but excludes the Buried Surface Area (BSA).

    Note: --quiet and --showall are mutually exclusive and cannot be used together.

  5. Configure chain selection with --selection

    main

    By default, PRODIGY treats each chain as an isolated molecule. For complexes like antibody-antigen interfaces, you may want to group multiple chains into a single molecule. Use the --selection flag to define these groups.

    • Use spaces to separate different molecules.
    • Use commas to group chains into the same molecule.

    Examples:

    • --selection A B: Calculates contacts only between chain A and chain B.
    • --selection A,B C: Calculates contacts between (A and C) and (B and C). Chains A and B are treated as one molecule.
    • --selection A B C: Calculates contacts between A&B, B&C, and A&C.
  6. Get quiet output for parsing

    main

    When running PRODIGY on multiple structures and intending to parse the results programmatically, use the -q or --quiet flag. This suppresses the detailed feature breakdown and outputs only the predicted affinity value per file.

    $ prodigy -q -np 2 input/
    3bzd  -9.373
    2oob  -6.230
    1ppe  -14.727
  7. Reference: PRODIGY CLI options

    main

    The prodigy command-line interface accepts the following options for controlling affinity prediction and output format.

    positional arguments:
      input_path            Path to either:
                            - Structure in PDB or mmCIF format
                            - Directory containing structure files
    
    options:
      -h, --help            show this help message and exit
      --distance-cutoff DISTANCE_CUTOFF
                            Distance cutoff to calculate ICs
      --acc-threshold ACC_THRESHOLD
                            Accessibility threshold for BSA analysis
      --temperature TEMPERATURE
                            Temperature (C) for Kd prediction
      --contact_list        Output a list of contacts
      --pymol_selection     Output a script to highlight the interface (pymol)
      -q, --quiet           Outputs only the predicted affinity value
      -s, --showall         Outputs all original prodigy features but BSA (mutually exclusive with `-q`)
      -np, --number-of-processors NUMBER_OF_PROCESSORS
                            Number of processors to use (default: 1)
  8. Print Prodigy prediction reports

    main

    The print_prediction() method outputs the prediction results in a human-readable format. You can direct the output to a file or stdout.

    Arguments:

    • outfile (str): Path to a file where the report will be written. If omitted, it prints to stdout.
    • quiet (bool): If True, only prints the name and the binding affinity (ba_val).
    • showall (bool): If True, includes additional details like hydrophobic contact counts (LL, BL, BB) and NIS percentages.
    # Standard detailed output to stdout
    prodigy.print_prediction()
    
    # Quiet output to a file
    prodigy.print_prediction(outfile="results.txt", quiet=True)
    
    # Full detailed output including hydrophobic counts
    prodigy.print_prediction(showall=True)
  9. Export Prodigy results as a dictionary

    main

    The as_dict() method returns a dictionary containing all calculated values for the prediction. This is useful for programmatic access or saving results to JSON.

    Keys included in the dictionary:

    • model: The ID of the Biopython model.
    • selection: The chain selection used.
    • temp: The temperature used (in Celsius).
    • ICs: Number of intermolecular contacts.
    • nis_a: Percentage of apolar NIS residues.
    • nis_c: Percentage of charged NIS residues.
    • nis_p: Percentage of polar NIS residues.
    • ba_val: Predicted binding affinity (kcal/mol).
    • kd_val: Predicted dissociation constant (M).
    • CC, CP, AC, PP, AP, AA, LL, BL, BB: Counts of specific contact types (e.g., Charged-Charged, Polar-Polar, etc.).
    results = prodigy.as_dict()
    # Access specific metrics
    print(results['ba_val'])
    print(results['CC'])