atomes 1.1.14
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-2024 by CNRS and University of Strasbourg */
15
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
36#define IODEBUG FALSE
37
38extern int num_bonds (int i);
39extern int num_angles (int i);
40extern int num_dihedrals (int i);
41
42// Read
43extern int read_atom_a (FILE * fp, project * this_proj, int s, int a);
44extern int read_atom_b (FILE * fp, project * this_proj, int s, int a);
45extern int read_opengl_image (FILE * fp, project * this_proj, image * img, int sid);
46extern int read_project_curve (FILE * fp, int wid, int pid);
47extern int read_mol (FILE * fp);
48extern int read_bonding (FILE * fp);
49extern int read_dlp_field_data (FILE * fp, project * this_proj);
50extern int read_lmp_field_data (FILE * fp, project * this_proj);
51extern int read_cpmd_data (FILE * fp, int cid, project * this_proj);
52extern int read_cp2k_data (FILE * fp, int cid, project * this_proj);
53extern gchar * read_this_string (FILE * fp);
54extern void alloc_proj_data (project * this_proj, int cid);
55extern int open_project (FILE * fp, int wid);
56
57// Save
58extern int save_atom_a (FILE * fp, project * this_proj, int s, int a);
59extern int save_opengl_image (FILE * fp, project * this_proj, image * img, int sid);
60extern int save_project_curve (FILE * fp, int wid, project * this_proj, int rid, int cid);
61extern int save_dlp_field_data (FILE * fp, project * this_proj);
62extern int save_lmp_field_data (FILE * fp, project * this_proj);
63extern int save_cpmd_data (FILE * fp, int cid, project * this_proj);
64extern int save_cp2k_data (FILE * fp, int cid, project * this_proj);
65extern int save_this_string (FILE * fp, gchar * string);
66extern int save_mol (FILE * fp, project * this_proj);
67extern int save_bonding (FILE * fp, project * this_proj);
68extern int save_project (FILE * fp, project * this_proj, int wid);
69
70extern G_MODULE_EXPORT void set_color_map (GtkWidget * widg, gpointer data);
71extern int * save_color_map (glwin * view);
72extern void restore_color_map (glwin * view, int * colm);
73extern colormap * allocate_color_map (int pts, project * this_proj);
74extern gboolean setup_custom_color_map (float * data, project * this_proj, gboolean init);
75#ifdef GTK4
76extern G_MODULE_EXPORT gboolean edit_tab (GtkWidget * widget, GdkEvent * event, gpointer fdata);
77#else
78extern G_MODULE_EXPORT gboolean edit_tab (GtkWidget * widget, GdkEventButton * event, gpointer fdata);
79#endif
80extern void init_curves_and_calc (project * this_proj);
81extern void init_project (gboolean alloc_box);
82extern int update_project ();
83extern void clean_view ();
84extern void view_buffer (GtkTextBuffer * buffer);
85extern void update_insert_combos ();
86extern void close_project (project * to_close);
87extern void to_close_this_project (int to_activate, project * this_proj);
88extern void hide_current_project (project * to_hide);
89extern void active_project_changed (int id);
90extern void opengl_project_changed (int id);
91extern G_MODULE_EXPORT void on_close_activate (GtkWidget * widg, gpointer cdata);
92extern void add_project ();
93
94extern void debugiocurve (project * this_proj, gboolean win, int rid, int cid, gchar * iost);
95extern void debugioproj (project * this_proj, gchar * iost);
96#endif
FILE * fp
int save_lmp_field_data(FILE *fp, project *this_proj)
save LAMMPS force field data to file
Definition save_field.c:492
int save_project(FILE *fp, project *this_proj, int wid)
save project to file
Definition save_p.c:84
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:460
void close_project(project *to_close)
close a project
Definition close_p.c:96
gchar * read_this_string(FILE *fp)
is there a string to read in this file ? yes do it
Definition open_p.c:95
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:209
int open_project(FILE *fp, int wid)
open atomes project file
Definition open_p.c:220
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:54
void opengl_project_changed(int id)
change the OpenGL project
Definition update_p.c:245
void add_project()
int save_atom_a(FILE *fp, project *this_proj, int s, int a)
save atom data to file (a)
Definition save_opengl.c:54
void update_insert_combos()
update some GtkComboBox in the workspace if a project is removed
Definition close_p.c:60
void restore_color_map(glwin *view, int *colm)
restore saved color maps
Definition bdcall.c:93
int save_this_string(FILE *fp, gchar *string)
save string to file
Definition save_p.c:49
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:579
int save_project_curve(FILE *fp, int wid, project *this_proj, int rid, int cid)
save project curve to file
Definition save_curve.c:76
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:77
int save_cp2k_data(FILE *fp, int cid, project *this_proj)
save CP2K data to file
Definition save_qm.c:180
int read_atom_b(FILE *fp, project *this_proj, int s, int a)
read atom properties from file (b)
Definition read_opengl.c:77
gboolean setup_custom_color_map(float *data, project *this_proj, gboolean init)
prepare the custom color map data
Definition m_map.c:211
void active_project_changed(int id)
change the active project
Definition update_p.c:175
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:74
void clean_view()
clean the main window
Definition gui.c:159
void to_close_this_project(int to_activate, project *this_proj)
to close this project
Definition close_p.c:309
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:411
int update_project()
update project: send data to Fortran90, and update calculation interactors
Definition update_p.c:94
void view_buffer(GtkTextBuffer *buffer)
set a text buffer in the main window or an image
Definition gui.c:182
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:332
void alloc_proj_data(project *this_proj, int cid)
allocate data
Definition open_p.c:206
int read_cpmd_data(FILE *fp, int cid, project *this_proj)
read CPMD data from file
Definition read_qm.c:133
int read_atom_a(FILE *fp, project *this_proj, int s, int a)
read atom properties from file (a)
Definition read_opengl.c:55
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:216
void init_project(gboolean alloc_box)
initialize a new project
Definition init_p.c:72
Definition glwin.h:875
Definition glwin.h:277
int a
Definition tab-1.c:95
GtkWidget * img
Definition workspace.c:70