227 if (
img -> back -> gradient)
237 if (this_proj -> modelgl -> custom_map != NULL)
img -> color_map[0] += 10;
239 if (this_proj -> modelgl -> custom_map != NULL)
241 img -> color_map[0] -= 10;
242 colormap * map = this_proj -> modelgl -> custom_map;
246 if (fwrite (map -> positions,
sizeof(
float), map -> points,
fp) != map -> points)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
248 for (i=0; i<this_proj -> steps; i++)
250 if (fwrite (map -> data[i],
sizeof(
float), this_proj -> natomes,
fp) != this_proj -> natomes)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
260 for (i=0; i<sid*2; i++)
313 for (i=0; i<
img -> l_ghtning.lights; i++)
315 if (fwrite (&
img -> l_ghtning.spot[i] -> type,
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
316 if (fwrite (&
img -> l_ghtning.spot[i] -> fix,
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
317 if (fwrite (&
img -> l_ghtning.spot[i] -> show,
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
340 for (j=0; j<sid; j++)
342 if (fwrite (
img -> spcolor[i][j],
sizeof(
ColRGBA), this_proj -> coord -> ntg[i][j],
fp) != this_proj -> coord -> ntg[i][j])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
347 j = (this_proj -> modelgl -> adv_bonding[i-2] && this_proj -> coord -> totcoord[i]) ? this_proj -> coord -> totcoord[i] : 0;
351 if (fwrite (
img -> spcolor[i][0],
sizeof(
ColRGBA), this_proj -> coord -> totcoord[i],
fp) != this_proj -> coord -> totcoord[i])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
355 if (fwrite (& this_proj -> modelgl -> rings,
sizeof(gboolean), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
356 if (this_proj -> modelgl -> rings)
361 this_proj -> modelgl -> ring_max[i],
362 this_proj -> modelgl -> num_rings[i],
363 this_proj -> modelgl -> show_rpoly[i],
364 this_proj -> modelgl -> all_rings[i]) !=
OK)
372 if (this_proj -> modelgl ->
chains)
375 this_proj -> modelgl -> chain_max,
376 this_proj -> modelgl -> num_chains,
378 this_proj -> modelgl -> all_chains) !=
OK)
384 if (this_proj -> modelgl ->
volumes)
390 if (fwrite (this_proj -> modelgl -> atoms_volume[i],
sizeof(
double), this_proj -> steps,
fp) != this_proj -> steps)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
391 if (fwrite (this_proj -> modelgl -> atoms_ppvolume[i],
sizeof(
double), this_proj -> steps,
fp) != this_proj -> steps)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
392 for (j=0; j<this_proj -> steps; j++)
394 if (fwrite (this_proj -> modelgl -> volume_box[i][j],
sizeof(
double), 9,
fp) != 9)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
400 if (this_proj -> modelgl -> adv_bonding[0])
402 if (fwrite (& this_proj -> coord -> totcoord[2],
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
406 for (k=0; k<this_proj -> steps; k++)
408 for (l=0; l<this_proj -> coord -> totcoord[2]; l++)
410 if (this_proj -> modelgl -> fm_comp_vol[0][i][k][l]) j++;
416 for (k=0; k<this_proj -> steps; k++)
418 for (l=0; l<this_proj -> coord -> totcoord[2]; l++)
420 if (this_proj -> modelgl -> fm_comp_vol[0][i][k][l])
424 if (fwrite (& this_proj -> modelgl -> frag_mol_ppvolume[0][i][k][l],
sizeof(
double), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
425 if (fwrite (this_proj -> modelgl -> frag_box[i][k][l],
sizeof(
double), 9,
fp) != 9)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
429 if (fwrite (
img -> fm_show_vol[0][i],
sizeof(gboolean), this_proj -> coord -> totcoord[2],
fp) != this_proj -> coord -> totcoord[2])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
430 if (fwrite (
img -> fm_vol_col[0][i],
sizeof(
ColRGBA), this_proj -> coord -> totcoord[2],
fp) != this_proj -> coord -> totcoord[2])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
433 if (this_proj -> modelgl -> adv_bonding[1])
435 if (fwrite (& this_proj -> coord -> totcoord[3],
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
439 for (k=0; k<this_proj -> steps; k++)
441 for (l=0; l<this_proj -> coord -> totcoord[3]; l++)
443 if (this_proj -> modelgl -> fm_comp_vol[1][i][k][l]) j++;
449 for (k=0; k<this_proj -> steps; k++)
451 for (l=0; l<this_proj -> coord -> totcoord[3]; l++)
453 if (this_proj -> modelgl -> fm_comp_vol[1][i][k][l])
457 if (fwrite (& this_proj -> modelgl -> frag_mol_ppvolume[1][i][k][l],
sizeof(
double), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
461 if (fwrite (
img -> fm_show_vol[1][i],
sizeof(gboolean), this_proj -> coord -> totcoord[3],
fp) != this_proj -> coord -> totcoord[3])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
462 if (fwrite (
img -> fm_vol_col[1][i],
sizeof(
ColRGBA), this_proj -> coord -> totcoord[3],
fp) != this_proj -> coord -> totcoord[3])
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
484 for (i=0; i<this_proj -> steps; i++)
486 for (j=0; j< this_proj -> natomes; j++)
499 if (fwrite (&
img -> selected[i] -> selected,
sizeof(
int), 1,
fp) != 1)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
500 if (
img -> selected[i] -> selected)
503 for (j=0; j<
img -> selected[i] -> selected; j++)
506 if (at -> next) at = at -> next;
508 if (
img -> selected[i] -> selected >= 2 &&
img -> selected[i] -> selected <= 20)
511 if (fwrite (
img -> selected[i] -> selected_bonds,
sizeof(
int), j,
fp) != j)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
512 if (
img -> selected[i] -> selected >= 3)
515 if (fwrite (
img -> selected[i] -> selected_angles,
sizeof(
int), j,
fp) != j)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);
516 if (
img -> selected[i] -> selected >= 4 &&
img -> selected[i] -> selected <= 10)
519 if (fwrite (
img -> selected[i] -> selected_dihedrals,
sizeof(
int), j,
fp) != j)
return signal_error (__FILE__, __func__, __LINE__,
ERROR_IMAGE);