199 double sangle[3], cangle[3];
205 if (box ->
param[1][i] == 90.0)
214 sangle[i] = sin(
angle[i]);
215 cangle[i] = cos(
angle[i]);
218 box -> vect[0][0] = box ->
param[0][0];
219 box -> vect[0][1] = box -> vect[0][2] = 0.0;
220 box -> vect[1][0] = box ->
param[0][1] * cangle[2];
221 box -> vect[1][1] = box ->
param[0][1] * sangle[2];
222 box -> vect[1][2] = 0.0;
223 box -> vect[2][0] = box ->
param[0][2] * cangle[1];
224 ltemp = (cangle[0] - cangle[1]*cangle[2]) / sangle[2];
225 box -> vect[2][1] = box ->
param[0][2] * ltemp;
226 box -> vect[2][2] = box ->
param[0][2] * sqrt(sangle[1]*sangle[1] - ltemp*ltemp);
230 for (i=0; i<3; i++) box ->
param[0][i] = v3_length(vec3(box -> vect[i][0], box -> vect[i][1], box -> vect[i][2]));
231 box ->
param[1][0] = (box -> vect[2][0]*box -> vect[1][0] + box -> vect[2][1]*box -> vect[1][1] + box -> vect[2][2]*box -> vect[1][2]);
233 box ->
param[1][1] = (box -> vect[0][0]*box -> vect[2][0] + box -> vect[0][1]*box -> vect[2][1] + box -> vect[0][2]*box -> vect[2][2]);
235 box ->
param[1][2] = (box -> vect[0][0]*box -> vect[1][0] + box -> vect[0][1]*box -> vect[1][1] + box -> vect[0][2]*box -> vect[1][2]);
240 if (box ->
param[1][i] == 0.0)
242 box ->
param[1][i] = 90.0;
249 sangle[i] = sin(
angle[i]);
250 cangle[i] = cos(
angle[i]);
257 g_debug (
" a= %f, b= %f, c= %f", box ->
param[0][0], box ->
param[0][1], box ->
param[0][2]);
258 g_debug (
" alpha= %f, beta= %f, gamma= %f", box ->
param[1][0], box ->
param[1][1], box ->
param[1][2]);
259 g_debug (
" a.x= %f, a.y= %f, a.z= %f", box -> vect[0][0], box -> vect[0][1], box -> vect[0][2]);
260 g_debug (
" b.x= %f, b.y= %f, b.z= %f", box -> vect[1][0], box -> vect[1][1], box -> vect[1][2]);
261 g_debug (
" c.x= %f, c.y= %f, c.z= %f", box -> vect[2][0], box -> vect[2][1], box -> vect[2][2]);
263 box -> vol = (box -> vect[0][1]*box -> vect[1][2] - box -> vect[0][2]*box -> vect[1][1])*box -> vect[2][0];
264 box -> vol += (box -> vect[0][2]*box -> vect[1][0] - box -> vect[0][0]*box -> vect[1][2])*box -> vect[2][1];
265 box -> vol += (box -> vect[0][0]*box -> vect[1][1] - box -> vect[0][1]*box -> vect[1][0])*box -> vect[2][2];
266 box -> vol = fabs(box -> vol);
267 cell -> volume = box -> vol;
269 g_debug (
"Lattice volume= %f", box -> vol);
271 double z = sqrt(fabs(1 - cangle[0]*cangle[0]-cangle[1]*cangle[1]-cangle[2]*cangle[2] + 2*cangle[0]*cangle[1]*cangle[2]));
275 ftc[0][0]=box ->
param[0][0];
276 ftc[0][1]=box ->
param[0][1]*cangle[2];
277 ftc[0][2]=box ->
param[0][2]*cangle[1];
278 ftc[1][1]=box ->
param[0][1]*sangle[2];
279 ftc[1][2]=box ->
param[0][2]*((cangle[0]-cangle[1]*cangle[2])/sangle[2]);
280 ftc[2][2]=box ->
param[0][2]*
z/sangle[2];
281 box -> frac_to_cart = mat4(ftc[0][0], ftc[0][1], ftc[0][2], ftc[0][3],
282 ftc[1][0], ftc[1][1], ftc[1][2], ftc[1][3],
283 ftc[2][0], ftc[2][1], ftc[2][2], ftc[2][3],
284 ftc[3][0], ftc[3][1], ftc[3][2], ftc[3][3]);
285 ftc[0][0]=1.0/box -> frac_to_cart.m00;
286 ftc[0][1]=-cangle[2]/(sangle[2]*box ->
param[0][0]);
287 ftc[0][2]=box ->
param[0][1]*box ->
param[0][2]/box -> vol;
288 ftc[0][2]=ftc[0][2]*(cangle[0]*cangle[2] - cangle[1])/sangle[0];
289 ftc[1][1]=1.0/box -> frac_to_cart.m11;
290 ftc[1][2]=(box ->
param[0][0]*box ->
param[0][2])/box -> vol;
291 ftc[1][2]=ftc[1][2]*(cangle[1]*cangle[2] - cangle[0])/sangle[2];
292 ftc[2][2]=1.0/box -> frac_to_cart.m22;
293 box -> cart_to_frac = mat4 (ftc[0][0], ftc[0][1], ftc[0][2], ftc[0][3],
294 ftc[1][0], ftc[1][1], ftc[1][2], ftc[1][3],
295 ftc[2][0], ftc[2][1], ftc[2][2], ftc[2][3],
296 ftc[3][0], ftc[3][1], ftc[3][2], ftc[3][3]);
299 m4_print (box -> frac_to_cart);
300 m4_print (box -> cart_to_frac);
667 int h, i, j, k, l, m, n, o, p, q, r, s, t;
670 gboolean * taken_pos = NULL;
671 gboolean ** holes_pos = NULL;
672 int * pos_order = NULL;
673 int * site_pos = NULL;
675 int pos_bs, num_bs, site_bs;
678 gboolean low_occ = FALSE;
679 gboolean with_holes = FALSE;
680 gboolean occ_sym = (occupying == 0 || occupying > 2) ? TRUE : FALSE;
685 for (k=0; k<cryst ->
objects; k++)
687 if (cryst -> holes[k])
690 j =
max (j, cryst -> pos_by_object[i]);
699 for (j=0; j<cryst ->
objects; j++)
701 if (! cryst -> holes[j])
708 for (h=0; h<cryst ->
objects; h++)
712 g_debug (
"i= %d, occ[%d]= %f, pbo[%d]= %d", i+1, i+1, cryst -> occupancy[i], i+1, cryst -> pos_by_object[i]);
714 if (cryst -> sites[i][0] > 0 && cryst -> occupancy[i]*cryst -> pos_by_object[i] < 1.0 && ! cryst -> holes[i]) low_occ = TRUE;
716 if (cryst -> sites[i][0] > 0 && cryst -> occupancy[i] < 1.0 && cryst -> pos_by_object[i] > 1)
719 pos_bs = cryst -> pos_by_object[i];
720 site_bs = (cryst -> holes[i]) ? 1 : cryst -> sites[i][0];
721 num_bs = cryst -> sites[i][0];
724 g_debug (
"i= %d, site[%d][0]= %d, pos_bs= %d, num_bs= %d", i+1, i+1, cryst -> sites[i][0], pos_bs, num_bs);
726 for (j=0; j<cryst -> sites[i][0]; j++)
728 k = cryst -> sites[i][j+1];
729 v += cryst -> occupancy[k];
734 for (j=0; j<site_bs; j++)
736 if (holes_pos[i][j]) l ++;
739 for (j=0; j<site_bs; j++)
741 k = cryst -> sites[i][j+1];
743 g_debug (
"\tj= %d, k= %d, sites[%d][0]= %d, occ[%d]= %f, pos_by_objects[%d]= %d",
744 j+1, k+1, k+1, cryst -> sites[k][0], k+1, cryst -> occupancy[k], k+1, cryst -> pos_by_object[k]);
746 if (cryst -> sites[k][0] > -1)
748 num_to_save = round (pos_bs*cryst -> occupancy[k]);
751 g_debug (
"\tnum_to_save= %d, l= %d", num_to_save, l);
755 if ((v == 1.0 && l != pos_bs) || l > pos_bs) num_to_save += (pos_bs-l);
759 while (m < num_to_save)
765 n = (CPU_time - (k+17)*pos_bs) + (3*cryst -> at_by_object[i]);
767 p = round (prob * (pos_bs-1));
770 pick_it = (taken_pos[p] || holes_pos[i][p]) ? FALSE : TRUE;
774 pick_it = ! taken_pos[p];
777 else if (occupying == 3)
782 while (taken_pos[p] || holes_pos[i][p]) p ++;
786 while (taken_pos[p]) p ++;
792 g_debug (
"\t\tp= %d, m= %d, sites[i][0]= %d", p, m, cryst -> sites[k][0]);
794 p = j + m*cryst -> sites[k][0];
795 if (p > cryst -> pos_by_object[k]-1)
797 p -= (cryst -> pos_by_object[k]-1);
800 g_debug (
"\t\tp= %d", p);
804 if (site_pos[n] == p)
807 if (n == cryst -> pos_by_object[k]) n = 0;
814 if (site_pos[o] == n)
834 sort (num_to_save, site_pos);
835 for (m=0; m<num_to_save; m++)
837 g_debug (
"\t\tm= %d, site_pos[%d]= %d", m+1, m+1, site_pos[m]);
840 for (m=0; m<num_to_save; m++)
843 cryst -> coord[k][m] = cryst -> coord[k][n];
844 if (occ_sym && tot_cell > 1)
846 for (o=1; o<tot_cell; o++)
848 p = k+o*(cryst ->
objects/tot_cell);
849 cryst -> coord[p][m] = cryst -> coord[p][n];
854 cryst -> pos_by_object[k] = num_to_save;
855 cryst -> sites[k][0] = -1;
856 if (occ_sym && tot_cell > 1)
858 for (o=1; o<tot_cell; o++)
860 p = k+o*(cryst ->
objects/tot_cell);
861 cryst -> pos_by_object[p] = num_to_save;
862 cryst -> sites[p][0] = -1;
865 if (cryst -> holes[i])
867 for (o=0; o<num_bs; o++)
869 p = cryst -> sites[i][o+1];
870 for (q=0; q<num_to_save; q++)
873 holes_pos[p][r] = TRUE;
874 if (occ_sym && tot_cell > 1)
876 for (s=1; s<tot_cell; s++)
878 t = p+s*(cryst ->
objects/tot_cell);
879 holes_pos[t][r] = TRUE;
891 if (holes_pos) g_free (holes_pos);
909 int h, i, j, k, l, m, n, o, p, q;
914 mat4_t ** wyckpos = g_malloc0 (sp_group -> numw*
sizeof*wyckpos);
918 wyckpos[i] = g_malloc0 (sp_group -> wyckoff[i].
multi*
sizeof*wyckpos[i]);
919 for (j=0; j<sp_group -> wyckoff[i].multi; j++)
923 tmp_pos = g_strdup_printf (
"%s", sp_group -> wyckoff[i].pos[j][k]);
940 wyckpos[i][j] = mat4 (spgpos[0][0], spgpos[0][1], spgpos[0][2], spgpos[0][3],
941 spgpos[1][0], spgpos[1][1], spgpos[1][2], spgpos[1][3],
942 spgpos[2][0], spgpos[2][1], spgpos[2][2], spgpos[2][3],
944 wyckpos[i][j] = m43_mul(sp_group -> wyck_origin, wyckpos[i][j]);
957 points = g_malloc0(sp_group ->
settings[h].nump*
sizeof*points);
958 for (i=0; i<sp_group ->
settings[h].nump; i++)
962 tmp_pos = g_strdup_printf (
"%s", sp_group ->
settings[h].points[i][j]);
967 points[i] = vec3(copos[0], copos[1], copos[2]);
973 npoints = sp_group ->
settings[h].nump;
977 points = g_malloc0(1*
sizeof*points);
978 points[0] = vec3(0.0, 0.0, 0.0);
987 double amin = box ->
param[0][0];
988 for (i=1; i<3; i++) amin =
min(amin, box ->
param[0][i]);;
992 point.
a = this_proj -> id;
993 point.
b = point.
c = 0;
994 this_proj -> modelgl = g_malloc0(
sizeof*this_proj -> modelgl);
1014 object = this_proj -> modelgl -> atom_win -> to_be_inserted[2];
1026 this_proj -> modelgl -> search_widg[7] -> todo[i] = 1;
1029 object = this_proj -> modelgl -> atom_win -> to_be_inserted[2];
1033 object =
object -> next;
1036 for (j=0; j<3; j++)
object -> baryc[j] =
this_reader -> coord[i][j];
1042 occupying = this_proj -> modelgl ->
builder_win -> occupancy;
1046 object = this_proj -> modelgl -> atom_win -> to_be_inserted[2];
1051 if (this_proj -> modelgl -> search_widg[7] -> todo[l])
1055 for (m=0; m<
object -> species; m++)
1060 if (
object -> old_z[m] == cdata ->
z[l])
1066 if (! done &&
object -> old_z[m] > 0.0)
1068 cdata ->
z[k] =
object -> old_z[m];
1071 if (
object -> old_z[m] == 0.0)
1073 cdata -> holes[i] = TRUE;
1074 cdata -> with_holes = TRUE;
1077 n = sp_group -> wyckoff[0].multi*npoints;
1079 cdata -> coord[i] = g_malloc0(n*
sizeof*cdata -> coord[i]);
1080 cdata -> insert[i] = m4_mul_coord (sp_group -> coord_origin, vec3(
object -> baryc[0],
object -> baryc[1],
object -> baryc[2]));
1086 for (o=0; o<npoints; o++)
1088 for (p=0; p<sp_group -> wyckoff[0].multi; p++)
1090 pos = v3_add (m4_mul_coord (wyckpos[0][p], cdata -> insert[i]), points[o]);
1094 cdata -> coord[i][n].x = pos.
x;
1095 cdata -> coord[i][n].y = pos.
y;
1096 cdata -> coord[i][n].
z = pos.
z;
1100 cdata -> at_type[i][n] = 1;
1105 cdata -> at_type[i][-(q+1)] ++;
1109 cdata -> pos_by_object[i] = n;
1110 cdata -> occupancy[i] =
object -> occ;
1111 if (! cdata -> holes[i]) cdata -> lot[i] =
allocint(
object ->
atoms);
1113 for (l=0; l<
object ->
atoms; l++)
1115 n =
object -> at_list[l].sp;
1116 cdata ->
position[i][l].x =
object -> at_list[l].x;
1117 cdata ->
position[i][l].y =
object -> at_list[l].y;
1118 cdata ->
position[i][l].
z =
object -> at_list[l].z;
1119 if (! cdata -> holes[i])
1123 if (cdata ->
z[o] ==
object -> old_z[n])
1125 cdata -> lot[i][l] = o;
1131 cdata -> at_by_object[i] =
object ->
atoms;
1136 if (
object -> dim > amin)
1138 str = g_strdup_printf (
"%s size (%f Ang.) is bigger than the min(<b><i>a,b,c</i></b>)\n"
1139 "If you build the crystal the final structure is likely to be crowded !\n"
1140 "Continue anyway ?",
object -> name,
object -> dim);
1142 if (!
ask_yes_no(
"This object might be too big !" , str, GTK_MESSAGE_WARNING, widg))
1145 if (points) g_free (points);
1146 if (wyckpos) g_free (wyckpos);
1150 this_proj -> modelgl -> search_widg[7] =
free_this_search_data (this_proj -> modelgl -> search_widg[7]);
1151 g_free (this_proj -> modelgl);
1152 this_proj -> modelgl = NULL;
1160 j +=
object -> species;
1161 k +=
object ->
atoms;
1164 object =
object -> next;
1171 cdata -> overlapping = (visible) ? this_proj -> modelgl ->
builder_win -> overlapping : FALSE;
1175 if (points) g_free (points);
1176 if (wyckpos) g_free (wyckpos);
1180 this_proj -> modelgl -> search_widg[7] =
free_this_search_data (this_proj -> modelgl -> search_widg[7]);
1181 g_free (this_proj -> modelgl);
1182 this_proj -> modelgl = NULL;
1190 if (points) g_free (points);
1191 if (wyckpos) g_free (wyckpos);
1197 for (i=0; i<cdata ->
objects; i++)
1199 m += (cdata -> holes[i]) ? 1 : 0;
1204 if (! cdata -> overlapping || cdata -> holes[i])
1206 u = cdata -> occupancy[i];
1210 v = cdata -> occupancy[i];
1212 if (u+v > 1.0 || u+v < 0.0)
1215 show_warning (
"Impossible to build crystal: check occupancy !", widg);
1218 else if (cdata -> overlapping && ! cdata -> with_holes)
1220 if (j) cdata -> sites[i][k] = i;
1224 for (l=0; l<cdata ->
objects; l++)
1228 if (cdata -> insert[i].
x == cdata -> insert[l].
x
1229 && cdata -> insert[i].
y == cdata -> insert[l].
y
1230 && cdata -> insert[i].
z == cdata -> insert[l].
z)
1234 if (! cdata -> overlapping || cdata -> holes[i])
1237 cdata -> sites[i][k] = l;
1242 if (! cdata -> overlapping || cdata -> holes[i]) k ++;
1243 if (! cdata -> overlapping || cdata -> holes[l])
1245 u += cdata -> occupancy[l];
1249 v =
max(v, cdata -> occupancy[l]);
1253 show_warning (
"Impossible to build crystal: site total occupancy > 1.0", widg);
1264 cdata -> sites[i] =
allocint (k+1);
1265 cdata -> sites[i][0] = k;
1266 cdata -> sites[i][1] = i;
1267 if (k > 1) cdata -> shared_sites = TRUE;
1285 show_warning (
"Impossible to build crystal: empty site(s) only !", widg);
1288 gboolean new_proj = (this_proj -> natomes && visible) ? TRUE : FALSE;
1307 active_box -> vect[i][j] *= cell -> cextra[i];
1316 tot_cell *= cell -> cextra[i];
1320 i = (occupying == 2) ? 0 : 1;
1321 j = (occupying == 2) ? 1 : tot_cell;
1323 g_free (cryst ->
z);
1325 cryst -> shared_sites = cdata -> shared_sites;
1326 cryst -> overlapping = cdata -> overlapping;
1327 cryst -> with_holes = cdata -> with_holes;
1330 for (k=0; k<cdata ->
objects; k++)
1332 cryst -> pos_by_object[k] = tot_cell*cdata -> pos_by_object[k];
1333 cryst -> at_by_object[k] = cdata -> at_by_object[k];
1334 cryst -> at_type[k] =
duplicate_int (sp_group -> wyckoff[0].
multi*npoints, cdata -> at_type[k]);
1336 if (! cdata -> holes[k]) cryst -> lot[k] =
duplicate_int (cdata -> at_by_object[k], cdata -> lot[k]);
1337 cryst -> occupancy[k] = cdata -> occupancy[k];
1338 cryst -> sites[k] =
duplicate_int (cdata -> sites[k][0]+1, cdata -> sites[k]);
1339 cryst ->
position[k] = g_malloc0 (cdata -> at_by_object[k]*
sizeof*cryst ->
position[k]);
1340 for (l=0; l<cdata -> at_by_object[k]; l++) cryst ->
position[k][l] = cdata ->
position[k][l];
1341 cryst -> coord[k] = g_malloc0(cryst -> pos_by_object[k]*
sizeof*cryst -> coord[k]);
1345 for (k=0; k<cell -> cextra[0]; k++)
1347 vx = v3_muls(vec3(box -> vect[0][0], box -> vect[0][1], box -> vect[0][2]), k);
1348 for (l=0; l<cell -> cextra[1]; l++)
1350 vy = v3_muls(vec3(box -> vect[1][0], box -> vect[1][1], box -> vect[1][2]), l);
1351 for (m=0; m<cell -> cextra[2]; m++)
1353 vz = v3_muls(vec3(box -> vect[2][0], box -> vect[2][1], box -> vect[2][2]), m);
1354 shift = v3_add (vx, v3_add(vy, vz));
1355 for (n=0; n<cdata ->
objects; n++)
1359 cryst -> coord[n+h] = g_malloc0(cdata -> pos_by_object[n]*
sizeof*cryst -> coord[n+h]);
1360 cryst -> pos_by_object[n+h] = cdata -> pos_by_object[n];
1361 cryst -> at_by_object[n+h] = cdata -> at_by_object[n];
1362 cryst -> holes[n+h] = cdata -> holes[n];
1363 cryst -> at_type[n+h] =
duplicate_int (sp_group -> wyckoff[0].
multi*npoints, cdata -> at_type[n]);
1364 if (! cdata -> holes[n]) cryst -> lot[n+h] =
duplicate_int (cdata -> at_by_object[n], cdata -> lot[n]);
1365 cryst -> occupancy[n+h] = cdata -> occupancy[n];
1366 cryst -> sites[n+h] =
duplicate_int (cdata -> sites[n][0]+1, cdata -> sites[n]);
1367 for (o=0; o<cryst -> sites[n+h][0]; o++) cryst -> sites[n+h][o+1] += h;
1368 cryst ->
position[n+h] = g_malloc0 (cdata -> at_by_object[n]*
sizeof*cryst ->
position[n+h]);
1369 for (o=0; o<cdata -> at_by_object[n]; o++) cryst ->
position[n+h][o] = cdata ->
position[n][o];
1371 o = cdata -> pos_by_object[n];
1374 cryst -> coord[n+i*h][p+(!i)*h*o] = v3_add(m4_mul_coord (box -> frac_to_cart, cdata -> coord[n][p]),
shift);
1377 h += (occupying != 2) ? cdata ->
objects : 1;
1385 gboolean dist_chk = TRUE;
1387 if (! cryst -> overlapping)
1389 for (i=0; i<cryst ->
objects; i++)
1391 if (! cryst -> holes[i])
1393 for (j=0; j<cryst -> pos_by_object[i]; j++)
1395 at.
x = cryst -> coord[i][j].x;
1396 at.
y = cryst -> coord[i][j].y;
1397 at.
z = cryst -> coord[i][j].
z;
1398 for (k=i; k<cryst ->
objects; k++)
1400 if (! cryst -> holes[k])
1402 if (k != i || j < cryst -> pos_by_object[i]-1)
1404 l = (k == i) ? j+1 : 0;
1405 for (m=l; m<cryst -> pos_by_object[k]; m++)
1407 bt.
x = cryst -> coord[k][m].x;
1408 bt.
y = cryst -> coord[k][m].y;
1409 bt.
z = cryst -> coord[k][m].
z;
1411 if (
dist.length < 0.5)
1417 if (
ask_yes_no (
"Inter-object distance(s) < 0.5 Ang. !",
1418 "Inter-object distance(s) < 0.5 Ang. !\n\n\t\tContinue and leave a single object at each position ?", GTK_MESSAGE_WARNING, widg))
1431 if (
dist.length < 0.1)
1433 cryst -> at_type[i][j] += cryst -> at_type[k][m];
1434 for (n=m; n<cryst -> pos_by_object[k]-1; n++)
1436 cryst -> coord[k][n].x = cryst -> coord[k][n+1].x;
1437 cryst -> coord[k][n].y = cryst -> coord[k][n+1].y;
1438 cryst -> coord[k][n].
z = cryst -> coord[k][n+1].
z;
1439 cryst -> at_type[k][n] += cryst -> at_type[k][n+1];
1441 cryst -> pos_by_object[k] --;
1456 for (i=0; i<cryst ->
objects; i++)
1458 if (! cryst -> holes[i]) tot_new_at += cryst -> pos_by_object[i]*cryst -> at_by_object[i];
1460 int * tot_new_lot =
allocint(tot_new_at);
1461 vec3_t * ncc = g_malloc0(tot_new_at*
sizeof*ncc);
1463 for (j=0; j<cryst ->
objects; j++)
1465 if (! cryst -> holes[j])
1467 for (k=0; k<cryst -> at_by_object[j]; k++)
1469 for (l=0; l<cryst -> pos_by_object[j]; l++)
1471 ncc[i] = v3_add (cryst -> coord[j][l], cryst ->
position[j][k]);
1472 m = tot_new_lot[i] = cryst -> lot[j][k];
1473 cryst -> nsps[m] ++;
1484 for (j=0; j<cryst -> spec; j++)
1486 if (cryst -> nsps[j]) i ++;
1500 for (i=0; i<cryst -> spec; i++)
1502 if (! cryst -> nsps[i])
1506 if (ncc) g_free (ncc);
1507 if (tot_new_lot) g_free (tot_new_lot);
1516 j = (int)cryst ->
z[i];
1528 for (m=0; m<tot_new_at;m++)
1530 if (tot_new_lot[m] == i) tot_new_lot[m] = k;
1536 copos[0] = copos[1] = copos[2] = 0.0;
1537 if (visible && ! new_proj)
1541 for (j=0; j<3; j++) copos[i] -=
active_box -> vect[j][i]/2.0;
1544 for (i=0; i<tot_new_at; i++)
1562 if (ncc) g_free (ncc);
1563 if (tot_new_lot) g_free (tot_new_lot);
1612 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)
active_glwin -> ogl_mode[0], TRUE);
1644 gtk_check_menu_item_set_active ((GtkCheckMenuItem *)
active_glwin -> ogl_rep[0], TRUE);
1662 gchar * low_warning =
"The crystal will be created however some objects might be missing,\n"
1663 "Occupancy is too low compared to the number of site(s) per cell.\n\n"
1664 "<b>To build a crystal matching the defined occupancy</b>:\n"
1665 "\t <b>1)</b> If you are trying to read a CIF file, use the crystal builder instead.\n"
1666 "\t <b>2)</b> Modify the occupancy set-up to 'Completely random'.\n"
1667 "\t <b>3)</b> Increase the number of unit cells up to get rid of this message.";