seq 1 7 | tr '\n' ' ' | awk '{ResNum= $1 ; AtomNum=1; j=0 ; l=1; d=0; b=0.75; dd = b*(3^(0.5)); yy = b; \ while ( ResNum <= NF) {\ printf("ATOM%7d N UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum, ResNum, d, j, 0); \ printf("ATOM%7d CA UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+1, ResNum, d+(dd), -j+yy, 0); \ printf("ATOM%7d CB UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+4, ResNum, d+(dd), (-j+yy)+(l*yy), l*dd); \ printf("ATOM%7d C UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+2, ResNum, d+(2*dd), j, 0); \ printf("ATOM%7d O UNK%6d%12.3f%8.3f%8.3f 1.00 0.00 UNKA\n", AtomNum+3, ResNum, d+(2*dd), j+(-l*2*b), 0); \ ResNum++; \ AtomNum = AtomNum + 5; \ d = d + 3*dd; \ if (j == '0') j = yy ; 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); \ }'