Code:

void printct(FILE *f, MOLECULE *m)
{
int i, j;
fprintf(f,"N_Atoms:%3i N_Bonds:%3i N_Hydro:%3i N_Charge:%3i\n",
m->N_Atoms, m->N_Bonds, m->N_Hydro, m->Net_Charge);
fprintf(f,"ATOMS:");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f,"%4i", i);
fprintf(f,"\nKIND :");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].Atom_Kind);
fprintf(f,"\nDEG :");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].Degree);
fprintf(f,"\nCHRG :");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].Charge);
fprintf(f,"\nVAL :");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].Valence);
fprintf(f,"\nHYDRO:");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].Hydros+m->Atom[i].Qual_H);
fprintf(f,"\nNAROM:");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f,"%4i", m->Atom[i].N_Aroma);
fprintf(f,"\nNQUAL:");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].N_Qual);
fprintf(f,"\nNATYP:");
for (i = 0; i < m->N_Atoms; i++)
fprintf(f, "%4i", m->Atom[i].N_ATypes);
fprintf(f,"\nNeighbor Info\n");
for (i = 0; i < m->N_Atoms; i++) {
fprintf(f, "Atom:%3i\n--------\nQUAL#:", i);
for (j = 0; j < max(m->Atom[i].N_Qual,m->Atom[i].N_ATypes); j++)
fprintf(f,"%4i", j);
fprintf(f,"\nQUAL :");
for (j = 0; j < m->Atom[i].N_Qual; j++)
fprintf(f,"%4i", m->Atom[i].Qual[j]);
fprintf(f,"\nAQUAL:");
for (j = 0; j < m->Atom[i].N_ATypes; j++)
fprintf(f,"%4i", m->Atom[i].A_List[j]);
fprintf(f, "\nNABOR:");
for (j = 0; j < m->Atom[i].Degree; j++)
fprintf(f,"%4i", j);
fprintf(f,"\nWHO :");
for (j = 0; j < m->Atom[i].Degree; j++)
fprintf(f,"%4i", m->Atom[i].Neighbor[j].Nabor_Num);
fprintf(f, "\nBNDTY:");
for (j = 0; j < m->Atom[i].Degree; j++)
fprintf(f, "%4i", m->Atom[i].Neighbor[j].Bond_Kind);
fprintf(f, "\nBND# :");
for (j = 0; j < m->Atom[i].Degree; j++)
fprintf(f, "%4i", m->Atom[i].Neighbor[j].B_Number);
fprintf(f,"\n");
}
fprintf(f,"\n======================================================\n");
}

I've tried different ways to set up a filename and pass this from pkaden, but