Hi Mohd: The script below should also be able to edit the PDB file according to both of your needs. Think it is also easily modified to use for other similar PDB file editing needs.
Best wishes, Navdeep ################################################################# #! /usr/bin/gawk -f # # bfactor_backbone.gawk # Script to edit PDB file # by Navdeep Sidhu, with thanks to awk information at # http://www.grymoire.com/Unix/Awk.html # # Input: PDB file # Output: 4 columns: 1) Atom name # 2) Chain identifier # 3) Residue sequence # # 4) Temperature factor # Rows contain all standard amino acid backbone atoms. # To get rows with only CA atoms, the second command can be # modified within 2nd parentheses to: ($4 ~ /CA /) # # Help: To use, save script e.g. as "bfactor_backbone.gawk" # If the following command returns a different path to gawk # than the one used in the 1st line above, please correct # the 1st line accordingly: # $ which gawk # Make the script executable: # $ chmod u+x bfactor_backbone.gawk # Example command to run script (from the same directory): # $ ./bfactor_backbone.gawk test.pdb > bfactor_backbone.out # # Define PDB file fields based on PDB File Format v. 3.2 available at # ftp://ftp.wwpdb.org/pub/pdb/doc/format_descriptions/ # (p. 190 of file Format_v32_letter.pdf): BEGIN {FIELDWIDTHS="6 5 1 4 1 3 1 1 4 1 3 8 8 8 6 6 10 2 2";} # If the residue is one of the standard amino acids # and atom name is that of backbone atoms # then print output fields given above: ($6 ~ /ALA/ || $6 ~ /ARG/ || $6 ~ /ASN/ || $6 ~ /ASP/ || \ $6 ~ /CYS/ || $6 ~ /GLN/ || $6 ~ /GLU/ || \ $6 ~ /GLY/ || $6 ~ /HIS/ || $6 ~ /ILE/ || \ $6 ~ /LEU/ || $6 ~ /LYS/ || $6 ~ /MET/ || \ $6 ~ /PHE/ || $6 ~ /PRO/ || $6 ~ /SER/ || \ $6 ~ /THR/ || $6 ~ /TRP/ || $6 ~ /TYR/ || \ $6 ~ /VAL/) \ && ($4 ~ /N / || $4 ~ /CA / || $4 ~ /C / || \ $4 ~ /O /) { print $4, $8, $9, $16;} ################################################################# --- Navdeep Sidhu Graduate Student University of Saskatchewan --- --- On Tue, 2009-09-15 at 11:37 -0500, Salameh, Mohd A., Ph.D. wrote: > Dear All, > > I would like to prepare a plot showing the b-factor of only the alpha > carbon and/or the backbone atoms and I wonder if somebody knows a > module or software that I can use, I tried the structure > analysis/Temperature factor analysis module in CCP4 but it plots the > average b-factor of all atoms which I’m not interested in. appreciate > your help. Thanks, Mohd