R-factor tracking during PHENIX refinement

During typical refinement process using PHENIX, you will end up with bunch of pdb files with different R-factors. How we can track R-factors of each version of pdb more easily?

$ ls *.pdb 
2A41.pdb              MR.1_refine_009.pdb   MR.1_refine_019.pdb   MR.1_refine_029.pdb
MR.1.pdb              MR.1_refine_010.pdb   MR.1_refine_020.pdb   MR.1_refine_030.pdb
MR.1_refine_001.pdb   MR.1_refine_011.pdb   MR.1_refine_021.pdb   MR.1_refine_031.pdb
MR.1_refine_002.pdb   MR.1_refine_012.pdb   MR.1_refine_022.pdb   MR.1_refine_032.pdb
MR.1_refine_003.pdb   MR.1_refine_013.pdb   MR.1_refine_023.pdb   MR.1_refine_033.pdb
MR.1_refine_004.pdb   MR.1_refine_014.pdb   MR.1_refine_024.pdb   NAG.pdb
MR.1_refine_005.pdb   MR.1_refine_015.pdb   MR.1_refine_025.pdb   Peptide.pdb
MR.1_refine_006.pdb   MR.1_refine_016.pdb   MR.1_refine_026.pdb   new_refine_020_ed.pdb
MR.1_refine_007.pdb   MR.1_refine_017.pdb   MR.1_refine_027.pdb
MR.1_refine_008.pdb   MR.1_refine_018.pdb   MR.1_refine_028.pdb

Each of pdb files contain informations about R factors.

REMARK ******************** REFINEMENT SUMMARY: QUICK FACTS *******************
REMARK Start: r_work = 0.2790 r_free = 0.2820 bonds = 0.008 angles = 1.116
REMARK Final: r_work = 0.2606 r_free = 0.2913 bonds = 0.008 angles = 1.186
REMARK ************************************************************************

The following script extracts r-work and r-free values from pdb files and plot using gnuplot

grep "REMARK Final: r_work" *.pdb | awk 'BEGIN { OFS="\t" }{print $1, $5, $8}' | sed -e 's/:REMARK//' -e 's/^MR.1_refine_0//' -e 's/.pdb//' ; data.txt
gnuplot -p -e "plot 'data.txt' using 1:2 with lines title 'R-work', 'data.txt' using 1:3 with lines title 'R-free'"

* If your pdb files have different naming conventions, you should modify ‘MR.1_refine_0’ part to match your pdb files. Of course.

These script generate data.txt files.

01      0.2606  0.2913
02      0.2602  0.2923
03      0.2599  0.2914

Then you will have a plot like this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s