/* rings3d.f -- translated by f2c (version 20061008). You must link the resulting object file with libf2c: on Microsoft Windows system, link with libf2c.lib; on Linux or Unix systems, link with .../path/to/libf2c.a -lm or, if you install libf2c.a in a standard place, with -lf2c -lm -- in that order, at the end of the command line, as in cc *.o -lf2c -lm Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., http://www.netlib.org/f2c/libf2c.zip */ #include "f2c.h" /* Table of constant values */ static integer c__1 = 1; static integer c_n1 = -1; static integer c__9 = 9; static integer c__3 = 3; /* Main program */ int MAIN__(void) { /* Initialized data */ static char defcol[60*6] = "COLOUR########### A########## 0.501 0.5" "01 1.000 2.00" "COLOUR########### C########## 1.000 0.39" "8 0.063 2.00" "COLOUR########### G########## 1.000 0.101" " 0.101 2.00" "COLOUR########### T########## 0.501 1.000 " " 0.501 2.00" "COLOUR########### U########## 0.501 1.000 " " 0.501 2.00" "COLOUR######################## 0.800 0.000 " "0.000 2.00"; static char type__[4*10*21] = " HIS" " CG " " ND1" " CE1" " NE2" " CD2" " " " " " " " " " PHE" " CG " " CD1" " CE1" " CZ " " CE2" " CD2" " " " " " " " TYR" " CG " " CD1" " CE1" " CZ " " CE2" " CD2" " " " " " " " TRP" " CZ2" " CH2" " CZ3" " CE3" " CD2" " CE2" " CG " " CD1" " NE1" " GAL" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " NAG" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " NGA" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " GLC" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " MAN" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " MNG" " C1 " " C2 " " C3 " " C4 " " C5 " " O5 " " " " " " " " SIA" " C2 " " C3 " " C4 " " C5 " " C6 " " O6 " " " " " " " " +C" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " +T" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " +U" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " +A" " N3 " " C2 " " N1 " " C6 " " C5 " " C4 " " N7 " " C8 " " N9 " " +G" " N3 " " C2 " " N1 " " C6 " " C5 " " C4 " " N7 " " C8 " " N9 " " C" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " T" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " U" " N1 " " C2 " " N3 " " C4 " " C5 " " C6 " " " " " " " " A" " N3 " " C2 " " N1 " " C6 " " C5 " " C4 " " N7 " " C8 " " N9 " " G" " N3 " " C2 " " N1 " " C6 " " C5 " " C4 " " N7 " " C8 " " N9 "; static integer p_start__ = 1; static integer p_end__ = 4; static integer s_start__ = 5; static integer s_end__ = 11; static integer b_start__ = 12; static integer b_end__ = 21; /* Format strings */ static char fmt_901[] = "(22x,i4,4x,3f8.3)"; static char fmt_321[] = "(\002# \002,a4,2x,i4,a1)"; static char fmt_322[] = "(\0021\002,/,3(3f8.2),3f6.3)"; /* System generated locals */ integer i__1; icilist ici__1; /* Builtin functions */ integer s_cmp(char *, char *, ftnlen, ftnlen), s_wsfe(cilist *), do_fio( integer *, char *, ftnlen), e_wsfe(void), s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen), e_wsle(void), s_rsfe(cilist *), e_rsfe(void); /* Subroutine */ int s_stop(char *, ftnlen); integer s_rsfi(icilist *), e_rsfi(void); /* Subroutine */ int s_copy(char *, char *, ftnlen, ftnlen); /* Local variables */ static integer ringsize, i__, j, n; static real x[10000], y[10000], z__[10000], rgb[3000] /* was [3][ 1000] */; static integer ind[10]; static real red, blu, grn, vdw[1000]; static char card[80], name__[4*10000]; static integer icol, narg, iatm; static char mask[24*1000]; static integer ncol, jatm, natm; extern /* Subroutine */ int exit_(integer *); static char test[24]; static logical bflag; static char chain[1*10000]; extern integer iargc_(void); static logical pflag, sflag; extern logical match_(char *, char *, ftnlen, ftnlen); static integer color[10000], nhits[21], resno[10000]; extern /* Subroutine */ int getarg_(integer *, char *, ftnlen); static integer nrings; static char resname[4*10000], options[64]; /* Fortran I/O blocks */ static cilist io___15 = { 0, 0, 0, "(A)", 0 }; static cilist io___16 = { 0, 0, 0, "(A)", 0 }; static cilist io___17 = { 0, 0, 0, "(A)", 0 }; static cilist io___18 = { 0, 0, 0, "(A)", 0 }; static cilist io___19 = { 0, 0, 0, 0, 0 }; static cilist io___22 = { 0, 5, 1, "(a80)", 0 }; static cilist io___24 = { 0, 0, 0, 0, 0 }; static icilist io___25 = { 0, card, 0, "(6x,a24,3f8.3,f6.2)", 80, 1 }; static cilist io___30 = { 0, 0, 0, 0, 0 }; static icilist io___34 = { 0, card, 0, fmt_901, 80, 1 }; static cilist io___42 = { 0, 0, 0, 0, 0 }; static cilist io___43 = { 0, 0, 0, 0, 0 }; static cilist io___50 = { 0, 0, 0, 0, 0 }; static cilist io___55 = { 0, 6, 0, fmt_321, 0 }; static cilist io___56 = { 0, 6, 0, fmt_322, 0 }; static cilist io___57 = { 0, 6, 0, fmt_322, 0 }; static cilist io___58 = { 0, 6, 0, fmt_322, 0 }; static cilist io___59 = { 0, 6, 0, fmt_322, 0 }; static cilist io___60 = { 0, 6, 0, fmt_322, 0 }; static cilist io___61 = { 0, 6, 0, fmt_322, 0 }; static cilist io___62 = { 0, 6, 0, fmt_322, 0 }; static cilist io___63 = { 0, 6, 0, fmt_322, 0 }; static cilist io___64 = { 0, 6, 0, fmt_322, 0 }; static cilist io___65 = { 0, 6, 0, fmt_322, 0 }; static cilist io___66 = { 0, 0, 0, 0, 0 }; static cilist io___67 = { 0, 0, 0, 0, 0 }; /* ------------------------------------------------------------------------------ */ /* Program to set up input for RENDER by filling in 5- and 6-member rings */ /* with triangles. */ /* EAM May 1999 - initial version */ /* residue types are hard-wired in DATA statements */ /* planes are not smoothed */ /* ------------------------------------------------------------------------------ */ /* I/O units and environmental control */ /* external iargc */ /* Data arrays */ /* General storage */ /* Known residue types containing one or two rings */ /* Each row contains a residue name (type) in the first entry */ /* followed by up to 9 atom names which define the ring[s]. */ /* A blank name terminates the list for this residue type. */ /* Five-membered rings (e.g. furanose) */ /* connect atoms (1,2,5)(2,3,5)(3,4,5) */ /* => atoms 1 and/or 4 can be out-of-plane, but not 2,3,5 */ /* Six-membered rings (e.g. pyranose) */ /* connect atoms (1,2,6)(2,3,5)(2,5,6)(3,4,5) */ /* => atoms 1 and/or 4 can be out-of-plane, but not 2,3,5,6 */ /* Nine-membered rings are assumed to be a conjugated ring system */ /* To add a new residue type: */ /* increase NTYPES by 1 */ /* add row of atom names to type array */ /* adjust start/end indices of protein/base/sugar flags */ /* optional: add default colour record */ /* Default to solid color */ bflag = FALSE_; pflag = FALSE_; sflag = FALSE_; narg = iargc_(); i__ = 0; L100: ++i__; if (i__ > narg) { goto L199; } getarg_(&i__, options, (ftnlen)64); if (s_cmp(options, "-b", (ftnlen)2, (ftnlen)2) == 0) { bflag = TRUE_; } else if (s_cmp(options, "-p", (ftnlen)2, (ftnlen)2) == 0) { pflag = TRUE_; } else if (s_cmp(options, "-s", (ftnlen)2, (ftnlen)2) == 0) { sflag = TRUE_; } else { goto L101; } goto L100; L101: s_wsfe(&io___15); do_fio(&c__1, "syntax: rings3d [-options] < infile.pdb > outfile.r3d", ( ftnlen)53); e_wsfe(); s_wsfe(&io___16); do_fio(&c__1, " -bases A/C/G/T/U", (ftnlen)27); e_wsfe(); s_wsfe(&io___17); do_fio(&c__1, " -proteinn HIS/PHE/TRP/TYR", (ftnlen)33); e_wsfe(); s_wsfe(&io___18); do_fio(&c__1, " -sugars GAL/GLC/MAN/NAG/NGA/SIA", (ftnlen)41); e_wsfe(); exit_(&c_n1); L199: if (! bflag && ! pflag) { sflag = TRUE_; } s_wsle(&io___19); do_lio(&c__9, &c__1, "Raster3D rings3d program ", (ftnlen)25); do_lio(&c__9, &c__1, "V2.7d ", (ftnlen)8); e_wsle(); /* Read in colours first */ ncol = 0; natm = 0; L200: i__1 = s_rsfe(&io___22); if (i__1 != 0) { goto L250; } i__1 = do_fio(&c__1, card, (ftnlen)80); if (i__1 != 0) { goto L250; } i__1 = e_rsfe(); if (i__1 != 0) { goto L250; } if (s_cmp(card, "COLO", (ftnlen)4, (ftnlen)4) == 0) { ++ncol; if (ncol > 1000) { s_wsle(&io___24); do_lio(&c__9, &c__1, "Colour table overflow. Increase ", (ftnlen) 33); do_lio(&c__9, &c__1, "MAXCOL and recompile.", (ftnlen)21); e_wsle(); s_stop("10", (ftnlen)2); } s_rsfi(&io___25); do_fio(&c__1, mask + (ncol - 1) * 24, (ftnlen)24); for (i__ = 1; i__ <= 3; ++i__) { do_fio(&c__1, (char *)&rgb[i__ + ncol * 3 - 4], (ftnlen)sizeof( real)); } do_fio(&c__1, (char *)&vdw[ncol - 1], (ftnlen)sizeof(real)); e_rsfi(); } else if (s_cmp(card, "ATOM", (ftnlen)4, (ftnlen)4) == 0 || s_cmp(card, "HETA", (ftnlen)4, (ftnlen)4) == 0) { /* Load default colors after any that were read in */ if (natm == 0 && ncol <= 994) { for (i__ = 1; i__ <= 6; ++i__) { ++ncol; ici__1.icierr = 0; ici__1.iciend = 0; ici__1.icirnum = 1; ici__1.icirlen = 60; ici__1.iciunit = defcol + (i__ - 1) * 60; ici__1.icifmt = "(6x,a24,3f8.3,f6.2)"; s_rsfi(&ici__1); do_fio(&c__1, mask + (ncol - 1) * 24, (ftnlen)24); for (j = 1; j <= 3; ++j) { do_fio(&c__1, (char *)&rgb[j + ncol * 3 - 4], (ftnlen) sizeof(real)); } do_fio(&c__1, (char *)&vdw[ncol - 1], (ftnlen)sizeof(real)); e_rsfi(); } } /* Now we read in ATOM record */ ++natm; if (natm > 10000) { s_wsle(&io___30); do_lio(&c__9, &c__1, "Atom array overflow. Increase ", (ftnlen) 31); do_lio(&c__9, &c__1, "MAXATOM and recompile.", (ftnlen)22); e_wsle(); s_stop("20", (ftnlen)2); } s_copy(test, card + 6, (ftnlen)24, (ftnlen)24); i__1 = ncol; for (icol = 1; icol <= i__1; ++icol) { if (match_(test, mask + (icol - 1) * 24, (ftnlen)24, (ftnlen)24)) { color[natm - 1] = icol; s_rsfi(&io___34); do_fio(&c__1, (char *)&resno[natm - 1], (ftnlen)sizeof( integer)); do_fio(&c__1, (char *)&x[natm - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[natm - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[natm - 1], (ftnlen)sizeof(real)); e_rsfi(); s_copy(name__ + (natm - 1 << 2), card + 12, (ftnlen)4, ( ftnlen)4); s_copy(resname + (natm - 1 << 2), card + 16, (ftnlen)4, ( ftnlen)4); *(unsigned char *)&chain[natm - 1] = *(unsigned char *)&card[ 21]; goto L220; } } L220: ; } else if (s_cmp(card, "END", (ftnlen)3, (ftnlen)3) == 0) { goto L250; } goto L200; /* Come here when EOF or 'END' record is reached */ L250: if (natm == 0) { s_wsle(&io___42); do_lio(&c__9, &c__1, "No atoms in input.", (ftnlen)18); e_wsle(); s_stop("30", (ftnlen)2); } else { s_wsle(&io___43); do_lio(&c__9, &c__1, "Input atoms: ", (ftnlen)13); do_lio(&c__3, &c__1, (char *)&natm, (ftnlen)sizeof(integer)); e_wsle(); } /* Here's the real loop. */ nrings = 0; jatm = 0; L300: iatm = jatm + 1; if (iatm >= natm) { goto L399; } i__1 = natm; for (j = iatm; j <= i__1; ++j) { if (resno[j - 1] == resno[iatm - 1] && *(unsigned char *)&chain[j - 1] == *(unsigned char *)&chain[iatm - 1]) { jatm = j; } else { goto L301; } } L301: if (bflag) { i__1 = b_end__; for (n = b_start__; n <= i__1; ++n) { if (s_cmp(resname + ((iatm - 1 << 2) + 1), type__ + ((n * 10 - 10 << 2) + 1), (ftnlen)3, (ftnlen)3) == 0) { goto L310; } } } if (pflag) { i__1 = p_end__; for (n = p_start__; n <= i__1; ++n) { if (s_cmp(resname + ((iatm - 1 << 2) + 1), type__ + ((n * 10 - 10 << 2) + 1), (ftnlen)3, (ftnlen)3) == 0) { goto L310; } } } if (sflag) { i__1 = s_end__; for (n = s_start__; n <= i__1; ++n) { if (s_cmp(resname + ((iatm - 1 << 2) + 1), type__ + ((n * 10 - 10 << 2) + 1), (ftnlen)3, (ftnlen)3) == 0) { goto L310; } } } goto L300; L310: ringsize = 9; for (i__ = 2; i__ <= 10; ++i__) { if (s_cmp(type__ + (i__ + n * 10 - 11 << 2), " ", (ftnlen)4, (ftnlen) 1) == 0) { ringsize = i__ - 2; goto L320; } i__1 = jatm; for (j = iatm; j <= i__1; ++j) { if (s_cmp(type__ + (i__ + n * 10 - 11 << 2), name__ + (j - 1 << 2) , (ftnlen)4, (ftnlen)4) == 0) { ind[i__ - 2] = j; goto L312; } } s_wsle(&io___50); do_lio(&c__9, &c__1, "Cannot find atom ", (ftnlen)17); do_lio(&c__9, &c__1, type__ + (i__ + n * 10 - 11 << 2), (ftnlen)4); do_lio(&c__9, &c__1, " in", (ftnlen)3); do_lio(&c__9, &c__1, type__ + (n * 10 - 10 << 2), (ftnlen)4); do_lio(&c__3, &c__1, (char *)&resno[iatm - 1], (ftnlen)sizeof(integer) ); do_lio(&c__9, &c__1, chain + (iatm - 1), (ftnlen)1); e_wsle(); goto L300; L312: ; } L320: /* Found one */ ++nrings; ++nhits[n - 1]; red = rgb[color[ind[0] - 1] * 3 - 3]; grn = rgb[color[ind[0] - 1] * 3 - 2]; blu = rgb[color[ind[0] - 1] * 3 - 1]; s_wsfe(&io___55); do_fio(&c__1, type__ + (n * 10 - 10 << 2), (ftnlen)4); do_fio(&c__1, (char *)&resno[iatm - 1], (ftnlen)sizeof(integer)); do_fio(&c__1, chain + (iatm - 1), (ftnlen)1); e_wsfe(); /* L322: */ if (ringsize == 5) { s_wsfe(&io___56); do_fio(&c__1, (char *)&x[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___57); do_fio(&c__1, (char *)&x[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___58); do_fio(&c__1, (char *)&x[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); } if (ringsize >= 6) { s_wsfe(&io___59); do_fio(&c__1, (char *)&x[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___60); do_fio(&c__1, (char *)&x[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[0] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___61); do_fio(&c__1, (char *)&x[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[2] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[3] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___62); do_fio(&c__1, (char *)&x[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[1] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); } if (ringsize == 9) { s_wsfe(&io___63); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[6] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[6] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[6] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___64); do_fio(&c__1, (char *)&x[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[8] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[8] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[8] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); s_wsfe(&io___65); do_fio(&c__1, (char *)&x[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[4] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[5] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&x[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&y[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&z__[ind[7] - 1], (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&red, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&grn, (ftnlen)sizeof(real)); do_fio(&c__1, (char *)&blu, (ftnlen)sizeof(real)); e_wsfe(); } goto L300; L399: s_wsle(&io___66); do_lio(&c__9, &c__1, "Filled rings for", (ftnlen)16); do_lio(&c__3, &c__1, (char *)&nrings, (ftnlen)sizeof(integer)); do_lio(&c__9, &c__1, " residues", (ftnlen)9); e_wsle(); for (i__ = 1; i__ <= 21; ++i__) { if (nhits[i__ - 1] > 0) { s_wsle(&io___67); do_lio(&c__9, &c__1, " ", (ftnlen)4); do_lio(&c__9, &c__1, type__ + (i__ * 10 - 10 << 2), (ftnlen)4); do_lio(&c__3, &c__1, (char *)&nhits[i__ - 1], (ftnlen)sizeof( integer)); e_wsle(); } } return 0; } /* MAIN__ */ logical match_(char *subj, char *mask, ftnlen subj_len, ftnlen mask_len) { /* System generated locals */ logical ret_val; /* Local variables */ static integer i__; ret_val = FALSE_; for (i__ = 1; i__ <= 24; ++i__) { if (*(unsigned char *)&subj[i__ - 1] != *(unsigned char *)&mask[i__ - 1] && *(unsigned char *)&mask[i__ - 1] != '#') { return ret_val; } } ret_val = TRUE_; return ret_val; } /* match_ */ /* Main program alias */ int rings3d_ () { MAIN__ (); return 0; }