# hexagonal 1.5 1.29904 0.75 # scalers 1 0.866025 0.5 # tetragonal 1.5 1.22496 0.865718 # scalers 1 0.816642 0.577145 seq 1 7 | tr '\n' ' ' | awk '{ResNum= $1 ; AtomNum=1; j=0 ; l=1; d=0; b=1.50; \ hdy = b*0.5; hdx = b*0.866025; \ tdy = b*0.577145; tdx = b*0.816642; \ while ( ResNum <= NF) {\ printf("ATOM%7d N ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum, ResNum, d, j, 0); \ printf("ATOM%7d CA ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+1, ResNum, d+(tdx), -j+tdy, 0); \ printf("ATOM%7d CB ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy)+(l*tdy), 1*l*tdx); \ printf("ATOM%7d CC ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy), 2*l*tdx); \ printf("ATOM%7d CD ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy)+(l*tdy), 3*l*tdx); \ printf("ATOM%7d NE ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy), 4*l*tdx); \ printf("ATOM%7d CF ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy)+(l*tdy), 5*l*tdx); \ printf("ATOM%7d NG ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy), 6*l*tdx); \ printf("ATOM%7d NF ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(tdx), (-j+tdy)+(l*tdy)+(l*b), 5*l*tdx); \ printf("ATOM%7d C ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+2, ResNum, d+(tdx+hdx), j, 0); \ printf("ATOM%7d O ARG%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+3, ResNum, d+(tdx+hdx), j+(-l*b), 0); \ ResNum++; \ AtomNum = AtomNum + 5; \ d = d + tdx + 2*hdx \ if (j == '0') j = tdy ; else j = 0 ; if (l == '1') l = '-1' ; else l = 1 ; \ } \ AtomNum = AtomNum + 5; \ printf("ATOM%7d O UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum, ResNum, d, j, 0); \ }'