atomes 1.1.14
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
dlp_field.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
22/*
23* This header file: 'dlp_field.h'
24*
25* Contains:
26
27 Variable declarations for the creation of the DL_POLY input file(s)
28
29*/
30
31#ifndef DLP_FIELD_H_
32#define DLP_FIELD_H_
33
34#include "global.h"
35
36// See DL_POLY user manual for the meaning
37// of the different parameters, key and values.
38
39#define N_FIELDS 21
40
41extern char * field_acro[N_FIELDS];
42
43#define DL_ENERGY 5
44#define DL_BONDS 11
45#define DL_ANGLES 15
46#define DL_DIHEDRAL 8
47#define DL_INVERS 6
48#define DL_TETH 3
49#define DL_VDW 21
50#define DL_METALS 9
51#define DL_TERSOFFS 2
52#define DL_THREEBODY 6
53#define DL_FOURBODY 3
54#define DL_EXTERNAL 13
55
56#define LA_ENERGY 1
57#define LA_BONDS 16
58#define LA_ANGLES 19
59#define LA_DIHEDRAL 14
60#define LA_INVERS 11
61#define LA_TETH 0
62#define LA_VDW 0
63#define LA_METALS 0
64#define LA_TERSOFFS 0
65#define LA_THREEBODY 0
66#define LA_FOURBODY 0
67#define LA_EXTERNAL 0
68
69#define FTETH max(DL_TETH,LA_TETH)
70#define FBONDS max(DL_BONDS,LA_BONDS)
71#define FANGLES max(DL_ANGLES,LA_ANGLES)
72#define FDIHEDRAL max(DL_DIHEDRAL,LA_DIHEDRAL)
73#define FINVERS max(DL_INVERS,LA_INVERS)
74#define FVDW max(DL_VDW,LA_VDW)
75#define FMETALS max(DL_METALS,LA_METALS)
76#define FTERSOFFS max(DL_TERSOFFS,LA_TERSOFFS)
77#define FTHREEBODY max(DL_THREEBODY,LA_THREEBODY)
78#define FFOURBODY max(DL_FOURBODY,LA_FOURBODY)
79#define FEXTERNAL max(DL_EXTERNAL,LA_EXTERNAL)
80
81#define DL_BONDS_P 4
82#define DL_ANGLES_P 6
83#define DL_DIHEDRAL_P 5
84#define DL_INVERS_P 3
85#define DL_TETH_P 3
86#define DL_VDW_P 7
87#define DL_METALS_P 9
88#define DL_TERSOFFS_P 16
89#define DL_THREEBODY_P 5
90#define DL_FOURBODY_P 3
91#define DL_EXTERNAL_P 6
92
93#define LA_BONDS_P 5
94#define LA_ANGLES_P 6
95#define LA_DIHEDRAL_P 11
96#define LA_INVERS_P 5
97#define LA_TETH_P 0
98#define LA_VDW_P 0
99#define LA_METALS_P 0
100#define LA_TERSOFFS_P 0
101#define LA_THREEBODY_P 0
102#define LA_FOURBODY_P 0
103#define LA_EXTERNAL_P 0
104
105#define FTETH_P max(DL_TETH_P,LA_TETH_P)
106#define FBONDS_P max(DL_BONDS_P,LA_BONDS_P)
107#define FANGLES_P max(DL_ANGLES_P,LA_ANGLES_P)
108#define FDIHEDRAL_P max(DL_DIHEDRAL_P,LA_DIHEDRAL_P)
109#define FINVERS_P max(DL_INVERS_P,LA_INVERS_P)
110#define FVDW_P max(DL_VDW_P,LA_VDW_P)
111#define FMETALS_P max(DL_METALS_P,LA_METALS_P)
112#define FTERSOFFS_P max(DL_TERSOFFS_P,LA_TERSOFFS_P)
113#define FTHREEBODY_P max(DL_THREEBODY_P,LA_THREEBODY_P)
114#define FFOURBODY_P max(DL_FOURBODY_P,LA_FOURBODY_P)
115#define FEXTERNAL_P max(DL_EXTERNAL_P,LA_EXTERNAL_P)
116
117#define MOLIMIT 15
118#define SEXTERN 20
119
120#define AMBER94 0
121#define AMBER96 1
122#define AMBER98 2
123#define AMBER99 3
124#define CHARMM22P 4
125#define CHARMM22M 5
126#define CHARMM35E 6
127#define CHARMM36C 7
128#define CHARMM36G 8
129#define CHARMM36L 9
130#define CHARMM36N 10
131#define CHARMM36P 11
132#define CHARMM36M 12
133#define CHARMMSI 13
134#define CVFF 14
135#define CVFF_AUG 15
136#define CFF91 16
137#define PCFF 17
138#define COMPASS 18
139#define OPLSAAP 19
140#define OPLSAAR 20
141
145 // Total coord + spec
147 // Partial coord + spec
149 OTHER = 3
151
152typedef struct field_prop field_prop;
154{
155 int pid;
156 int fpid;
157 int key;
158 int * aid;
159 float * val;
160 gboolean show;
161 gboolean use;
164};
165
166typedef struct field_atom field_atom;
168{
169 int id;
170 int fid; // Id among force field
171 int afid; // Atoms id among force field atoms
172 // Type is Among dlp_atom_types
173 int type;
174 char * name;
175 int num;
176 int sp;
177 float mass;
178 float charge;
182 // ID of atoms in project file
183 int * list;
184 // ID of atoms for the DL_POLY molecule
185 int * list_id;
188};
189
192{
193 int id;
194 // 0 = select the field atom to CS
195 // 1 = 0= all, 1 = selection
196 int ia[2];
197 float z;
198 float m;
199 float k2;
200 float k4;
206};
207
220
221typedef struct field_pmf field_pmf;
223{
224 int id;
225 float av;
226 float length;
227 int num[2];
228 int * list[2];
229 float * weight[2];
234};
235
247
260
261// See field molecule for details
264{
265 // Struct id (0 = Bonds, 2 = Angles, 4 = dihedrals ...)
266 int st;
267 int id;
268 int num;
269 int * aid; // Field atom id
270 float av;
275};
276
277// Non-bonded interactions follow
278// N body (Vdw, Metal, Tersoff, 3b, 4b)
281{
282 // Body Id 0=Vdw, 1= Metal ...
283 int bd;
284 int id;
285 int * fpid;
286 int * na; // atom a num
287 int ** ma; // atom a mol id's
288 int ** a; // field atom a id's in mol
289 int key;
290 float * val;
295};
296
307
308/* simplified atom data structure */
311{
312 int id; // atom id in molecule/fragment
313 int num; // number of neighbor(s)
314 int * vois; // list of neighbor(s)
317};
318
321{
322 int id;
324 struct molecule * mol;
325 int multi;
328 int atoms;
334 int pmfs;
340 // 0 = bonds
341 // 1 = bonds restraints
342 // 2 = angles
343 // 3 = angles restraints
344 // 4 = diehdrals
345 // 5 = torsional restraints
346 // 6 = impropers
347 // 7 = inversions
348 int nstruct[8];
354};
355
367
368typedef struct field_data field_data;
370{
371 int key;
372 int ** atoms_z;
373 int ** atoms_id;
374 int npar;
375 float ** param;
376 char ** info;
377};
378
379extern GtkWidget * field_assistant;
380extern gchar * celemts[MAXDATC];
381extern GtkWidget * vbox_control (int f);
382
383extern int selected_aspec;
384extern gchar * fkeysw[2][16][21];
385extern gchar * fnames[2][16][21];
386extern int fvalues[2][15][21];
387extern char * fvars_teth[2][FTETH][FTETH_P];
388extern char * fvars_bond[2][FBONDS][FBONDS_P];
389extern char * fvars_angle[2][FANGLES][FANGLES_P];
390extern char * fvars_dihedral[2][FDIHEDRAL][FDIHEDRAL_P];
391extern char * fvars_inversion[2][FINVERS][FINVERS_P];
392extern char * fvars_vdw[2][FVDW][FVDW_P];
393extern char * fvars_met[2][FMETALS][FMETALS_P];
394extern char * fvars_ters[2][FTERSOFFS][FTERSOFFS_P];
395extern char * fvars_tbd[2][FTHREEBODY][FTHREEBODY_P];
396extern char * fvars_fbd[2][FFOURBODY][FFOURBODY_P];
397extern char * fvars_fext[2][FEXTERNAL][FEXTERNAL_P];
398extern float internal_to_other[5];
399
401extern glwin * tmp_view;
402extern coord_info * tmp_coord;
403extern project * tmp_proj;
404extern field_molecule * tmp_fmol;
405extern molecule * tmp_mol;
407extern field_shell * tmp_fshell;
409extern field_pmf * tmp_fpmf;
410extern field_rigid * tmp_frig;
411extern field_tethered * tmp_ftet;
412extern field_prop * tmp_fprop;
413extern field_struct * tmp_fstr;
416extern field_external * tmp_fext;
417
418extern int row_id;
419extern tint toviz;
420extern int field_v[MAXDATA];
421
422extern GtkWidget * mol_box[MOLIMIT-1];
423extern GtkWidget * combo_mol[MOLIMIT-1];
424extern GtkTreeStore * field_model[MAXDATA];
425extern GtkWidget * field_tree[MAXDATA];
426extern GtkWidget * mol_num_label;
427extern GtkTreeIter field_iter;
428
429extern gboolean afp[MAXDATA];
430extern int field_object;
431extern gboolean field_color;
432extern int num_field_objects;
433extern int saved_label_format[2];
434
435extern int struct_id (int f);
436extern int body_at (int b);
437
438// Init field elements
439extern int prepare_field_struct (int ids, int sid, int yes_no_num, int * aid);
440extern int test_for_bonds (field_atom* at, field_atom* bt);
441extern int test_for_angles (field_atom* at,
442 field_atom* bt,
443 field_atom* ct);
444extern int test_for_dihedrals (field_atom* at,
445 field_atom* bt,
446 field_atom* ct,
447 field_atom* dt);
448extern void clean_field_struct_list (field_struct * stru);
449
450// Create force field data structure
451extern void set_mol_num_label ();
452extern G_MODULE_EXPORT void changed_mol_box (GtkComboBox * box, gpointer data);
453extern void update_field_trees ();
454extern GtkWidget * create_combo_mol (int f);
455extern void fill_field_model (GtkTreeStore * store, int f, int m);
456extern GtkWidget * create_field_tree (int f);
458
459// Duplicate field element:
460extern int * duplicate_int (int num, int * old_val);
461extern gboolean * duplicate_bool (int num, gboolean * old_val);
462extern float * duplicate_float (int num, float * old_val);
464extern field_shell * duplicate_field_shell (field_shell * old_shell);
468extern field_prop * duplicate_field_prop (field_prop * old_prop, int ti);
469extern void duplicate_other_prop (int oid, field_struct * old_fstr, field_struct * new_fstr);
471extern field_struct * duplicate_field_struct_list (field_struct * list_str, gboolean init);
475
476// Init field element:
477extern field_atom* init_field_atom (int id, int type, int at, int nat, int coo, int * list);
478extern field_shell * init_field_shell (int id, int ia, int ib);
479extern field_constraint * init_field_constraint (int id, int ia, int ib);
480extern field_pmf * init_field_pmf (int id, int num[2], int * list[2], float * w[2]);
481extern field_rigid * init_field_rigid (int id, int num, int * list);
482extern field_tethered * init_field_tethered (int id, int num);
483extern field_prop * init_field_prop (int ti, int key, gboolean show, gboolean use);
484extern field_struct * init_field_struct (int st, int ai, int an, int * aid);
485extern field_nth_body * init_field_nth_body (int bi, int bd, int * na, int ** ma, int ** ba);
486extern field_external * init_field_external (int bi);
487extern void init_all_field_struct (gboolean init);
488extern int init_vdw (gboolean init);
489extern void setup_field_molecule_neighbors (int i, project * this_proj);
490
491// Get active field element:
492extern int get_position_in_field_atom_from_model_id (int fat, int at);
493extern int get_field_atom_id_from_model_id (field_molecule * fmol, int at);
495extern int get_fragment_atom_id_from_model_id (field_molecule * fmol, int at);
497extern field_nth_body * get_active_body (int a, int b);
499extern field_atom* get_active_atom (int a, int b);
500extern field_shell * get_active_shell (int a, int b);
501extern field_constraint * get_active_constraint (int a, int b);
502extern field_pmf * get_active_pmf (int a, int b);
503extern field_rigid * get_active_rigid (int a, int b);
504extern field_tethered * get_active_tethered (int a, int b);
505extern field_prop * get_active_prop (struct field_prop * pr, int a);
506extern field_prop * get_active_prop_using_atoms (struct field_prop * pr, int ti, int * ids);
507extern field_struct * get_active_struct (int s, int a, int b);
508extern int get_struct_id_from_atom_id (int ids, int * aid);
509
510// Field objects visualization:
511extern int get_field_objects (int id, int jd);
512extern gboolean show_field_object (int id, int jd, int kd);
513extern void visualize_object (int id, int jd, int kd);
514extern G_MODULE_EXPORT void on_toggle_visualize_or_select_object (GtkCellRendererToggle * cell_renderer,
515 gchar * string_path,
516 gpointer data);
517extern G_MODULE_EXPORT void visualize_or_select_all_elements (GtkTreeViewColumn * col, gpointer data);
518
519// Field molecule callbacks
520extern void adjust_field_prop (int fil, int sti, field_prop * tmp, int * ids, int key);
521extern gchar * remove_text (int i, int j, gchar * str);
522extern G_MODULE_EXPORT void select_atom_id_from_fied_molecule (GtkButton * but, gpointer data);
523extern G_MODULE_EXPORT void edit_field_prop (GSimpleAction * action, GVariant * parameter, gpointer data);
524extern G_MODULE_EXPORT void add_field_prop (GSimpleAction * action, GVariant * parameter, gpointer data);
525extern G_MODULE_EXPORT void remove_field_prop (GSimpleAction * action, GVariant * parameter, gpointer data);
526extern G_MODULE_EXPORT void add_molecule_to_field (GSimpleAction * action, GVariant * parameter, gpointer data);
527extern G_MODULE_EXPORT void remove_molecule_from_field (GSimpleAction * action, GVariant * parameter, gpointer data);
528extern G_MODULE_EXPORT void remove_atom_from_field_molecule (GSimpleAction * action, GVariant * parameter, gpointer data);
529
530// OGL utils
531extern distance distance_3d (cell_info * cell, int mdstep, atom * at, atom * bt);
532extern angle angle_3d (cell_info * cell, int mdstep, atom * at, atom * bt, atom * ct);
533extern angle dihedral_3d (cell_info * cell, int mdstep, atom * at, atom * bt, atom * ct, atom * dt);
534extern angle inversion_3d (cell_info * cell, int mdstep, atom * at, atom * bt, atom * ct, atom * dt);
535
536// Print
537extern gchar * parameters_info (int obj, int key, gchar ** words, float * data);
538
539extern void print_dlp_field (GtkTextBuffer * buf);
540extern void print_dlp_config (GtkTextBuffer * buf);
541extern void print_dlp_control (GtkTextBuffer * buf);
542extern void print_dlp_improper_inversion (int di, GtkTextBuffer * buf,
543 field_struct * dh, int fi,
544 GtkTreeStore * store, GtkTreeIter * iter);
545extern void print_dlp_dihedral (int di, GtkTextBuffer * buf,
546 field_struct * dh, int fi,
547 GtkTreeStore * store, GtkTreeIter * iter);
548extern void print_dlp_angle (int ai, GtkTextBuffer * buf,
549 field_struct * an, int fi,
550 GtkTreeStore * store, GtkTreeIter * iter);
551extern void print_dlp_bond (int bi, GtkTextBuffer * buf,
552 field_struct * bd, int fi,
553 GtkTreeStore * store, GtkTreeIter * iter);
554
555extern G_MODULE_EXPORT void setup_this_force_field (int id);
556
559extern float get_force_field_atom_mass (int sp, int num);
560
561extern int ff_unit;
562extern field_data * ff_bonds[3];
563extern field_data * ff_angles[2];
564extern field_data * ff_dih[2];
565extern field_data * ff_imp;
566extern field_data * ff_inv;
567extern field_data * ff_vdw;
568extern int ** extraz_id;
569#endif
ColRGBA col
Definition d_measures.c:77
GtkTreeIter field_iter
Definition dlp_field.c:948
#define FANGLES_P
Definition dlp_field.h:107
field_data * ff_angles[2]
char * fvars_fbd[2][FFOURBODY][FFOURBODY_P]
Definition dlp_field.c:762
#define FBONDS_P
Definition dlp_field.h:106
angle dihedral_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
dihedral between atom a, b, c and d in 3D
Definition ogl_utils.c:204
glwin * tmp_view
Definition dlp_field.c:952
field_constraint * tmp_fcons
Definition dlp_field.c:959
int fvalues[2][15][21]
Definition dlp_field.c:255
#define FFOURBODY
Definition dlp_field.h:78
field_shell * init_field_shell(int id, int ia, int ib)
initialize field core shell interaction
Definition dlp_init.c:394
field_tethered * init_field_tethered(int id, int num)
intialize new field tethered potential
Definition dlp_init.c:510
char * fvars_bond[2][FBONDS][FBONDS_P]
Definition dlp_field.c:306
int field_object
Definition dlp_field.c:979
field_molecule * duplicate_field_molecule(field_molecule *old_fmol)
create copy of a field molecule
Definition dlp_copy.c:436
field_nth_body * tmp_fbody
Definition dlp_field.c:965
void clean_field_struct_list(field_struct *stru)
clean force field structural property(ies)
Definition dlp_init.c:2146
float internal_to_other[5]
Definition dlp_field.c:938
#define FEXTERNAL
Definition dlp_field.h:79
project * tmp_proj
Definition dlp_field.c:953
G_MODULE_EXPORT void remove_atom_from_field_molecule(GSimpleAction *action, GVariant *parameter, gpointer data)
remove atom from field molecule - creating the dialog
Definition dlp_atom.c:731
field_struct * init_field_struct(int st, int ai, int an, int *aid)
initialize field molecule new structural element
Definition dlp_init.c:704
field_shell * tmp_fshell
Definition dlp_field.c:958
int * duplicate_int(int num, int *old_val)
copy a list of int
Definition global.c:572
GtkWidget * mol_box[MOLIMIT-1]
Definition dlp_field.c:943
void print_dlp_bond(int bi, GtkTextBuffer *buf, field_struct *bd, int fi, GtkTreeStore *store, GtkTreeIter *iter)
print / fill tree store with force field bond(s) information
Definition dlp_print.c:774
field_rigid * tmp_frig
Definition dlp_field.c:961
int test_for_angles(field_atom *at, field_atom *bt, field_atom *ct)
search for angle(s) between these field atoms
Definition dlp_init.c:1081
G_MODULE_EXPORT void add_molecule_to_field(GSimpleAction *action, GVariant *parameter, gpointer data)
add molecule to force field - creating the dialog
Definition dlp_mol.c:470
#define FTETH_P
Definition dlp_field.h:105
#define FVDW
Definition dlp_field.h:74
int get_struct_id_from_atom_id(int ids, int *aid)
retrieve field structural element id from a list of atom id
Definition dlp_init.c:559
int body_at(int b)
find the number of atom(s) in a non bonded interaction
Definition dlp_field.c:1022
field_constraint * get_active_constraint(int a, int b)
retrieve constraint property
Definition dlp_active.c:185
#define FINVERS
Definition dlp_field.h:73
float get_force_field_atom_mass(int sp, int num)
get force field atomic mass
int num_field_objects
Definition dlp_field.c:981
field_pmf * tmp_fpmf
Definition dlp_field.c:960
gchar * fnames[2][16][21]
Definition dlp_field.c:218
void set_mol_num_label()
classical force field prepare the molecule information widget
Definition dlp_field.c:1045
G_MODULE_EXPORT void add_field_prop(GSimpleAction *action, GVariant *parameter, gpointer data)
add field property callback
Definition dlp_edit.c:3058
field_data * ff_vdw
field_external * tmp_fext
Definition dlp_field.c:967
field_data * ff_dih[2]
field_atom * tmp_fat
Definition dlp_field.c:957
int row_id
Definition dlp_field.c:982
#define MOLIMIT
Definition dlp_field.h:117
field_prop * duplicate_field_prop(field_prop *old_prop, int ti)
create a copy of a field property
Definition dlp_copy.c:218
field_molecule * get_active_field_molecule(int a)
retrieve field molecule
Definition dlp_active.c:87
GtkTreeStore * field_model[MAXDATA]
Definition dlp_field.c:947
G_MODULE_EXPORT void setup_this_force_field(int id)
setup force field parameters
G_MODULE_EXPORT void changed_mol_box(GtkComboBox *box, gpointer data)
classical force field assistant change the target molecule for the page
Definition dlp_field.c:1770
GtkWidget * mol_num_label
Definition dlp_field.c:974
char * fvars_ters[2][FTERSOFFS][FTERSOFFS_P]
Definition dlp_field.c:726
void print_dlp_improper_inversion(int di, GtkTextBuffer *buf, field_struct *dh, int fi, GtkTreeStore *store, GtkTreeIter *iter)
print / fill tree store with force field improper(s)/inversion(s) information
Definition dlp_print.c:299
void print_dlp_angle(int ai, GtkTextBuffer *buf, field_struct *an, int fi, GtkTreeStore *store, GtkTreeIter *iter)
print / fill tree store with force field angle(s) information
Definition dlp_print.c:649
field_rigid * get_active_rigid(int a, int b)
retrieve rigid property
Definition dlp_active.c:225
classical_field * duplicate_dlpoly_field(classical_field *init_field)
#define FVDW_P
Definition dlp_field.h:110
char * fvars_inversion[2][FINVERS][FINVERS_P]
Definition dlp_field.c:522
field_data * ff_imp
tint toviz
Definition dlp_viz.c:75
#define FDIHEDRAL_P
Definition dlp_field.h:108
field_prop * get_active_prop_using_atoms(struct field_prop *pr, int ti, int *ids)
retrieve field molecule structural property using atoms
Definition dlp_active.c:286
field_prop * init_field_prop(int ti, int key, gboolean show, gboolean use)
initialize new field molecule structural property
Definition dlp_init.c:535
int struct_id(int f)
number of atoms in a structural element
Definition dlp_field.c:999
int get_field_atom_id_from_model_id(field_molecule *fmol, int at)
retrieve field atom id using atom id in model
Definition dlp_init.c:151
gboolean field_color
Definition dlp_field.c:980
#define FFOURBODY_P
Definition dlp_field.h:114
void print_dlp_control(GtkTextBuffer *buf)
print DL-POLY CONTROL file
Definition dlp_print.c:1897
field_struct * get_active_struct(int s, int a, int b)
retrieve field structural property
Definition dlp_active.c:318
void fill_field_model(GtkTreeStore *store, int f, int m)
classical force field fill the tree store
Definition dlp_field.c:1264
void update_field_trees()
classical force field assistant update all tree models
Definition dlp_field.c:1786
char * fvars_dihedral[2][FDIHEDRAL][FDIHEDRAL_P]
Definition dlp_field.c:450
char * fvars_angle[2][FANGLES][FANGLES_P]
Definition dlp_field.c:372
#define FTETH
Definition dlp_field.h:69
#define FMETALS_P
Definition dlp_field.h:111
field_struct * tmp_fstr
Definition dlp_field.c:964
field_shell * get_active_shell(int a, int b)
retrieve shell property
Definition dlp_active.c:165
gchar * parameters_info(int obj, int key, gchar **words, float *data)
prepare classical force field parameter description string
Definition dlp_field.c:1097
angle inversion_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct, atom *dt)
inversion angle between atom a, b, c and d in 3D
Definition ogl_utils.c:240
#define FTERSOFFS_P
Definition dlp_field.h:112
void adjust_field_prop(int fil, int sti, field_prop *tmp, int *ids, int key)
adjust field property
Definition dlp_edit.c:163
field_molecule * tmp_fmol
Definition dlp_field.c:955
G_MODULE_EXPORT void select_atom_id_from_fied_molecule(GtkButton *but, gpointer data)
select atom id from field molecule - creating the dialog
Definition dlp_edit.c:1172
char * field_acro[N_FIELDS]
int test_for_bonds(field_atom *at, field_atom *bt)
search for bond(s) between 2 field atoms
Definition dlp_init.c:948
#define FBONDS
Definition dlp_field.h:70
field_molecule * get_active_field_molecule_from_model_id(project *this_proj, int aid)
retrieve field molecule from overall atom id in the model
Definition dlp_active.c:59
int get_fragment_atom_id_from_model_id(field_molecule *fmol, int at)
retrieve fragment atom id using atom id in model
Definition dlp_init.c:174
field_atom * tmp_fdt
Definition dlp_field.h:406
field_tethered * duplicate_field_tethered(field_tethered *old_tet)
create copy of a field tethered data structure
Definition dlp_copy.c:197
G_MODULE_EXPORT void remove_molecule_from_field(GSimpleAction *action, GVariant *parameter, gpointer data)
remove molecule from force field - creating the dialog
Definition dlp_mol.c:752
G_MODULE_EXPORT void edit_field_prop(GSimpleAction *action, GVariant *parameter, gpointer data)
edit field property callback
Definition dlp_edit.c:2993
field_atom * get_active_atom(int a, int b)
retrieve field atom
Definition dlp_active.c:145
field_prop * tmp_fprop
Definition dlp_field.c:963
#define FEXTERNAL_P
Definition dlp_field.h:115
#define FDIHEDRAL
Definition dlp_field.h:72
field_pmf * init_field_pmf(int id, int num[2], int *list[2], float *w[2])
initialize new field mean force potential
Definition dlp_init.c:445
float * duplicate_float(int num, float *old_val)
copy a list of float
Definition global.c:604
char * fvars_tbd[2][FTHREEBODY][FTHREEBODY_P]
Definition dlp_field.c:736
int test_for_dihedrals(field_atom *at, field_atom *bt, field_atom *ct, field_atom *dt)
search for dihedral(s) between these field atoms
Definition dlp_init.c:1181
void duplicate_other_prop(int oid, field_struct *old_fstr, field_struct *new_fstr)
create copy of a field property 'other' list
Definition dlp_copy.c:269
field_external * get_active_external(int a)
retrieve external field property
Definition dlp_active.c:125
field_object_match * field_objects_id[6]
field_tethered * tmp_ftet
Definition dlp_field.c:962
classical_field * create_force_field_data_structure(int ai)
initialize classical force field
Definition dlp_init.c:2986
gboolean * duplicate_bool(int num, gboolean *old_val)
copy a list of gboolean
Definition global.c:588
field_atom * tmp_fct
Definition dlp_field.h:406
#define FTERSOFFS
Definition dlp_field.h:76
int ** extraz_id
#define FTHREEBODY
Definition dlp_field.h:77
field_nth_body * get_active_body(int a, int b)
retrieve field nth body interaction
Definition dlp_active.c:106
field_pmf * get_active_pmf(int a, int b)
retrieve PMF property
Definition dlp_active.c:205
int get_position_in_field_atom_from_model_id(int fat, int at)
retrieve atom position id in field atom id using atom id in model
Definition dlp_init.c:132
GtkWidget * create_combo_mol(int f)
classical force field create molecule selection combo box
Definition dlp_field.c:2479
GtkWidget * field_assistant
Definition dlp_field.c:940
int prepare_field_struct(int ids, int sid, int yes_no_num, int *aid)
prepare the creation of a field structural element
Definition dlp_init.c:981
void print_dlp_field(GtkTextBuffer *buf)
print DL-POLY classical force field
Definition dlp_print.c:1401
G_MODULE_EXPORT void remove_field_prop(GSimpleAction *action, GVariant *parameter, gpointer data)
remove field property callback
Definition dlp_edit.c:3298
void print_dlp_config(GtkTextBuffer *buf)
print DL-POLY CONFIG file
Definition dlp_print.c:1575
void visualize_object(int id, int jd, int kd)
visualize object and update OpenGL rendering
Definition dlp_viz.c:552
GtkWidget * create_field_tree(int f)
classical force field create the list store selection widgets
Definition dlp_field.c:3544
GtkWidget * field_tree[MAXDATA]
Definition dlp_field.c:945
field_external * init_field_external(int bi)
intialize new field external potential
Definition dlp_init.c:790
field_nth_body * comp_fbody
Definition dlp_comp.c:44
void print_dlp_dihedral(int di, GtkTextBuffer *buf, field_struct *dh, int fi, GtkTreeStore *store, GtkTreeIter *iter)
print / fill tree store with force field dihedral(s) information
Definition dlp_print.c:499
gchar * celemts[MAXDATC]
GtkWidget * vbox_control(int f)
crerate DL-POLY option widgets
char * fvars_vdw[2][FVDW][FVDW_P]
Definition dlp_field.c:602
field_prop * get_active_prop(struct field_prop *pr, int a)
the field molecule structural property id to retrieve
Definition dlp_active.c:265
void setup_field_molecule_neighbors(int i, project *this_proj)
angle angle_3d(cell_info *cell, int mdstep, atom *at, atom *bt, atom *ct)
angle between atom a, b and c in 3D
Definition ogl_utils.c:179
field_object_match * tmp_obj_id
gchar * fkeysw[2][16][21]
Definition dlp_field.c:185
int field_v[MAXDATA]
Definition dlp_field.c:830
gchar * remove_text(int i, int j, gchar *str)
get removal information text
Definition dlp_mol.c:81
field_constraint * init_field_constraint(int id, int ia, int ib)
initialize field bond constraint
Definition dlp_init.c:419
field_constraint * duplicate_field_constraint(field_constraint *old_cons)
create copy of a field constraint data structure
Definition dlp_copy.c:127
field_atom * tmp_fbt
Definition dlp_field.h:406
coord_info * tmp_coord
Definition dlp_field.c:954
field_nth_body * init_field_nth_body(int bi, int bd, int *na, int **ma, int **ba)
intialize new field non bonded interaction
Definition dlp_init.c:740
int selected_aspec
Definition popup.c:179
molecule * tmp_mol
Definition dlp_field.c:956
classical_field * tmp_field
Definition dlp_field.c:951
field_atom * duplicate_field_atom(field_atom *old_fat)
create copy of a field atom data structure
Definition dlp_copy.c:67
G_MODULE_EXPORT void visualize_or_select_all_elements(GtkTreeViewColumn *col, gpointer data)
select all element(s) in the column for visualization
Definition dlp_viz.c:1024
G_MODULE_EXPORT void on_toggle_visualize_or_select_object(GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
on visualize force field object toggle callback
Definition dlp_viz.c:830
field_atom * init_field_atom(int id, int type, int at, int nat, int coo, int *list)
intialize a new type of field atom
Definition dlp_init.c:304
#define FINVERS_P
Definition dlp_field.h:109
field_nth_body * duplicate_field_nth_body(field_nth_body *old_nth_body)
create copy of a field body property
Definition dlp_copy.c:365
gboolean afp[MAXDATA]
#define N_FIELDS
Definition dlp_field.h:39
char * fvars_fext[2][FEXTERNAL][FEXTERNAL_P]
Definition dlp_field.c:776
field_tethered * get_active_tethered(int a, int b)
retrieve tethered property
Definition dlp_active.c:245
field_data * ff_bonds[3]
field_rigid * init_field_rigid(int id, int num, int *list)
initialize new field rigid constraint
Definition dlp_init.c:487
gboolean show_field_object(int id, int jd, int kd)
is the field object visible ?
Definition dlp_viz.c:973
GtkWidget * combo_mol[MOLIMIT-1]
Definition dlp_field.c:944
field_shell * duplicate_field_shell(field_shell *old_shell)
create copy of a field shell data structure
Definition dlp_copy.c:101
field_data * ff_inv
#define FANGLES
Definition dlp_field.h:71
int get_field_objects(int id, int jd)
get the number of this type of field object
Definition dlp_viz.c:367
char * fvars_met[2][FMETALS][FMETALS_P]
Definition dlp_field.c:688
dlp_atom_types
Definition dlp_field.h:143
@ TOTAL_COORD_AND_SPEC
Definition dlp_field.h:146
@ SPEC_ONLY
Definition dlp_field.h:144
@ PARTIAL_COORD_AND_SPEC
Definition dlp_field.h:148
@ OTHER
Definition dlp_field.h:149
char * fvars_teth[2][FTETH][FTETH_P]
Definition dlp_field.c:292
field_struct * duplicate_field_struct(field_struct *old_fstr)
create copy of a field structural element
Definition dlp_copy.c:300
int ff_unit
void init_all_field_struct(gboolean init)
initialize the force field structural properties for a field molecule
Definition dlp_init.c:2170
field_rigid * duplicate_field_rigid(field_rigid *old_rig)
create copy of a field rigid data structure
Definition dlp_copy.c:176
#define FMETALS
Definition dlp_field.h:75
field_struct * duplicate_field_struct_list(field_struct *list_str, gboolean init)
create copy of list of field structural element(s)
Definition dlp_copy.c:325
distance distance_3d(cell_info *cell, int mdstep, atom *at, atom *bt)
distance between atom a and b in 3D
Definition ogl_utils.c:81
int init_vdw(gboolean init)
initialize the VdW section of a classical force field
Definition dlp_init.c:2299
#define FTHREEBODY_P
Definition dlp_field.h:113
int saved_label_format[2]
Definition dlp_field.c:3912
Global variable declarations Global convenience function declarations Global data structure defin...
#define MAXDATC
Number of tabs for the description of the classical calculation.
Definition global.h:657
#define MAXDATA
Number of tabs for the description of the classical force field.
Definition global.h:662
action
Definition glview.h:189
Definition glwin.h:114
Definition global.h:839
Definition global.h:91
gboolean * frozen_id
Definition dlp_field.h:180
float charge
Definition dlp_field.h:178
char * name
Definition dlp_field.h:174
field_atom * next
Definition dlp_field.h:187
float mass
Definition dlp_field.h:177
gboolean show
Definition dlp_field.h:181
int * list
Definition dlp_field.h:183
field_atom * prev
Definition dlp_field.h:186
int * list_id
Definition dlp_field.h:185
field_constraint * prev
Definition dlp_field.h:217
field_constraint * next
Definition dlp_field.h:218
char ** info
Definition dlp_field.h:376
int ** atoms_id
Definition dlp_field.h:373
float ** param
Definition dlp_field.h:375
int ** atoms_z
Definition dlp_field.h:372
gboolean use
Definition dlp_field.h:303
field_external * prev
Definition dlp_field.h:304
field_external * next
Definition dlp_field.h:305
field_atom * first_atom
Definition dlp_field.h:329
struct molecule * mol
Definition dlp_field.h:324
field_molecule * prev
Definition dlp_field.h:353
field_rigid * first_rigid
Definition dlp_field.h:337
field_struct * first_struct[8]
Definition dlp_field.h:349
field_constraint * first_constraint
Definition dlp_field.h:333
field_pmf * first_pmf
Definition dlp_field.h:335
field_shell * first_shell
Definition dlp_field.h:331
gboolean show
Definition dlp_field.h:350
field_molecule * next
Definition dlp_field.h:352
field_tethered * first_tethered
Definition dlp_field.h:339
gboolean show_id
Definition dlp_field.h:351
dint ** atoms_id
Definition dlp_field.h:327
field_neighbor * prev
Definition dlp_field.h:315
field_neighbor * next
Definition dlp_field.h:316
gboolean use
Definition dlp_field.h:292
gboolean show
Definition dlp_field.h:291
field_nth_body * prev
Definition dlp_field.h:293
field_nth_body * next
Definition dlp_field.h:294
field_object_match * next
Definition dlp_field.h:364
field_object_match * prev
Definition dlp_field.h:365
float * weight[2]
Definition dlp_field.h:229
gboolean use
Definition dlp_field.h:231
int num[2]
Definition dlp_field.h:227
float length
Definition dlp_field.h:226
float av
Definition dlp_field.h:225
field_pmf * next
Definition dlp_field.h:233
gboolean show
Definition dlp_field.h:230
int * list[2]
Definition dlp_field.h:228
field_pmf * prev
Definition dlp_field.h:232
field_prop * next
Definition dlp_field.h:162
gboolean use
Definition dlp_field.h:161
float * val
Definition dlp_field.h:159
int * aid
Definition dlp_field.h:158
field_prop * prev
Definition dlp_field.h:163
gboolean show
Definition dlp_field.h:160
field_rigid * next
Definition dlp_field.h:245
gboolean use
Definition dlp_field.h:243
field_rigid * prev
Definition dlp_field.h:244
gboolean show
Definition dlp_field.h:242
int ia[2]
Definition dlp_field.h:196
gboolean use
Definition dlp_field.h:203
gboolean vdw
Definition dlp_field.h:201
field_shell * prev
Definition dlp_field.h:204
gboolean show
Definition dlp_field.h:202
field_shell * next
Definition dlp_field.h:205
field_struct * next
Definition dlp_field.h:274
field_struct * prev
Definition dlp_field.h:273
field_prop * def
Definition dlp_field.h:271
field_prop * other
Definition dlp_field.h:272
field_tethered * prev
Definition dlp_field.h:257
gboolean use
Definition dlp_field.h:256
field_tethered * next
Definition dlp_field.h:258
gboolean show
Definition dlp_field.h:255
Definition glwin.h:875
Definition global.h:98
int b
Definition tab-1.c:95
int a
Definition tab-1.c:95