81 tmp = g_malloc0 (i*
sizeof*tmp);
101 if (fread (& i,
sizeof(
int), 1,
fp) != 1)
return NULL;
166 if (this_proj ->
atoms != NULL)
168 g_free (this_proj ->
atoms);
169 this_proj ->
atoms = NULL;
171 this_proj ->
atoms = g_malloc0 (this_proj -> steps*
sizeof*this_proj ->
atoms);
172 for (i=0; i < this_proj -> steps; i++)
174 this_proj ->
atoms[i] = g_malloc0 (this_proj -> natomes*
sizeof*this_proj ->
atoms[i]);
175 for (j=0; j<this_proj -> natomes; j++)
192 chem ->
label = g_malloc0 (spec*
sizeof*chem ->
label);
230 ver = g_malloc0 (i*
sizeof*ver);
233 gboolean labels_in_file = FALSE;
234 gboolean correct_x = TRUE;
237 if (g_strcmp0(ver,
"%\n% project file v-2.6\n%\n") == 0)
239 labels_in_file = TRUE;
241 else if (g_strcmp0(ver,
"%\n% project file v-2.7\n%\n") == 0)
243 labels_in_file = TRUE;
246 else if (g_strcmp0(ver,
"%\n% project file v-2.8\n%\n") == 0)
249 labels_in_file = TRUE;
262 g_debug (
"OPEN_PROJECT: Project name= %s",
active_project -> name);
373 g_debug (
"OPEN_PROJECT:: So far so good ... still");
374 g_debug (
"OPEN_PROJECT:: RUN PROJECT\n");
381 if (! labels_in_file)
391 g_debug (
"\n**********************************************\n curves to read= %d\n**********************************************\n", i);
439 gboolean tmp_bonding;
440 if (fread (& tmp_bonding,
sizeof(gboolean), 1,
fp) != 1)
return ERROR_PROJECT;
457 for (i=0; i<10; i++)
active_project -> coord -> totcoord[i] = tmpcoord[i];
468 if (i !=
OK)
return i;
471 if (i !=
OK)
return i;
473 if (i !=
OK)
return i;
478 if (j !=
OK)
return j;
483 if (j !=
OK)
return j;
Binding to the Fortran90 subroutines.
void prep_spec_(double *, int *, int *)
int alloc_data_(int *, int *, int *)
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
void initcwidgets()
initializing curve values
void apply_project(gboolean showtools)
get project ready for calculation and initialize the OpenGL window
Callback declarations for main window.
void fill_tool_model()
fill the tool window tree model
integer(kind=c_int) function chemistry()
Variable declarations for the curve widget Functions for interactions with the curve widget.
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
void addcurwidgets(int pid, int rid, int st)
add curve widgets to the project
gboolean tmp_adv_bonding[2]
double ** allocddouble(int xal, int yal)
allocate a double ** pointer
int * allocint(int val)
allocate an int * pointer
Global variable declarations Global convenience function declarations Global data structure defin...
#define ATOM_LIMIT
atom number limit to compute fragment(s) and molecule(s) analysis automatically
chemical_data * active_chem
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
Messaging function declarations.
int open_project(FILE *fp, int npi)
open atomes project file
void set_color_map_sensitive(glwin *view)
char * read_string(int i, FILE *fp)
read a string from a file
gchar * read_this_string(FILE *fp)
is there a string to read in this file ? yes do it
void initsh(int s)
initialize the curve widgets for the spherical harmonics
void initang()
initialize the curve widgets for the angle distribution
void initmsd()
initialize the curve widgets for the MSD
void initsq(int r)
initialize the curve widgets for the s(q) / s(k) calculation
void initcnames(int w, int s)
initialize curve namees
chemical_data * alloc_chem_data(int spec)
allocate chemistry data
void initrng()
initialize the curve widgets for the ring statistics
void init_box_calc()
initialize calculation possibilities based the periodicity
void allocatoms(project *this_proj)
allocate project data
void initchn()
initialize the curve widgets for the chains statistics calculation
void initgr(int r)
initialize the curve widgets for the g(r)/g(k)
void initbd()
initialize the curve widgets for the bond distribution
void alloc_proj_data(project *this_proj, int cid)
allocate data
void alloc_curves(int c)
allocating curve data
Preference variable declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
int read_dlp_field_data(FILE *fp, project *this_proj)
read force field data from file
int read_mol(FILE *fp)
read molecule(s) information from file
int read_lmp_field_data(FILE *fp, project *this_proj)
read LAMMPS field data from file
int read_project_curve(FILE *fp, int wid, int pid)
read a project curve from file
int read_opengl_image(FILE *fp, project *this_proj, image *img, int sid)
read OpenGL image properties from file
int update_project()
update project: send data to Fortran90, and update calculation interactors
int read_cpmd_data(FILE *fp, int cid, project *this_proj)
read CPMD data from file
int read_atom_a(FILE *fp, project *this_proj, int s, int a)
read atom properties from file (a)
int read_bonding(FILE *fp)
read bonding information from file
int read_cp2k_data(FILE *fp, int cid, project *this_proj)
read CP2K data from file