1HRY1-8.SEQ 0000664 0000144 0000145 00000000011 07264674504 010516 0 ustar web web @@DRVKRP 1HRY1-8.T 0000664 0000144 0000145 00000005436 07264674504 010311 0 ustar web web RES_ID 1 RES_TYPE @ SPIN_SYSTEM_ID @ HETEROGENEITY @ @ END_RES_DEF RES_ID 2 RES_TYPE @ SPIN_SYSTEM_ID @ HETEROGENEITY @ @ END_RES_DEF RES_ID 3 RES_TYPE ASP SPIN_SYSTEM_ID 32 HETEROGENEITY 100 HN 8.4352 N 120.6879 CA 54.7602 HA 4.6200 CB 41.4980 HB1|2 2.6350 HB1|2 2.7090 END_RES_DEF RES_ID 4 RES_TYPE ARG SPIN_SYSTEM_ID 27 HETEROGENEITY 100 HN 8.2450 N 120.9950 CA 55.9900 HA 4.4060 CB 31.3746 HB1|2 1.8200 CG 27.2200 HG1|2 1.5860 CD 43.3500 HD1|2 3.1870 HD1|2 3.2770 END_RES_DEF RES_ID 5 RES_TYPE VAL SPIN_SYSTEM_ID 7 HETEROGENEITY 100 HN 8.2622 (A.274 A.275 B.7 C.12 C.13 D.32 D.31 D.34 D.33 -F.1 -F.4 -F.5 -F.6 -F.7 -F.8 -F.9) N 124.8363 (A.274 A.275 B.7 C.12 C.13 D.32 D.31 D.34 D.33 -F.1 -F.4 -F.5 -F.6 -F.7 -F.8 -F.9) CA 62.7100 (C.12 D.34 -L.46) HA 3.8300 (-F.5 -F.12 -L.46) CB 32.1274 (D.32 -L.35 -L.36 -L.49 -L.43 -L.544 -R.511 -R.512 -R.513) HB 1.8160 (-F.6 -L.35 -L.36 -L.49 -L.43 -L.544 -R.511 -R.512 -R.513) CG1|2 21.3100 (-R.396 -R.400 -G.27) HG1#|2# 0.6560 (-F.8 -F.17 -L.35 -L.46 -L.47 -L.48 -L.49 -R.512 -R.396 -R.400) CG1|2 21.2800 (-L.35 -L.36 -L.46 -L.47 -L.48 -L.49 -G.27) HG1#|2# 0.2510 (-F.9 -F.18 -L.36 -L.48 -G.27 -R.511) END_RES_DEF RES_ID 6 RES_TYPE LYS SPIN_SYSTEM_ID 1 HETEROGENEITY 100 HN 8.2601 (A.261 A.262 B.1 C.2 C.1 D.3 D.4 D.1 D.2 -F.10 -F.11 -F.12 -F.13 -F.14 -F.16 -F.17 -F.18) N 127.3943 (A.261 A.262 B.1 C.2 C.1 D.3 D.4 D.1 D.2 -F.10 -F.11 -F.12 -F.13 -F.14 -F.16 -F.17 -F.18) CA 56.3060 HA 4.4530 (-F.11 -F.19) CB 34.6584 (-G.96 -U.1008) HB1|2 1.7540 (-F.13 -G.96) HB1|2 1.5800 (-U.1008) CG 26.1900 (-L.54 -L.55 -G.16 -G.15 -G.17 -G.18) HG1|2 1.5940 (-F.14 -F.16 -L.54 -L.55 -G.16 -G.15 -G.17 -G.18) CD 29.6600 (-L.64) HD1|2 1.8720 (-L.64) CE 42.1600 (-L.55 -L.64 -L.73 -L.74 -L.75 -G.55) HE1|2 3.0960 (-L.55 -L.64 -L.73 -L.74 -L.75 -G.55) HE1|2 3.1500 END_RES_DEF RES_ID 7 RES_TYPE ARG SPIN_SYSTEM_ID 34 HETEROGENEITY 100 HN 7.6260 (A.323 A.324 B.41 D.113 D.116 D.123 D.124 -F.10 -F.19 -F.21) N 120.2770 (A.323 A.324 B.41 D.113 D.116 D.123 D.124 -F.19 -F.21) CA 55.1730 (D.116) HA 4.0690 CB 29.5155 (D.123 -U.1008 -G.198 -G.199) HB1|2 1.7310 (-F.21 -U.1008 -G.198 -G.199) CG 27.3300 (-L.442 -L.183 -L.511 -L.527 -G.204 -G.135) HG1|2 1.6660 (-L.442 -L.183 -L.511 -L.527 -G.204 -G.135) CD 43.1200 HD1|2 3.2580 END_RES_DEF RES_ID 8 RES_TYPE PRO SPIN_SYSTEM_ID 98 HETEROGENEITY 100 CA 61.9300 HA 4.3970 (-F.23) CB 31.5700 (-L.183) HB1|2 1.8780 (-F.28) HB1|2 1.8190 (-L.183) CG 27.1500 HG1|2 1.6970 CD 49.4600 HD1|2 3.3500 (-R.467) HD1|2 3.4900 END_RES_DEF bmrb 0000775 0000144 0000145 00000003234 07264674504 010055 0 ustar web web #! /bin/sh clear echo "" echo " +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ Author : Carolyn M. Slupsky Date : Thu Apr 2 14:29:02 PST 1998 Purpose : To convert from PIPP .shift file to BMRB format To run : 1. First modify header.awk and shft2bmrb.awk to include the number of residues in your protein (r_length). 2. Then, modify shft2bmrb.awk to have the generic errors assigned to 15N, 13C, and 1H. 3. Finally, type bmrb. Input : 1. A file with the 1-letter amino acid sequence (no breaks) 2. A modified PIPP file (no header, and no '\' characters) Output : A completed file in BioMagRes Bank format. After the progra m is run, you will have to modify some of the ambiguity codes (those with a code of 4 or higher).....for more information, see the header of the output. You may also have to alter some of the errors (if they are not generic errors). Please check over the final result to be sure the program ran satisfactorily. I have only accounted for atoms that I would normally see and assign in NMR spectra. Note : I wrote this program for myself, and therefore it is not well commented. I am not responsible for any incorrect results obtained while using this script, but I would be happy to answer any questions or to help modify it. (My e-mail address is: cms@wolf.biochem.ubc.ca). +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++" header.awk shft2bmrb.awk CVS/ 0002775 0000144 0000145 00000000000 12450356504 007626 5 ustar web web CVS/Repository 0000664 0000144 0000145 00000000012 12450356504 011717 0 ustar web web pipp2star CVS/Root 0000664 0000144 0000145 00000000022 12450356504 010464 0 ustar web web /websites/www/cvs CVS/Entries 0000664 0000144 0000145 00000000562 12450356504 011163 0 ustar web web /1HRY1-8.SEQ/1.1.1.1/Tue Apr 10 21:21:08 2001// /1HRY1-8.T/1.1.1.1/Tue Apr 10 21:21:08 2001// /Makefile/1.6/Mon Nov 22 23:51:40 2010// /bmrb/1.1.1.1/Tue Apr 10 21:21:08 2001// /header.awk/1.1.1.1/Tue Apr 10 21:21:09 2001// /instruction/1.1.1.1/Tue Apr 10 21:21:09 2001// /pipp2star.html/1.5/Thu Feb 7 20:55:29 2008// /shft2bmrb.awk/1.1.1.1/Tue Apr 10 21:21:09 2001// D header.awk 0000775 0000144 0000145 00000011361 07264674505 011145 0 ustar web web ##header.awk #!/bin/sh -x echo "" echo "" echo " Enter amino-acid sequence (1-letter code) filename:" echo -n ">> " read input echo "" echo "** Using file $input" echo "" echo "" echo "" nawk 'BEGIN { r_lngth=8 n=1 } { printf "#\n" printf "# The original sequence entered was:\n" printf "# %s\n",$1 printf "#\n" printf "\n" printf "\n" printf "# Expressed in NMR-STAR, this sequence is:\n" printf "\n" printf "_Mol_residue_sequence\n" printf ";\n" len=r_lngth/20 len++ for (i=1 ; i<=len ; i++) { printf "%s\n",substr($1,n,20) n=n+20 } printf ";\n" printf "\n" printf "loop_\n" printf " _Residue_seq_code\n" printf " _Residue_author_seq_code\n" printf " _Residue_label\n" printf "\n" n=1 for (i=1 ; i<=r_lngth ; i++) { a=substr($1,n,1) if (a=="G") {aa[i]="GLY"} if (a=="A") {aa[i]="ALA"} if (a=="V") {aa[i]="VAL"} if (a=="L") {aa[i]="LEU"} if (a=="I") {aa[i]="ILE"} if (a=="M") {aa[i]="MET"} if (a=="P") {aa[i]="PRO"} if (a=="W") {aa[i]="TRP"} if (a=="F") {aa[i]="PHE"} if (a=="Y") {aa[i]="TYR"} if (a=="S") {aa[i]="SER"} if (a=="C") {aa[i]="CYS"} if (a=="T") {aa[i]="THR"} if (a=="Q") {aa[i]="GLN"} if (a=="N") {aa[i]="ASN"} if (a=="D") {aa[i]="ASP"} if (a=="E") {aa[i]="GLU"} if (a=="H") {aa[i]="HIS"} if (a=="R") {aa[i]="ARG"} if (a=="K") {aa[i]="LYS"} num[i]=n n=n+1 } for (i=1 ; i<=r_lngth ; i++) { printf "%1.0f @ %3s %1.0f @ %3s %1.0f @ %3s %1.0f @ %3s %1.0f @ %-3s\n",num[i],aa[i],num[i+1],aa[i+1],num[i+2],aa[i+2],num[i+3],aa[i+3],num[i+4],aa[i+4] i=i+4 } printf "\n" printf "\n" printf "stop_\n" printf "\n" printf "###################################################################\n" printf "# Chemical Shift Ambiguity Code Definitions #\n" printf "# #\n" printf "# Codes Definition #\n" printf "# #\n" printf "# 1 Unique #\n" printf "# 2 Ambiguity of geminal atoms or geminal methyl #\n" printf "# proton groups #\n" printf "# 3 Aromatic atoms on opposite sides of the ring #\n" printf "# (e.g. Tyr HE1 and HE2 protons) #\n" printf "# 4 Intraresidue ambiguities (e.g. Lys HG and #\n" printf "# HD protons) #\n" printf "# 5 Interresidue ambiguities (Lys 12 vs. Lys 27) #\n" printf "# 9 Ambiguous, specific ambiguity not defined #\n" printf "# #\n" printf "###################################################################\n" printf "\n" printf "\n" printf "# INSTRUCTIONS\n" printf "# 1) Replace the @-signs with appropriate values.\n" printf "# 2) Text comments concerning the assignments can be\n" printf "# supplied in the full deposition.\n" printf "# 3) Feel free to add or delete rows to the table as needed.\n" printf "# The row numbers (_Atom-shift_assign_ID values) will be\n" printf "# re-assigned to sequential values by BMRB\n" printf "\n" printf "\n" printf "# The atom table chosen for this sequence is:\n" printf "\n" printf "loop_\n" printf " _Atom-shift_assign_ID\n" printf " _Residue_seq_code\n" printf " _Residue_label\n" printf " _Atom_name\n" printf " _Atom_type\n" printf " _Chem_shift_value\n" printf " _Chem_shift_value_error\n" printf " _Chem_shift_ambiguity_code\n" printf "\n" printf "#\n" printf "#Atom Residue\n" printf "#shift Seq Residue Atom Atom Shift/ Error/ Ambiguity\n" printf "#assign code Label Name Type ppm ppm Code\n" printf "#---------------------------------------------------------------\n" printf "#\n" printf "\n" printf "\n" }' < $input > header instruction 0000664 0000144 0000145 00000005540 07264674505 011514 0 ustar web web Instruction from Author Author : Carolyn M. Slupsky Date : Thu Apr 2 14:29:02 PST 1998 Purpose : To convert from PIPP .shift file to BMRB format To run : 1. First modify header.awk and shft2bmrb.awk to include the number of residues in your protein (r_length). 2. Then, modify shft2bmrb.awk to have the generic errors assigned to 15N, 13C, and 1H. If there is no error given, assign these three values to 0 3. Finally, type bmrb. Input : 1. A file with the 1-letter amino acid sequence (no breaks) 2. A modified PIPP file (no header, and no '\' characters) Output : A completed file in BioMagRes Bank format. After the progra m is run, you will have to modify some of the ambiguity codes (those with a code of 4 or higher).....for more information, see the header of the output. You may also have to alter some of the errors (if they are not generic errors). Please check over the final result to be sure the program ran satisfactorily. I have only accounted for atoms that I would normally see and assign in NMR spectra. Note : I wrote this program for myself, and therefore it is not well commented. I am not responsible for any incorrect results obtained while using this script, but I would be happy to answer any questions or to help modify it. (My e-mail address is: cms@wolf.biochem.ubc.ca). Additional instruction from BMRB Using script software to convert PDB-PIPP file portion to BMRB STAR files 1. down load PDB "nmr restraint" files 2. uncompress the file, delete all "\" symbols 3. save only the PIPP (chemical shift assignment) part, delete the rest 4. files from 3 should have the following format: (e.g.) RES_ID 1 RES_TYPE MET SPIN_SYSTEM_ID 1 HETEROGENEITY 100 N 120.0000 HN 8.7000 CA 54.9000 HA 4.0000 CB 32.5600 HB# 2.1600 CG 30.7400 HG# 2.5800 END_RES_DEF delete whatever text that is not included in this format. If the assignments for a amino acid is missing, add into the corresponding position the following: (e.g.) RES_ID 1 # residue number RES_TYPE @ SPIN_SYSTEM_ID @ HETEROGENEITY @ @ END_RES_DEF 5. Edit 1-letter amino acid sequence file according to the chemical shift assignment, name the skipped amino acid "@"; otherwise, find the aa sequence in the original PDB coordinance file, and convert it from 3-letter code to 1-letter code. The sequence code should be on one unbroken line. 6. edit header.awk and shft2bmrb.awk files, change r_lgnth to the actual length of the peptide. 7. run bmrb by typing "bmrb", give the names of input and output files as requested There are two files that can be used for testing: test.seq (aa seq, r_lgnth=8) test.t (PIPP file) whose format the user should refer to. Makefile 0000664 0000144 0000145 00000001124 11472601014 010617 0 ustar web web # Makefile for pipp2star # include $(BMRBMAKEHEADER) # # uncomment (and edit) these if your $BMRBMAKEHEADER does not # define them (or you don't have $BMRBMAKEHEADER # #DOCUMENTROOT=../htdocs #FTPROOT=../ftp #TAR=tar INSTALLDIR=$(DOCUMENTROOT)/pipp2STAR FTPDIR=$(SWFTPROOT)/contributed all: clean install: install-html install-program install-html: - mkdir $(INSTALLDIR) cp bmrb *.awk instruction pipp2star.html 1HRY1-8.* $(INSTALLDIR) install-program: - mkdir -p $(FTPDIR) $(TAR) -cf pipp2nmrstar.tar * cp pipp2nmrstar.tar $(FTPDIR) clean: - rm pipp2nmrstar.tar *\~ # eof Makefile pipp2star.html 0000664 0000144 0000145 00000003074 10752670101 012002 0 ustar web web
The software and accompanying instructions are provided "as is"
without warranty of any kind. The authors do not warrant, guarantee, or
make any representations regarding the use, or the results of the use of
the software or accompanying instructions in terms of correctness, accuracy,
reliabilty, currentness or otherwise. The entire risk as to the results
and performance of the software is assumed by you. If the software or instructions
are defective, you, and not the authors, assume the entire cost of all necessary
servicing, repair or correction.
pipp2nmrstar.tar from
nearest BMRB mirror
or from main BMRB site
to a directory on your computer, and unpack it with "tar -xf pipp2nmrstar.tar".
This will create a directory called 'pipp2nmrstar' where you will find several files
including "instructions," and two files to use in testing the software.
Who wrote PIPP2NMRSTAR?
Author : Carolyn M. Slupsky
Date : Thu Apr 2 14:29:02 PST 1998
Purpose : To convert from PIPP .shift file to BMRB format
shft2bmrb.awk 0000775 0000144 0000145 00000043605 07264674505 011614 0 ustar web web ##shft2bmrb.awk
#!/bin/sh -x
echo ""
echo ""
echo " Enter input filename:"
echo -n ">> "
read input
echo ""
echo "** Using input file $input"
echo ""
echo ""
echo " Enter output filename:"
echo -n ">> "
read output
echo ""
echo "** Using output file $output"
echo ""
echo ""
echo ""
# err1 = error in 1H
# err2 = error in 15N
# err3 = error in 13C
# r_lngth = number of amino acids in your protein
nawk 'BEGIN {
err1=0.03
err2=0.25
err3=0.50
loop=0
r_lngth=8
}
{
while (loop == 0)
{
for (i=1 ; i<=r_lngth ; i++) {
if ($1 == "END_RES_DEF") getline
if ($1=="") getline
res_num[i]=$2
getline
if (($1=="RES_TYPE") && ($2=="UNK")) {$2="GLY"}
assign[i]=$2
getline
if ($1=="SPIN_SYSTEM_ID") getline
if ($1=="HETEROGENEITY") getline
j=0
while ($1 != "END_RES_DEF") {
j++
if ($1=="HN") {$1="H"}
atom[i,j]=$1
shift[i,j]=$2
num_j[i]=j
getline
}
}
for (k=1 ; k<=10 ; k++) {
for (i=1 ; i<=r_lngth ; i++) {
for (j=1 ; j<=num_j[i] ; j++){
atm1=substr(atom[i,j],1,1)
atm2=substr(atom[i,j+1],1,1)
if (((atm1=="N") && (atm2=="H")) || ((atm1=="C") && (atm2=="H")) || ((atm1=="N") && (atm2=="C")))
{atom1=atom[i,j]
shift1=shift[i,j]
atom[i,j]=atom[i,j+1]
shift[i,j]=shift[i,j+1]
atom[i,j+1]=atom1
shift[i,j+1]=shift1
}
}
}}
for (i=1 ; i<=r_lngth ; i++)
{
for (j=1 ; j<=num_j[i] ; j++)
{
if (substr(atom[i,j],1,1)=="H") {err[i,j]=err1}
if (substr(atom[i,j],1,1)=="C") {err[i,j]=err3}
if (substr(atom[i,j],1,1)=="N") {err[i,j]=err2}
if ((atom[i,j]=="N")||(atom[i,j]=="H")||(atom[i,j]=="CA")||(atom[i,j]=="HA")||(atom[i,j]=="C")\
||(atom[i,j]=="CB")||(atom[i,j]=="CG")||(atom[i,j]=="CD"))
{amb[i,j]=1}
if ((assign[i] == "ALA") && (atom[i,j] == "HB#"))
{
amb[i,j]=1
atom[i,j]="HB"
}
if ((assign[i] == "VAL")||(assign[i] == "THR")||(assign[i] == "ILE"))
{
if (atom[i,j] == "HB") {amb[i,j]=1}
}
if (assign[i] == "VAL")
{
if ((atom[i,j] == "CG1")||(atom[i,j] == "CG2")||(atom[i,j] == "HG1#")||(atom[i,j] == "HG2#")) {amb[i,j]=1}
if (atom[i,j] == "HG1#") {atom[i,j]="HG1"}
if (atom[i,j] == "HG2#") {atom[i,j]="HG2"}
}
if (assign[i] == "THR")
{
if ((atom[i,j] == "CG2")||(atom[i,j] == "HG2#")) {amb[i,j]=1}
if (atom[i,j] == "HG2#")
{atom[i,j]="HG2"}
}
if (assign[i] == "MET")
{
if (atom[i,j] == "CE") {amb[i,j]=1}
if (atom[i,j] == "HE#")
{
amb[i,j]=1
atom[i,j]="HE"
}
}
if (assign[i] == "ARG")
{
if (atom[i,j] == "NE") {amb[i,j]=1}
if (atom[i] == "HE") {amb[i,j]=1}
}
if (assign[i] == "LEU")
{
if ((atom[i,j] == "CG")||(atom[i,j] == "HG")) {amb[i,j]=1}
if ((atom[i,j] == "CD1")||(atom[i,j] == "CD2")||(atom[i,j] == "HD1#")||(atom[i,j] == "HD2#")) {amb[i,j]=1}
if (atom[i,j] == "HD1#") {atom[i,j]="HD1"}
if (atom[i,j] == "HD2#") {atom[i,j]="HD2"}
}
if (assign[i] == "HIS")
if ((atom[i,j]=="ND1")||(atom[i,j]=="CD2")||(atom[i,j]=="HD2")||(atom[i,j]=="CE1")||(atom[i,j]=="HE1")||(atom[i,j]=="NE2"))
{amb[i,j]=1}
if (assign[i] == "TRP")
{
if ((atom[i,j]=="CD1")||(atom[i,j]=="NE1")||(atom[i,j]=="CE3")||(atom[i,j]=="CZ2")||(atom[i,j]=="CZ3")||(atom[i,j]=="CH2"))
{amb[i,j]=1}
if ((atom[i,j]=="HD1")||(atom[i,j]=="HE1")||(atom[i,j]=="HE3")||(atom[i,j]=="HZ2")||(atom[i,j]=="HZ3")||(atom[i,j]=="HH2"))
{amb[i,j]=1}
}
if (assign[i] == "PHE")
if ((atom[i,j] == "CZ") || (atom[i,j] == "HZ")) {amb[i,j]=1}
if (assign[i]=="GLY")
{
if ((atom[i,j]=="HA1") || (atom[i,j] == "HA2"))
{
amb[i,j]=1
if (atom[i,j] == "HA1") {atom[i,j] = "HA3"}
}
else if (atom[i,j]=="HA#")
{
amb[i,j]=2
if (atom[i,j+1] == "HA#")
{
amb[i,j+1]=2
atom[i,j]="HA2"
atom[i,j+1]="HA3"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HA2"
atom[i,j+1]="HA3"
}
}
}
if ((assign[i] != "GLY")||(assign[i] != "ALA")||(assign[i] != "VAL")||(assign[i] != "THR")||(assign[i] != "ILE"))
{
if ((atom[i,j]=="HB1") || (atom[i,j] == "HB2"))
{
amb[i,j]=1
if (atom[i,j] == "HB1") {atom[i,j] = "HB3"}
}
else if (atom[i,j]=="HB#")
{
amb[i,j]=2
if (atom[i,j+1] == "HB#")
{
amb[i,j+1]=2
atom[i,j]="HB2"
atom[i,j+1]="HB3"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HB2"
atom[i,j+1]="HB3"
}
}
}
if ((assign[i]=="MET")||(assign[i]=="PRO")||(assign[i]=="LYS")||(assign[i]=="ARG")||(assign[i]=="GLN")||(assign[i]=="GLU"))
{
if ((atom[i,j]=="HG1") || (atom[i,j] == "HG2"))
{
amb[i,j]=1
if (atom[i,j] == "HG1") {atom[i,j] = "HG3"}
}
else if (atom[i,j]=="HG#")
{
amb[i,j]=2
if (atom[i,j+1] == "HG#")
{
amb[i,j+1]=2
atom[i,j]="HG2"
atom[i,j+1]="HG3"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HG2"
atom[i,j+1]="HG3"
}
}
}
if ((assign[i] == "MET")||(assign[i] == "PRO")||(assign[i] == "LYS")||(assign[i] == "ARG"))
{
if ((atom[i,j]=="HD1") || (atom[i,j] == "HD2"))
{
amb[i,j]=1
if (atom[i,j] == "HD1") {atom[i,j] = "HD3"}
}
else if (atom[i,j]=="HD#")
{
amb[i,j]=2
if (atom[i,j+1] == "HD#")
{
amb[i,j+1]=2
atom[i,j]="HD2"
atom[i,j+1]="HD3"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HD2"
atom[i,j+1]="HD3"
}
}
}
if (assign[i] == "LYS")
{
if (atom[i,j]=="CE") {amb[i,j]=1}
if ((atom[i,j]=="HE1") || (atom[i,j] == "HE2"))
{
amb[i,j]=1
if (atom[i,j] == "HE1") {atom[i,j] = "HE3"}
}
else if (atom[i,j]=="HE#")
{
amb[i,j]=2
if (atom[i,j+1] == "HE#")
{
amb[i,j+1]=2
atom[i,j]="HE2"
atom[i,j+1]="HE3"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HE2"
atom[i,j+1]="HE3"
}
}
}
if (assign[i] == "ASN")
{
if (atom[i,j]=="ND2") {amb[i,j]=1}
if ((atom[i,j]=="HD21") || (atom[i,j] == "HD22"))
{
amb[i,j]=1
if (atom[i,j] == "HD21") {atom[i,j] = "HD23"}
}
else if (atom[i,j]=="HD2#")
{
amb[i,j]=2
if (atom[i,j+1] == "HD2#")
{
amb[i,j+1]=2
atom[i,j]="HD22"
atom[i,j+1]="HD23"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HD22"
atom[i,j+1]="HD23"
}
}
}
if (assign[i] == "GLN")
{
if (atom[i,j]=="NE2") {amb[i,j]=1}
if ((atom[i,j]=="HE21") || (atom[i,j] == "HE22"))
{
amb[i,j]=1
if (atom[i,j] == "HE21") {atom[i,j] = "HE23"}
}
else if (atom[i,j]=="HE2#")
{
amb[i,j]=2
if (atom[i,j+1] == "HE2#")
{
amb[i,j+1]=2
atom[i,j]="HE22"
atom[i,j+1]="HE23"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HE22"
atom[i,j+1]="HE23"
}
}
}
if (assign[i] == "ILE")
{
if ((atom[i,j]=="CG1")||(atom[i,j]=="CD1")||(atom[i,j]=="CG2")) {amb[i,j]=1}
if (atom[i,j] == "HG2#")
{
amb[i,j]=1
atom[i,j] = "HG2"
}
if (atom[i,j] == "HD1#")
{
amb[i,j]=1
atom[i,j] = "HD1"
}
if ((atom[i,j]=="HG11") || (atom[i,j] == "HG12"))
{
amb[i,j]=1
if (atom[i,j] == "HG11") {atom[i,j] = "HG13"}
}
else if (atom[i,j]=="HG1#")
{
amb[i,j]=2
if (atom[i,j+1] == "HG1#")
{
amb[i,j+1]=2
atom[i,j]="HG12"
atom[i,j+1]="HG13"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HG12"
atom[i,j+1]="HG13"
}
}
}
if ((assign[i] == "PHE") || (assign[i]== "TYR"))
{
if ((atom[i,j]=="CD1")||(atom[i,j]=="CD2")||(atom[i,j]=="HD1")||(atom[i,j]=="HD2")) {amb[i,j]=3}
if ((atom[i,j]=="CE1")||(atom[i,j]=="CE2")||(atom[i,j]=="HE1")||(atom[i,j]=="HE2")) {amb[i,j]=3}
if (atom[i,j]=="HD#")
{
amb[i,j]=3
if (atom[i,j+1] == "HD#")
{
amb[i,j+1]=2
atom[i,j]="HD1"
atom[i,j+1]="HD2"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HD1"
atom[i,j+1]="HD2"
}
}
if (atom[i,j]=="HE#")
{
amb[i,j]=3
if (atom[i,j+1] == "HE#")
{
amb[i,j+1]=3
atom[i,j]="HE1"
atom[i,j+1]="HE2"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="HE1"
atom[i,j+1]="HE2"
}
}
if (atom[i,j]=="CD#")
{
amb[i,j]=3
if (atom[i,j+1] == "CD#")
{
amb[i,j+1]=3
atom[i,j]="CD1"
atom[i,j+1]="CD2"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="CD1"
atom[i,j+1]="CD2"
}
}
if (atom[i,j]=="CE#")
{
amb[i,j]=3
if (atom[i,j+1] == "CE#")
{
amb[i,j+1]=3
atom[i,j]="CE1"
atom[i,j+1]="CE2"
}
else
{
num_j[i]++
for (k=num_j[i] ; k>j ; k--)
{
atom[i,k]=atom[i,k-1]
shift[i,k]=shift[i,k-1]
err[i,k]=err[i,k-1]
amb[i,k]=amb[i,k-1]
}
atom[i,j]="CE1"
atom[i,j+1]="CE2"
}
}
}
}
}
for (m=1 ; m<=10 ; m++) {
for (i=1 ; i<=r_lngth ; i++) {
for (j=1 ; j<=num_j[i] ; j++){
atm1=substr(atom[i,j],1,2)
atm2=substr(atom[i,j+1],1,2)
if (((atm1=="CA")||(atm1=="CB")||(atm1=="CG")||(atm1=="CD")||(atm1=="CE")||(atm1=="CZ")||(atm1=="CH")) && (atm2=="C"))
{atom1=atom[i,j]
shift1=shift[i,j]
amb1=amb[i,j]
atom[i,j]=atom[i,j+1]
shift[i,j]=shift[i,j+1]
amb[i,j]=amb[i,j+1]
atom[i,j+1]=atom1
shift[i,j+1]=shift1
amb[i,j+1]=amb1
}
}
}}
for (m=1 ; m<=10 ; m++) {
for (i=1 ; i<=r_lngth ; i++) {
for (j=1 ; j<=num_j[i] ; j++){
atm1=atom[i,j]
atm2=atom[i,j+1]
if (((atm1=="HB3")&&(atm2=="HB2"))||((atm1=="HG3")&&(atm2=="HG2"))||((atm1=="HD3")&&(atm2=="HD2"))\
||((atm1=="HE3")&&(atm2=="HE2"))||((atm1=="HE23")&&(atm2=="HE22"))||((atm1=="HD23")&&(atm2=="HD22"))\
||((atm1=="HA3")&&(atm2=="HA2"))||((atm1=="HG13")&&(atm2=="HG12")))
{atom1=atom[i,j]
shift1=shift[i,j]
amb1=amb[i,j]
atom[i,j]=atom[i,j+1]
shift[i,j]=shift[i,j+1]
amb[i,j]=amb[i,j+1]
atom[i,j+1]=atom1
shift[i,j+1]=shift1
amb[i,j+1]=amb1
}
}
}}
for (i=1 ; i<=r_lngth ; i++)
{
for (j=1 ; j<=num_j[i] ; j++)
{
atom_num++
printf "%1.0f %1.0f %s %s %s %3.2f %3.2f %1.0f\n",atom_num,res_num[i],assign[i],atom[i,j],\
substr(atom[i,j],1,1),shift[i,j],err[i,j],amb[i,j]
}
}
loop=1}
}
END {
printf "\n"
printf "stop_\n"
printf "\n"
printf "# The following loop is used to define sets of Atom-shift assignment IDs that\n"
printf "# represent related ambiguous assignments taken from the above list of\n"
printf "# assigned chemical shifts. Each element in the set should be separated by a\n"
printf "# comma, as shown in the example below, and is the assignment ID for a chemical\n"
printf "# shift assignment that has been given as ambiguity code of 4 or 5. Each set\n"
printf "# indicates that the observed chemical shifts are related to the defined\n"
printf "# atoms, but have not been assigned uniquely to a specific atom in the set.\n"
printf "\n"
printf "loop_\n"
printf " _Atom-shift_assign_ID_ambiguity\n"
printf "\n"
printf "#\n"
printf "# Sets of Atom-shift Assignment Ambiguities\n"
printf " #\n"
printf "# ------------------------------------------\n"
printf "# Example: 5,4,7\n"
printf "#\n"
printf " @\n"
printf "stop_\n"
printf "\n"
}' < $input > tmp
cat header tmp > $output
rm tmp
rm header