atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
project.h
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2026 by CNRS and University of Strasbourg */
15
22
23/*
24* This header file: 'project.h'
25*
26* Contains:
27
28 - Function declarations for reading atomes project file
29 - Function declarations for saving atomes project file
30
31*/
32
33#ifndef PROJECT_H_
34#define PROJECT_H_
35
36extern float project_file_version;
37extern gboolean reading_project;
39
40#define IODEBUG FALSE
41
42extern int num_bonds (int i);
43extern int num_angles (int i);
44extern int num_dihedrals (int i);
45
46// Read
47extern int read_atom_a (FILE * fp, project * this_proj, int s, int a);
48extern int read_atom_b (FILE * fp, project * this_proj, int s, int a);
49extern int read_opengl_image (FILE * fp, project * this_proj, image * img, int sid);
50extern int read_project_curve (FILE * fp, int wid, int pid);
51extern int read_mol (FILE * fp);
52extern int read_bonding (FILE * fp);
53extern int read_dlp_field_data (FILE * fp, project * this_proj);
54extern int read_lmp_field_data (FILE * fp, project * this_proj);
55extern int read_cpmd_data (FILE * fp, int cid, project * this_proj);
56extern int read_cp2k_data (FILE * fp, int cid, project * this_proj);
57extern gchar * read_this_string (FILE * fp);
58extern void alloc_proj_data (project * this_proj, int cid);
59extern int open_project (FILE * fp, int wid);
60
61// Save
62extern int save_atom_a (FILE * fp, project * this_proj, int s, int a);
63extern int save_opengl_image (FILE * fp, project * this_proj, image * img, int sid);
64extern int save_project_curve (FILE * fp, project * this_proj, int wid, int rid, int cid);
65extern int save_dlp_field_data (FILE * fp, project * this_proj);
66extern int save_lmp_field_data (FILE * fp, project * this_proj);
67extern int save_cpmd_data (FILE * fp, int cid, project * this_proj);
68extern int save_cp2k_data (FILE * fp, int cid, project * this_proj);
69extern int save_this_string (FILE * fp, gchar * string);
70extern int save_mol (FILE * fp, project * this_proj);
71extern int save_bonding (FILE * fp, project * this_proj);
72extern int save_project (FILE * fp, project * this_proj, int wid);
73
74extern G_MODULE_EXPORT void set_color_map (GtkWidget * widg, gpointer data);
75extern int * save_color_map (glwin * view);
76extern void restore_color_map (glwin * view, int * colm);
77extern colormap * allocate_color_map (int pts, project * this_proj);
78extern gboolean setup_custom_color_map (float * data, project * this_proj, gboolean init);
79#ifdef GTK4
80extern G_MODULE_EXPORT gboolean edit_tab (GtkWidget * widget, GdkEvent * event, gpointer fdata);
81#else
82extern G_MODULE_EXPORT gboolean edit_tab (GtkWidget * widget, GdkEventButton * event, gpointer fdata);
83#endif
84extern void init_curves_and_calc (project * this_proj);
85extern void init_project (gboolean alloc_box);
86extern void update_analysis_availability (project * this_proj);
87extern int update_project ();
88extern void clean_view ();
89extern void view_buffer (GtkTextBuffer * buffer);
90extern void update_insert_combos ();
91extern void close_project (project * to_close);
92extern void to_close_this_project (int to_activate, project * this_proj);
93extern void hide_current_project (project * to_hide);
94extern void active_project_changed (int id);
95extern void opengl_project_changed (int id);
96extern G_MODULE_EXPORT void on_close_activate (GtkWidget * widg, gpointer cdata);
97extern void add_project (GtkTreeStore * store, int i);
98
99extern void debugiocurve (project * this_proj, gboolean win, int rid, int cid, gchar * iost);
100extern void debugioproj (project * this_proj, gchar * iost);
101#endif
atomes_error * project_error
Definition callbacks.c:155
FILE * fp
float project_file_version
Definition open_p.c:74
int save_lmp_field_data(FILE *fp, project *this_proj)
save LAMMPS force field data to file
Definition save_field.c:540
int save_project(FILE *fp, project *this_proj, int wid)
save project to file
Definition save_p.c:153
void hide_current_project(project *to_hide)
int save_bonding(FILE *fp, project *this_proj)
save bonding information to file
Definition save_bond.c:50
int read_dlp_field_data(FILE *fp, project *this_proj)
read force field data from file
Definition read_field.c:496
void close_project(project *to_close)
close a project
Definition close_p.c:260
gchar * read_this_string(FILE *fp)
is there a string to read in this file ? yes do it
Definition open_p.c:109
int num_bonds(int i)
number of distinct pair(s) of atoms in selection
Definition selection.c:183
void debugioproj(project *this_proj, gchar *iost)
debug project info
Definition debugio.c:210
int open_project(FILE *fp, int wid)
open atomes project file
Definition open_p.c:308
void update_analysis_availability(project *this_proj)
update analysis availability for a target projet
Definition update_p.c:121
int read_mol(FILE *fp)
read molecule(s) information from file
Definition read_mol.c:92
void init_curves_and_calc(project *this_proj)
for a project reset analysis, curves, data to not performed
Definition init_p.c:69
void opengl_project_changed(int id)
change the OpenGL project
Definition update_p.c:296
int save_atom_a(FILE *fp, project *this_proj, int s, int a)
save atom data to file (a)
Definition save_opengl.c:57
void update_insert_combos()
update some GtkComboBox in the workspace if a project is removed
Definition close_p.c:65
void restore_color_map(glwin *view, int *colm)
restore saved color maps
Definition bdcall.c:98
int save_this_string(FILE *fp, gchar *string)
save string to file
Definition save_p.c:50
G_MODULE_EXPORT gboolean edit_tab(GtkWidget *widget, GdkEventButton *event, gpointer fdata)
int num_dihedrals(int i)
number of distinct quadruplet(s) of atoms in selection
Definition selection.c:207
int read_lmp_field_data(FILE *fp, project *this_proj)
read LAMMPS field data from file
Definition read_field.c:627
int save_opengl_image(FILE *fp, project *this_proj, image *img, int sid)
save OpenGL image properties to file
int * save_color_map(glwin *view)
save atoms and polyhedra color maps
Definition bdcall.c:82
int save_cp2k_data(FILE *fp, int cid, project *this_proj)
save CP2K data to file
Definition save_qm.c:189
int read_atom_b(FILE *fp, project *this_proj, int s, int a)
read atom properties from file (b)
Definition read_opengl.c:84
gboolean setup_custom_color_map(float *data, project *this_proj, gboolean init)
prepare the custom color map data
Definition m_map.c:211
int save_project_curve(FILE *fp, project *this_proj, int wid, int rid, int cid)
save project curve to file
Definition save_curve.c:75
void active_project_changed(int id)
change the active project
Definition update_p.c:220
void debugiocurve(project *this_proj, gboolean win, int rid, int cid, gchar *iost)
debug and print some info about the curves in a project
Definition debugio.c:54
int read_project_curve(FILE *fp, int wid, int pid)
read a project curve from file
Definition read_curve.c:77
void clean_view()
clean the main window
Definition gui.c:288
void to_close_this_project(int to_activate, project *this_proj)
to close this project
Definition close_p.c:479
gboolean reading_project
Definition read_curve.c:43
int read_opengl_image(FILE *fp, project *this_proj, image *img, int sid)
read OpenGL image properties from file
int num_angles(int i)
number of distinct triplet(s) of atoms in selection
Definition selection.c:195
int save_mol(FILE *fp, project *this_proj)
save molecule information to file
Definition save_mol.c:106
int save_dlp_field_data(FILE *fp, project *this_proj)
save force field data to file
Definition save_field.c:447
int update_project()
update project: send data to Fortran90, and update calculation interactors
Definition update_p.c:162
void view_buffer(GtkTextBuffer *buffer)
set a text buffer in the main window or an image
Definition gui.c:311
int save_cpmd_data(FILE *fp, int cid, project *this_proj)
save CPMD data to file
Definition save_qm.c:109
G_MODULE_EXPORT void on_close_activate(GtkWidget *widg, gpointer cdata)
signal to close a project
Definition close_p.c:503
void alloc_proj_data(project *this_proj, int cid)
allocate data
Definition open_p.c:224
int read_cpmd_data(FILE *fp, int cid, project *this_proj)
read CPMD data from file
Definition read_qm.c:133
void add_project(GtkTreeStore *store, int i)
add project to the GtkTreeStore of the workspace
Definition workspace.c:104
int read_atom_a(FILE *fp, project *this_proj, int s, int a)
read atom properties from file (a)
Definition read_opengl.c:62
G_MODULE_EXPORT void set_color_map(GtkWidget *widg, gpointer data)
set color map callback
Definition m_map.c:1011
colormap * allocate_color_map(int pts, project *this_proj)
allocate custom color map data
Definition m_map.c:188
int read_bonding(FILE *fp)
read bonding information from file
Definition read_bond.c:52
int read_cp2k_data(FILE *fp, int cid, project *this_proj)
read CP2K data from file
Definition read_qm.c:225
void init_project(gboolean alloc_box)
initialize a new project
Definition init_p.c:273
Definition glwin.h:967
Definition glwin.h:364
GtkWidget * img
Definition workspace.c:70