72 if (fread (& tmp ->
id,
sizeof(
int), 1,
fp) != 1)
return 0;
73 if (fread (& tmp -> md,
sizeof(
int), 1,
fp) != 1)
return 0;
74 if (fread (& tmp -> multiplicity,
sizeof(
int), 1,
fp) != 1)
return 0;
75 if (! tmp -> multiplicity)
return 0;
76 tmp -> fragments =
allocint(tmp -> multiplicity);
77 if (fread (tmp -> fragments,
sizeof(
int), tmp -> multiplicity,
fp) != tmp -> multiplicity)
return 0;
78 if (fread (& tmp -> natoms,
sizeof(
int), 1,
fp) != 1)
return 0;
79 if (fread (& tmp -> nspec,
sizeof(
int), 1,
fp) != 1)
return 0;
95 if (fread (& i,
sizeof(
int), 1,
fp) != 1)
return ERROR_MOL;
100 if (fread (& j,
sizeof(
int), 1,
fp) != 1)
return ERROR_MOL;
112 molecule * tmp = g_malloc0(
sizeof*tmp);
143 GtkWidget * cmenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (
active_glwin -> ogl_coord[0]));
144 gtk_menu_shell_insert (GTK_MENU_SHELL(cmenu),
active_glwin -> ogl_coord[i+1], i+2);
int * allocint(int val)
allocate an int * pointer
Global variable declarations Global convenience function declarations Global data structure defin...
coord_info * active_coord
GtkWidget * destroy_this_widget(GtkWidget *widg)
destroy a GtkWidget
GtkWidget * menu_item_new_with_submenu(gchar *name, gboolean active, GtkWidget *sub_menu)
void init_opengl_coords(int id, int nt, int init)
initialize data to store the coordination data
void init_menu_fragmol_(int *id)
getting fragment(s)/molecule(s) data from Fortran90, and related GTK3 menu elements creation
Function declarations to handle the atomic coordination data.
GMenu * add_menu_coord(glwin *view, int popm, int id)
create a coordination type submenu
Function declarations for reading atomes project file Function declarations for saving atomes proje...
int read_mol(FILE *fp)
read molecule(s) information from file
int read_this_mol(FILE *fp, molecule *tmp)
read molecule data
int read_atom_m(FILE *fp, int s, int a)
read atom fragment and molecule data
void duplicate_molecule(molecule *new_mol, molecule *old_mol)