83 for (i=0; i<
object ->
atoms-1; i++)
85 at = vec3 (
object -> at_list[i].
x,
object -> at_list[i].
y,
object -> at_list[i].
z);
86 for (j=i+1; j<
object ->
atoms; j++)
88 bt = vec3 (
object -> at_list[j].
x,
object -> at_list[j].
y,
object -> at_list[j].
z);
89 dist = v3_sub(at, bt);
90 dmax =
max (dmax, v3_length(
dist));
107 if (
object -> baryc) g_free(
object -> baryc);
109 for (i=0; i<
object ->
atoms; i++)
111 object -> baryc[0] +=
object -> at_list[i].x;
112 object -> baryc[1] +=
object -> at_list[i].y;
113 object -> baryc[2] +=
object -> at_list[i].z;
115 for (i=0; i<3; i++)
object -> baryc[i] /=
object ->
atoms;
118 for (i=0; i<
object ->
atoms; i++)
120 object -> at_list[i].x -=
object -> baryc[0];
121 object -> at_list[i].y -=
object -> baryc[1];
122 object -> at_list[i].z -=
object -> baryc[2];
145 for (i=0; i<at -> numv; i++)
149 if (
dist.pbc && ! checked_at[j])
151 object -> at_list[j].x = at ->
x -
dist.
x;
152 object -> at_list[j].y = at ->
y -
dist.
y;
153 object -> at_list[j].z = at ->
z -
dist.
z;
156 checked_at[aid] = TRUE;
158 for (j=0; j<
object ->
atoms; j++)
if (checked_at[j]) i ++;
159 if (i == target)
return TRUE;
160 for (i=0; i<at -> numv; i++)
183 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
184 int ** old_bid = NULL;
185 old_bid =
allocdint (this_proj -> modelgl ->
bonds[o_step][0], 2);
186 for (i=0; i<this_proj -> modelgl ->
bonds[o_step][0]; i++)
188 for (j=0; j<2; j++) old_bid[i][j] = this_proj -> modelgl -> bondid[o_step][0][i][j];
190 g_free (this_proj -> modelgl -> bondid[o_step][0]);
191 this_proj -> modelgl -> bondid[o_step][0] =
allocdint (this_proj -> modelgl ->
bonds[o_step][0]+ ifcl, 2);
192 for (i=0; i<this_proj -> modelgl ->
bonds[o_step][0]; i++)
194 for (j=0; j<2; j++) this_proj -> modelgl -> bondid[o_step][0][i][j] = old_bid[i][j];
196 if (old_bid) g_free (old_bid);
199 for (i=0; i<ifcl; i++)
202 k = this_proj -> modelgl ->
bonds[o_step][0];
205 this_proj -> modelgl -> bondid[o_step][0][k][l] = this_proj -> modelgl -> bondid[o_step][1][j][l];
207 this_proj -> modelgl ->
bonds[o_step][0] ++;
208 this_proj -> modelgl -> allbonds[0] ++;
209 this_proj -> modelgl -> bondid[o_step][1][j][0] = -1;
213 i = this_proj -> modelgl ->
bonds[o_step][1] - ifcl;
217 old_clo = g_malloc0 (i*
sizeof*old_clo);
219 for (i=0; i<this_proj -> modelgl ->
bonds[o_step][1]; i++)
221 if (this_proj -> modelgl -> bondid[o_step][1][i][0] > -1)
223 for (k=0; k<2; k++) old_bid[l][k] = this_proj -> modelgl -> bondid[o_step][1][i][k];
224 old_clo[l].x = this_proj -> modelgl -> clones[o_step][i].x;
225 old_clo[l].y = this_proj -> modelgl -> clones[o_step][i].y;
226 old_clo[l].z = this_proj -> modelgl -> clones[o_step][i].z;
231 g_free (this_proj -> modelgl -> bondid[o_step][1]);
232 this_proj -> modelgl -> bondid[o_step][1] = NULL;
233 g_free (this_proj -> modelgl -> clones[o_step]);
234 this_proj -> modelgl -> clones[o_step] = NULL;
235 this_proj -> modelgl ->
bonds[o_step][1] = this_proj -> modelgl -> allbonds[1] = l;
238 this_proj -> modelgl -> bondid[o_step][1] =
allocdint (l, 2);
239 this_proj -> modelgl -> clones[o_step] = g_malloc0 (l*
sizeof*this_proj -> modelgl -> clones[o_step]);
242 for (j=0; j<2; j++) this_proj -> modelgl -> bondid[o_step][1][i][j] = old_bid[i][j];
243 this_proj -> modelgl -> clones[o_step][i].x = old_clo[i].
x;
244 this_proj -> modelgl -> clones[o_step][i].y = old_clo[i].
y;
245 this_proj -> modelgl -> clones[o_step][i].z = old_clo[i].
z;
247 if (old_clo) g_free (old_clo);
249 if (old_bid) g_free (old_bid);
266 if (this_proj -> coord -> totcoord[2])
268 int * tmp_multi =
allocint (this_proj -> coord -> totcoord[2]);
269 for (i=0; i<this_object ->
atoms; i++)
271 j = this_object -> at_list[i].
coord[2];
275 h = (this_proj -> cell.npt) ? this_proj -> modelgl -> anim -> last ->
img ->
step : 0;
276 for (i=0; i<this_proj -> coord -> totcoord[2]; i++)
281 for (j=0; j<this_object ->
atoms; j++)
283 checked_at[j] = FALSE;
284 if (this_object -> at_list[j].coord[2] == i)
289 for (j=0; j<this_object ->
atoms; j++)
291 if (this_object -> at_list[j].coord[2] == i)
304 for (i=0; i<this_object ->
atoms; i++)
306 j = this_object -> at_list[i].
id;
307 this_proj ->
atoms[0][j].x = this_object -> at_list[i].x + this_object -> baryc[0];
308 this_proj ->
atoms[0][j].y = this_object -> at_list[i].y + this_object -> baryc[1];
309 this_proj ->
atoms[0][j].z = this_object -> at_list[i].z + this_object -> baryc[2];
310 this_proj ->
atoms[0][j].cloned = FALSE;
312 for (i=0; i<3; i++) this_proj -> modelgl -> saved_coord[i] =
save_coordinates (this_proj, i);
327 if (this_object -> ifcl)
332 this_object -> ifcl = 0;
333 g_free (this_object -> bcid);
334 this_object -> bcid = NULL;
358 pos.
a = pos.
b = pos.
c = 0;
360 int p = view -> nth_copy;
366 pos.
a = p - pos.
c*9 - pos.
b*3;
384 new_obj -> origin = old_obj -> origin;
385 new_obj -> type = old_obj -> type;
386 new_obj -> dim = old_obj -> dim;
387 new_obj -> name = g_strdup_printf (
"%s", old_obj -> name);
389 new_obj -> at_list = g_malloc0 (new_obj ->
atoms*
sizeof*new_obj -> at_list);
391 for (i=0; i<new_obj ->
atoms; i++)
393 new_obj -> at_list[i] = *
duplicate_atom (& old_obj -> at_list[i]);
395 new_obj -> old_z =
duplicate_int (old_obj -> species, old_obj -> old_z);
399 new_obj -> occ = old_obj -> occ;
400 new_obj -> species = old_obj -> species;
401 if (old_obj ->
bonds)
403 new_obj -> ibonds = g_malloc0 (old_obj ->
bonds*
sizeof*new_obj -> ibonds);
405 for (i=0; i<old_obj ->
bonds; i++)
407 new_obj -> ibonds[i] =
duplicate_int (2, old_obj -> ibonds[i]);
426 i = other_proj -> natomes;
429 lib_object -> name = g_strdup_printf (
"%s", other_proj -> name);
442 if (other_proj -> modelgl ->
bonds[0][0])
444 i = other_proj -> modelgl ->
bonds[0][0];
448 lib_object -> ibonds[j][0] = other_proj -> modelgl -> bondid[0][0][j][0];
449 lib_object -> ibonds[j][1] = other_proj -> modelgl -> bondid[0][0][j][1];
469 for (i=0; i<
object ->
bonds; i++)
471 if (
object -> ibonds[i][0] == aid &&
object -> ibonds[i][1] == bid)
return 1;
472 if (
object -> ibonds[i][1] == aid &&
object -> ibonds[i][0] == bid)
return 1;
492 for (i=0; i<
object ->
atoms; i++)
494 if (
object -> at_list[i].numv)
496 tmpv =
duplicate_int (
object -> at_list[i].numv,
object -> at_list[i].vois);
497 g_free (
object -> at_list[i].vois);
498 object -> at_list[i].vois = NULL;
500 for (k=0; k<
object -> at_list[i].numv; k++)
510 object -> at_list[i].vois =
allocint (j);
512 for (k=0; k<
object -> at_list[i].numv; k++)
519 object -> at_list[i].vois[j] = new_id[l]-1;
525 object -> at_list[i].numv = j;
544 int h, i, j, k, l, m;
549 h = (movtion) ? 2 : 1;
559 for (k=0; k<
proj -> modelgl ->
bonds[o_step][j]; k++)
561 l =
proj -> modelgl -> bondid[o_step][j][k][0];
562 m =
proj -> modelgl -> bondid[o_step][j][k][1];
566 if (new_id[l] && new_id[m]) doit = TRUE;
576 tmpibonds[i][0] = new_id[l] - 1;
577 tmpibonds[i][1] = new_id[m] - 1;
587 object -> bcid[
object -> ifcl] = k;
598 object -> ibonds[j][0] = tmpibonds[j][0];
599 object -> ibonds[j][1] = tmpibonds[j][1];
622 int o_step,
int numa,
int * old_id, gboolean check_bonding,
atom_search * remove)
625 this_object ->
atoms = numa;
626 this_object -> at_list = g_malloc0 (this_object ->
atoms*
sizeof*this_object -> at_list);
627 int * new_id =
allocint (this_proj -> natomes);
628 for (i=0; i<this_object ->
atoms; i++)
632 if (remove) remove -> todo[j] = 1;
636 this_object -> at_list[i].
prev = & this_object -> at_list[i-1];
637 this_object -> at_list[i-1].
next = & this_object -> at_list[i];
640 gboolean movtion = ((
object_motion && this_proj -> modelgl -> rebuild[0][0]) || (!
object_motion && this_proj -> modelgl -> rebuild[1][0]));
667 for (i=0; i<species; i++)
669 new_z[i] = (int)old_z[i];
686 atomic_object * this_object = g_malloc0 (
sizeof*this_object);
687 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
688 this_object -> name = g_strdup_printf (
"%s", this_proj ->
chemistry ->
label[sid]);
691 this_object -> origin = this_proj -> id;
692 this_object ->
atoms = i;
693 this_object -> at_list = g_malloc0 (this_object ->
atoms*
sizeof*this_object -> at_list);
694 this_object -> occ = 1.0;
696 this_object -> species = this_proj -> nspec;
699 new_id =
allocint (this_proj -> natomes);
700 gboolean check_bonding = FALSE;
703 for (j=0; j<this_proj -> natomes; j++)
705 if (this_proj ->
atoms[o_step][j].sp == sid)
712 check_bonding = (i != this_proj -> natomes &&
bonding) ? TRUE : FALSE;
713 add_object_atoms (this_object, this_proj, o_step, i, new_id, check_bonding, remove);
727 atomic_object * this_object = g_malloc0 (
sizeof*this_object);
728 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
729 this_object -> name = g_strdup_printf (
"From selection");
731 for (j=0; j<this_proj->
natomes; j++)
736 this_object -> origin = this_proj -> id;
737 this_object ->
atoms = i;
738 this_object -> at_list = g_malloc0 (this_object ->
atoms*
sizeof*this_object -> at_list);
739 this_object -> occ = 1.0;
741 this_object -> species = this_proj -> nspec;
745 new_id =
allocint(this_proj -> natomes);
746 gboolean check_bonding = FALSE;
748 for (j=0; j<this_proj -> natomes; j++)
757 check_bonding = (i != this_proj -> natomes &&
bonding) ? TRUE : FALSE;
758 add_object_atoms (this_object, this_proj, o_step, i, new_id, check_bonding, NULL);
780 atomic_object * this_object = g_malloc0 (
sizeof*this_object);
782 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
783 i = this_proj ->
atoms[o_step][aid].numv;
784 k = this_proj ->
atoms[o_step][aid].
coord[coord];
785 j = this_proj ->
atoms[o_step][aid].sp;
791 str = g_strdup_printf (
"%d-fold", i);
795 str = g_strdup_printf (
"Isolated");
799 str = g_strdup_printf (
"%s",
env_name(this_proj, k, j, 1, NULL));
802 this_object -> name = g_strdup_printf (
"%s - %s<sub>%d</sub>", str, this_proj ->
chemistry ->
label[j], aid+1);
804 this_object -> type = - (coord + 3);
805 this_object -> origin = this_proj -> id;
806 this_object ->
atoms = i+1;
807 this_object -> at_list = g_malloc0 (this_object ->
atoms*
sizeof*this_object -> at_list);
808 this_object -> occ = 1.0;
810 this_object -> species = this_proj -> nspec;
814 gboolean movtion = (
object_motion && this_proj -> modelgl -> rebuild[0][0]) || (!
object_motion && this_proj -> modelgl -> rebuild[1][0]);
815 if (this_proj ->
atoms[o_step][aid].numv)
818 new_id =
allocint (this_proj -> natomes);
820 for (i=0; i<this_proj ->
atoms[o_step][aid].numv; i++)
822 j = this_proj ->
atoms[o_step][aid].vois[i];
850 int i, j, k, l, m, n;
851 atomic_object * this_object = g_malloc0 (
sizeof*this_object);
852 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
854 this_object -> species = this_proj -> nspec;
856 this_object -> type = - (coord + 3);
857 this_object -> origin = this_proj -> id;
858 this_object -> occ = 1.0;
860 new_id =
allocint(this_proj -> natomes);
862 gboolean check_bonding = FALSE;
867 for (k=0; k<this_proj -> natomes; k++)
869 if (this_proj ->
atoms[o_step][k].coord[0] == aid)
871 i = this_proj ->
atoms[o_step][k].numv;
878 str = g_strdup_printf (
"%d-fold", i);
882 str = g_strdup_printf (
"Isolated");
885 for (k=0; k<this_proj -> natomes; k++)
887 if (this_proj ->
atoms[o_step][k].numv == aid)
896 for (k=0; k<this_proj -> natomes; k++)
898 l = this_proj ->
atoms[o_step][k].sp;
899 m = this_proj ->
atoms[o_step][k].
coord[coord-1];
900 for (n=0; n<l; n++) m += this_proj -> coord -> ntg[1][n];
908 str = g_strdup_printf (
"%s",
env_name(this_proj, l, aid, 1, NULL));
911 this_object -> name = g_strdup_printf (
"All %s - atom(s)", str);
913 check_bonding = (j != this_proj -> natomes &&
bonding) ? TRUE : FALSE;
914 add_object_atoms (this_object, this_proj, o_step, j, new_id, check_bonding, remove);
931 atomic_object * this_object = g_malloc0 (
sizeof*this_object);
934 this_object -> name = g_strdup_printf (
"Fragment N°%d", geo+1);
938 this_object -> name = g_strdup_printf (
"Molecule N°%d", geo+1);
940 int o_step = this_proj -> modelgl -> anim -> last ->
img ->
step;
941 this_object -> type = - (coord + 3);
942 this_object -> origin = this_proj -> id;
943 this_object -> occ = 1.0;
945 this_object -> species = this_proj -> nspec;
948 new_id =
allocint(this_proj -> natomes);
949 gboolean check_bonding = FALSE;
952 for (j=0; j<this_proj->
natomes; j++)
954 if (this_proj ->
atoms[o_step][j].coord[coord] == geo)
961 check_bonding = (i != this_proj -> natomes &&
bonding) ? TRUE : FALSE;
962 add_object_atoms (this_object, this_proj, o_step, i, new_id, check_bonding, remove);
976 int * corf =
allocint (
object -> coord -> totcoord[2]);
977 int * rorf =
allocint (
object -> coord -> totcoord[2]);
978 for (i=0; i<
object ->
atoms; i++)
980 j =
object -> at_list[i].coord[2];
984 for (i=0; i<
object -> coord -> totcoord[2]; i++)
996 object -> coord -> totcoord[2] = j;
998 for (i=0; i<
object ->
atoms; i++)
1000 j = corf[
object -> at_list[i].coord[2]];
1001 object -> at_list[i].coord[2] -= j;
1002 object -> at_list[i].id = i;
1021 int o_step = other_proj -> modelgl -> anim -> last ->
img ->
step;
1022 switch (this_proj -> modelgl -> other_status)
1025 i = other_proj -> natomes - other_proj -> modelgl -> anim -> last ->
img -> selected[0] -> selected;
1029 i = other_proj -> modelgl -> anim -> last ->
img -> selected[0] -> selected;
1033 i = other_proj -> natomes;
1045 int * new_id = NULL;
1046 gboolean check_bonding = FALSE;
1047 new_id =
allocint (other_proj -> natomes);
1048 if (this_proj -> modelgl -> other_status == 2)
1064 for (j=0; j<other_proj -> natomes; j++)
1066 if (other_proj ->
atoms[o_step][j].
pick[0] == this_proj -> modelgl -> other_status)
1079 check_bonding = (i != other_proj -> natomes && (other_proj -> modelgl ->
bonds[o_step][0] || other_proj -> modelgl ->
bonds[o_step][1])) ? TRUE : FALSE;
1081 if (i < other_proj -> natomes)
1106 switch (asearch ->
action)
1109 object = (this_proj -> modelgl) ? this_proj -> modelgl -> atom_win -> to_be_inserted[act] :
cif_object;
1112 object = this_proj -> modelgl -> atom_win -> to_be_moved[act];
1117 if ((
object -> origin > -1 ||
object -> origin < -2) &&
object -> origin == orig)
1119 if (
object -> ibonds) g_free (
object -> ibonds);
1120 if (
object -> baryc) g_free (
object -> baryc);
1121 if (
object -> at_list) g_free (
object -> at_list);
1122 if (
object -> coord) g_free (
object -> coord);
1124 asearch -> in_selection --;
1125 if (
object -> prev != NULL)
1127 if (
object -> next != NULL)
1129 object -> next -> prev =
object -> prev;
1130 object -> prev -> next =
object -> next;
1131 tmp_object =
object -> next;
1133 object = tmp_object;
1137 object =
object -> prev;
1138 g_free (
object -> next);
1139 object -> next = NULL;
1145 if (
object -> next != NULL)
1147 object =
object -> next;
1148 if (this_proj -> modelgl)
1150 g_free (this_proj -> modelgl -> atom_win -> to_be_inserted[act]);
1156 object -> prev = NULL;
1157 switch (asearch ->
action)
1160 if (this_proj -> modelgl)
1162 this_proj -> modelgl -> atom_win -> to_be_inserted[act] = object;
1170 this_proj -> modelgl -> atom_win -> to_be_moved[act] = object;
1177 switch (asearch ->
action)
1180 if (this_proj -> modelgl)
1182 object = this_proj -> modelgl -> atom_win -> to_be_inserted[act] = NULL;
1190 object = this_proj -> modelgl -> atom_win -> to_be_moved[act] = NULL;
1198 object =
object -> next;
1220 if (asearch -> pointer[0].
c == 3)
1224 else if (asearch -> pointer[0].
c == 5)
1230 act = asearch -> pointer[0].c - 5;
1232 if (! this_proj -> modelgl || ((! act || act == 3) && this_proj -> modelgl -> atom_win -> to_be_inserted[act]))
1241 vec3_t coor_ins = vec3 (0.0,0.0,0.0);
1246 if (this_proj -> modelgl)
1248 if (this_proj -> modelgl -> anim && ! this_proj -> modelgl ->
builder_win)
1251 coor_ins = this_proj -> modelgl -> insert_coords;
1257 if (orig < -2 && asearch ->
object && ! asearch -> mode)
1272 coor_ins = vec3 (tmp_object -> baryc[0], tmp_object -> baryc[1], tmp_object -> baryc[2]);
1273 if (tmp_object) g_free (tmp_object);
1277 coor_ins = vec3 (this_proj ->
atoms[0][orig].
x, this_proj ->
atoms[0][orig].
y, this_proj ->
atoms[0][orig].
z);
1286 lib_object -> old_z[0] = (stat < 119) ? stat : 0.0;
1306 lib_object -> name = g_strdup_printf (
"Empty position");
1314 if (this_proj -> modelgl)
1317 if (this_proj -> modelgl -> atom_win -> to_be_inserted[act] == NULL)
1320 object = this_proj -> modelgl -> atom_win -> to_be_inserted[act];
1324 object = this_proj -> modelgl -> atom_win -> to_be_inserted[act];
1325 while (
object -> next)
object =
object -> next;
1327 object -> next -> prev = object;
1328 object =
object -> next;
1333 ulam.
a = ulam.
b = ulam.
c = 0.0;
1342 while (
object -> next)
object =
object -> next;
1344 object -> next -> prev = object;
1345 object =
object -> next;
1350 object ->
id = (
object -> prev) ?
object -> prev ->
id + 1 : 0;
1354 object ->
id = (orig > -1) ? orig : (orig < -2) ? abs(orig) - 3 : abs(orig) - 1;
1356 object -> origin = orig;
1358 for (i=0; i<
object ->
atoms; i++)
1360 object -> at_list[i].x += coor_ins.
x +
object -> dim*ulam.
a;
1361 object -> at_list[i].y += coor_ins.
y +
object -> dim*ulam.
b;
1362 object -> at_list[i].z += coor_ins.
z +
object -> dim*ulam.
c;
1364 asearch -> in_selection ++;
1369 if (act == 1 || act == 2)
1371 if (
object ->
id > 0)
1374 g_free (asearch -> todo);
1377 for (i=0; i<
object -> id; i++)
1379 asearch -> todo[i] = atid[i];
1381 asearch -> todo[i] = 0;
coord_info * duplicate_coord_info(coord_info *old_coord)
duplicate coordination information data structure
Function declarations for the mode edition window.
double ** save_coordinates(project *this_proj, int status)
save atomic coordinates
atom_search * remove_search
void update_search_tree(atom_search *asearch)
update search tree
int get_asearch_filter(atom_search *asearch)
get asearch filter
gboolean * remove_bonds_from_project(project *this_proj, atomic_object *this_object, int *old_id, atom *new_list, gboolean remove, gboolean passivate)
remove bond(s) from project
void check_coord_modification(project *this_proj, int old_id[], atom *new_list, atomic_object *this_object, gboolean movtion, gboolean passivating)
void allocate_todo(atom_search *asearch, int tsize)
allocate the selection list data buffer
atomic_object * create_object_from_selection(project *this_proj)
create object from atom selection
int in_object_bond_list(atomic_object *object, int aid, int bid)
is there a bond between atom aid and atom bid ?
atomic_object * lib_object
atomic_object * create_object_from_frag_mol(project *this_proj, int coord, int geo, atom_search *remove)
create object from a fragment or a molecule
atomic_object * create_object_from_species(project *this_proj, int sid, atom_search *remove)
create object from all atom(s) of the same chemical species
void clean_object_vois(project *this_proj, atomic_object *object, int *new_id, gboolean movtion)
clean the object neigbours list
void add_object_atoms(atomic_object *this_object, project *this_proj, int o_step, int numa, int *old_id, gboolean check_bonding, atom_search *remove)
add atom list to insert object
void correct_pos_and_get_dim(atomic_object *object, gboolean adjust)
get the barycenter of the atomic coordinates of an object
double get_object_dim(atomic_object *object)
get estimate of an object dimension
int create_object_from_open_project(project *this_proj, int p)
create object from atom(s) of a project opened in the workspace
void adjust_object_frag_coord(atomic_object *object)
adjust object number of fragment(s)
atomic_object * create_object_from_overall_coordination(project *this_proj, int coord, int aid, atom_search *remove)
create object from all the atom(s) that have the same exact coordination than the target atom
void reconstruct_coordinates_for_object(project *this_proj, atomic_object *this_object, gboolean upcoord)
reconstruct object atomic coordinates using PBC
tint ulam_coord(glwin *view)
shift insertion position for object not to have overlapping objects for multiple/repeated insertions
void correct_coordinates_for_object(project *this_proj, atomic_object *this_object, gboolean upcoord)
correct the atomic coordinates for 'this_object'
atomic_object * create_object_from_atom_coordination(project *this_proj, int coord, int aid, atom_search *remove)
create object from an atom and its nearest neighbors
int * duplicate_z(int species, double *old_z)
duplicate z table when creating an object, integer is preferred to avoid comparison errors during act...
void create_object_from_library(int p)
create object using the molecular library
void clean_this_object(int orig, int act, project *this_proj, atom_search *asearch)
clean object data
atomic_object * duplicate_atomic_object(atomic_object *old_obj)
duplicate an insert object
void to_insert_in_project(int stat, int orig, project *this_proj, atom_search *asearch, gboolean visible)
to insert object in project
gboolean rebuild_atom_neighbors(project *this_proj, int step, atomic_object *object, int target, int aid, atom *at, gboolean *checked_at)
rebuild target atom id coordinates using PBC
void reconstruct_bonds(project *this_proj, int ifcl, int *bcid)
reconstruct the project bond(s)/clone(s) lists after reconstruction using PBC
atomic_object * cif_object
void clean_object_bonds(project *proj, int o_step, atomic_object *object, int *new_id, gboolean movtion)
create the object bond list, and adjust the bond's atom id
integer(kind=c_int) function bonding(scf, sbf, adv, bdist, bmin, delt_ij, sfil)
GtkFileFilter * filter[NCFORMATS+1]
GtkWidget * builder_win(project *this_proj, gpointer data)
create crystal builder window
integer(kind=c_int) function chemistry()
void label(cairo_t *cr, double val, int axe, int p, project *this_proj)
draw axis label
int * duplicate_int(int num, int *old_val)
copy a list of int
distance distance_3d(cell_info *cell, int mdstep, atom *at, atom *bt)
distance between atom a and b in 3D
int ** allocdint(int xal, int yal)
allocate an int ** pointer
double * duplicate_double(int num, double *old_val)
copy a list of double
int *** alloctint(int xal, int yal, int zal)
allocate an int *** pointer
gboolean * allocbool(int val)
allocate a gboolean * pointer
double * allocdouble(int val)
allocate a double * pointer
int * allocint(int val)
allocate an int * pointer
element_data periodic_table_info[]
atomic_object * copied_object
project * get_project_by_id(int p)
get project pointer using id number
vec3_t get_insertion_coordinates(glwin *view)
get the insertion coordinates to insert object in the 3D window
atom * duplicate_atom(atom *at)
copy (partially) an atom data structure
gchar * env_name(project *this_proj, int g, int s, int f, GtkTextBuffer *buffer)
ouput the name of a coordination sphere