doi: 10.1101/2025.02.10.637534
AlphaFold3 currently outputs protein models in .cif format. To calculate side-chain χ (chi) angles, we first convert these CIF files to the standard .pdb format using PyMOL.
You can do this with the provided script:
convert_cif2pdb.py This script:
- Loads all
.ciffiles in the working directory - Converts them to
.pdbformat - Saves them with the same base filename
- How to Use: Make sure to update the os.chdir(r"/working/directory") at the bottom of the script to your actual path. Then run script directly inside the PYMOL
After converting .cif to .pdb files, this step computes χ1–χ4 angles for residues in chain A across all models (PDB files) using:
🔗 Chi_compute_multiple_pdbs.py
This script:
- Iterates over all
.pdbfiles in a directory - Computes χ angles using PyMOL dihedral calculations
- Outputs a
.datfile for each structure with residue-level χ1–χ4 angles - How to Use:
Make sure to update the
directory_pathat the bottom of the script to your actual path. Then run script directly inside the PYMOL
Each .dat file generated in Step 2 corresponds to one PDB structure. This script aggregates all those into a single CSV file with one row per residue per structure:
This script:
- Parses all
*_chi_angles.datfiles in a directory - Extracts χ1–χ4 values for each residue
- Adds a column for the PDB ID (parsed from the filename)
- Merges all data into a unified CSV file for downstream analysis
- How to Use Update the paths at the bottom of the script: directory_path = "/path/to/folder/with/dat/files" output_csv_file = "/desired/output/path/AF3_chi_angles.csv"
python convert_dat_csv.py