129int true(void) {
return 1; }
132 {
"Cs",
"(sigma) ",
true},
133 {
"Ci",
"(i) ",
true},
134 {
"C2",
"(C2) ",
true},
135 {
"C3",
"(C3) ",
true},
136 {
"C4",
"(C4) (C2) ",
true},
137 {
"C5",
"(C5) ",
true},
138 {
"C6",
"(C6) (C3) (C2) ",
true},
139 {
"C7",
"(C7) ",
true},
140 {
"C8",
"(C8) (C4) (C2) ",
true},
141 {
"D2",
"3*(C2) ",
true},
142 {
"D3",
"(C3) 3*(C2) ",
true},
143 {
"D4",
"(C4) 5*(C2) ",
true},
144 {
"D5",
"(C5) 5*(C2) ",
true},
145 {
"D6",
"(C6) (C3) 7*(C2) ",
true},
146 {
"D7",
"(C7) 7*(C2) ",
true},
147 {
"D8",
"(C8) (C4) 9*(C2) ",
true},
148 {
"C2v",
"(C2) 2*(sigma) ",
true},
149 {
"C3v",
"(C3) 3*(sigma) ",
true},
150 {
"C4v",
"(C4) (C2) 4*(sigma) ",
true},
151 {
"C5v",
"(C5) 5*(sigma) ",
true},
152 {
"C6v",
"(C6) (C3) (C2) 6*(sigma) ",
true},
153 {
"C7v",
"(C7) 7*(sigma) ",
true},
154 {
"C8v",
"(C8) (C4) (C2) 8*(sigma) ",
true},
155 {
"C2h",
"(i) (C2) (sigma) ",
true},
156 {
"C3h",
"(C3) (S3) (sigma) ",
true},
157 {
"C4h",
"(i) (C4) (C2) (S4) (sigma) ",
true},
158 {
"C5h",
"(C5) (S5) (sigma) ",
true},
159 {
"C6h",
"(i) (C6) (C3) (C2) (S6) (S3) (sigma) ",
true},
160 {
"C7h",
"(C7) (S7) (sigma) ",
true},
161 {
"C8h",
"(i) (C8) (C4) (C2) (S8) (S4) (sigma) ",
true},
162 {
"D2h",
"(i) 3*(C2) 3*(sigma) ",
true},
163 {
"D3h",
"(C3) 3*(C2) (S3) 4*(sigma) ",
true},
164 {
"D4h",
"(i) (C4) 5*(C2) (S4) 5*(sigma) ",
true},
165 {
"D5h",
"(C5) 5*(C2) (S5) 6*(sigma) ",
true},
166 {
"D6h",
"(i) (C6) (C3) 7*(C2) (S6) (S3) 7*(sigma) ",
true},
167 {
"D7h",
"(C7) 7*(C2) (S7) 8*(sigma) ",
true},
168 {
"D8h",
"(i) (C8) (C4) 9*(C2) (S8) (S4) 9*(sigma) ",
true},
169 {
"D2d",
"3*(C2) (S4) 2*(sigma) ",
true},
170 {
"D3d",
"(i) (C3) 3*(C2) (S6) 3*(sigma) ",
true},
171 {
"D4d",
"(C4) 5*(C2) (S8) 4*(sigma) ",
true},
172 {
"D5d",
"(i) (C5) 5*(C2) (S10) 5*(sigma) ",
true},
173 {
"D6d",
"(C6) (C3) 7*(C2) (S12) (S4) 6*(sigma) ",
true},
174 {
"D7d",
"(i) (C7) 7*(C2) (S14) 7*(sigma) ",
true},
175 {
"D8d",
"(C8) (C4) 9*(C2) (S16) 8*(sigma) ",
true},
176 {
"S4",
"(C2) (S4) ",
true},
177 {
"S6",
"(i) (C3) (S6) ",
true},
178 {
"S8",
"(C4) (C2) (S8) ",
true},
179 {
"T",
"4*(C3) 3*(C2) ",
true},
180 {
"Th",
"(i) 4*(C3) 3*(C2) 4*(S6) 3*(sigma) ",
true},
181 {
"Td",
"4*(C3) 3*(C2) 3*(S4) 6*(sigma) ",
true},
182 {
"O",
"3*(C4) 4*(C3) 9*(C2) ",
true},
183 {
"Oh",
"(i) 3*(C4) 4*(C3) 9*(C2) 4*(S6) 3*(S4) 9*(sigma) ",
true},
184 {
"Cinfv",
"(Cinf) (sigma) ",
true},
185 {
"Dinfh",
"(i) (Cinf) (C2) 2*(sigma) ",
true},
186 {
"I",
"6*(C5) 10*(C3) 15*(C2) ",
true},
187 {
"Ih",
"(i) 6*(C5) 10*(C3) 15*(C2) 6*(S10) 10*(S6) 15*(sigma) ",
true},
188 {
"Kh",
"(i) (Cinf) (sigma) ",
true},
190#define PointGroupsCount (sizeof(PointGroups) / sizeof(POINT_GROUP))
197double pow2(
double x) {
return x * x; }
205 if (atom_used == NULL) {
206 fprintf(
stderr,
"Out of memory for tagging array in establish_pairs()\n");
212 printf(
" looking for a pair for %d\n",
i);
215 printf(
" new coordinates are: (%g,%g,%g)\n", symmetric.x[0],
216 symmetric.x[1], symmetric.x[2]);
220 if (
Atoms[
j].type != symmetric.type || atom_used[
j])
222 for (k = 0,
distance = 0; k < DIMENSION; k++) {
227 printf(
" distance to %d is %g\n",
j,
distance);
236 printf(
" no pair for atom %d - best was %d with err = %g\n",
i,
237 best_j, best_distance);
242 atom_used[best_j] = 1;
244 printf(
" atom %d transforms to the atom %d, err = %g\n",
i,
245 best_j, best_distance);
268 printf(
" transform looped %d steps too early from atom %d\n",
278 printf(
" (improper) transform looped %d steps too early "
287 printf(
" transform failed to loop after %d steps from atom %d\n",
325 fprintf(
stderr,
"Out of memory allocating symmetry element\n");
331 "Out of memory allocating transform table for symmetry element\n");
356 for (k = 0, r = 0; k < DIMENSION; k++) {
362 printf(
" distance to symmetric atom (%g) is too big for %d\n", r,
376 double target, r, maxr;
379 for (k = 0, r = 0; k < DIMENSION; k++) {
384 fprintf(
stderr,
"Normal collapsed!\n");
387 for (k = 0; k < DIMENSION; k++) {
392 for (k = 0; k < DIMENSION; k++) {
398 for (k = 0, r = 0; k < DIMENSION; k++) {
403 fprintf(
stderr,
"Direction collapsed!\n");
406 for (k = 0; k < DIMENSION; k++) {
413 for (k = 0, r = 0; k < DIMENSION; k++) {
420 if (finish != NULL) {
438 double grad[MAXPARAM];
439 double force[MAXPARAM];
440 double step[MAXPARAM];
441 double f, fold, fnew, fnew2, fdn, fup, snorm;
448 if (
vars > MAXPARAM) {
449 fprintf(
stderr,
"Catastrophe in optimize_transformation_params()!\n");
458 printf(
" function value = %g\n",
f);
461 printf(
" function value is small enough\n");
471 printf(
" no progress is made, stop optimization\n");
487 printf(
" i = %d, grad = %12.6e, force = %12.6e\n",
i, grad[
i],
491 for (
i = 0, snorm = 0;
i <
vars;
i++) {
493 force[
i] = -force[
i];
498 step[
i] = -grad[
i] / force[
i];
499 snorm += step[
i] * step[
i];
529 printf(
" interpolation base points: %g, %g, %g\n",
f, fnew,
533 a = (4 *
f - fnew2 - 3 * fnew) / 2;
534 b = (
f + fnew2 - 2 * fnew) / 2;
536 printf(
" linear interpolation coefficients %g, %g\n", a, b);
539 if (x > 0.2 && x < 1.8) {
541 printf(
" interpolated: %g\n", x);
564 printf(
" maximum number of optimization cycles made\n");
565 printf(
" optimization completed after %d cycles with f = %g\n",
576 printf(
" no transformation correspondence table can be "
584 printf(
" transformation is identical to plane %d\n",
i);
592 printf(
" transformation is identical to inversion center %d\n",
601 printf(
" transformation is identical to normal axis %d\n",
i);
609 printf(
" transformation is identical to improper axis %d\n",
i);
616 printf(
" incorrect transformation order\n");
623 printf(
" refined transformation does not pass the numeric "
639 for (
i = 0, r = plane->
distance;
i < DIMENSION;
i++) {
642 to->type = from->type;
643 for (
i = 0;
i < DIMENSION;
i++) {
644 to->x[
i] = from->x[
i] + 2 * r * plane->
normal[
i];
650 double dx[DIMENSION], midpoint[DIMENSION], rab, r;
654 printf(
"Trying mirror plane for atoms %d,%d\n",
i,
j);
659 for (k = 0, rab = 0; k < DIMENSION; k++) {
662 rab += dx[k] * dx[k];
666 fprintf(
stderr,
"Atoms %d and %d coincide (r = %g)\n",
i,
j, rab);
669 for (k = 0, r = 0; k < DIMENSION; k++) {
670 plane->
normal[k] = dx[k] / rab;
671 r += midpoint[k] * plane->
normal[k];
675 for (k = 0; k < DIMENSION; k++) {
681 printf(
" initial plane is at %g from the origin\n", r);
684 printf(
" refinement failed for the plane\n");
693 double d0[DIMENSION], d1[DIMENSION], d2[DIMENSION];
695 double r, s0, s1, s2;
700 printf(
"Trying whole-molecule mirror plane\n");
705 for (k = 0; k < DIMENSION; k++)
706 d0[k] = d1[k] = d2[k] = 0;
711 for (
j = 0;
j <
i;
j++) {
712 for (k = 0, r = 0; k < DIMENSION; k++) {
717 for (k = 0, s0 = s1 = s2 = 0; k < DIMENSION; k++) {
723 for (k = 0; k < DIMENSION; k++) {
730 for (k = 0, s0 = s1 = s2 = 0; k < DIMENSION; k++) {
736 if (s0 >= s1 && s0 >= s2)
738 if (s1 >= s0 && s1 >= s2)
740 if (s2 >= s0 && s2 >= s1)
744 "Catastrophe in init_ultimate_plane(): %g, %g and %g have no "
749 for (k = 0, r = 0; k < DIMENSION; k++)
753 for (k = 0; k < DIMENSION; k++)
754 plane->
normal[k] = d[k] / r;
756 for (k = 1; k < DIMENSION; k++)
760 for (k = 0, r = 0; k < DIMENSION; k++)
767 printf(
" refinement failed for the plane\n");
779 to->type = from->type;
780 for (
i = 0;
i < DIMENSION;
i++) {
791 printf(
"Trying inversion center at the center of something\n");
796 for (k = 0, r = 0; k < DIMENSION; k++)
800 for (k = 0; k < DIMENSION; k++)
804 for (k = 1; k < DIMENSION; k++)
809 printf(
" initial inversion center is at %g from the origin\n", r);
812 printf(
" refinement failed for the inversion center\n");
823 double x[3], y[3], a[3], b[3], c[3];
824 double angle = axis->
order ? 2 * M_PI / axis->
order : 1.0;
825 double a_sin =
sin(angle);
826 double a_cos =
cos(angle);
830 if (DIMENSION != 3) {
831 fprintf(
stderr,
"Catastrophe in rotate_atom!\n");
834 for (
i = 0;
i < 3;
i++)
836 for (
i = 0, dot = 0;
i < 3;
i++)
845 for (
i = 0;
i < 3;
i++)
846 y[
i] = a[
i] + b[
i] * a_cos + c[
i] * a_sin;
847 for (
i = 0;
i < 3;
i++)
849 to->type = from->type;
854 double dir[DIMENSION], rel[DIMENSION];
859 printf(
"Trying infinity axis\n");
864 for (k = 0; k < DIMENSION; k++)
867 for (k = 0,
s = 0; k < DIMENSION; k++) {
869 s += rel[k] * dir[k];
872 for (k = 0; k < DIMENSION; k++)
875 for (k = 0; k < DIMENSION; k++)
878 for (k = 0,
s = 0; k < DIMENSION; k++)
882 for (k = 0; k < DIMENSION; k++)
886 for (k = 0; k < DIMENSION; k++)
888 for (k = 0,
s = 0; k < DIMENSION; k++)
892 for (k = 0; k < DIMENSION; k++)
895 for (k = 1; k < DIMENSION; k++)
904 printf(
" refinement failed for the infinity axis\n");
915 double r,
center[DIMENSION];
918 printf(
"Trying c2 axis for the pair (%d,%d) with the support (%g,%g,%g)\n",
919 i,
j, support[0], support[1], support[2]);
922 for (k = 0, ris = rjs = 0; k < DIMENSION; k++) {
931 printf(
" Support can't actually define a rotation axis\n");
938 for (k = 0, r = 0; k < DIMENSION; k++)
942 for (k = 0; k < DIMENSION; k++)
946 for (k = 1; k < DIMENSION; k++)
950 for (k = 0, r = 0; k < DIMENSION; k++) {
959 printf(
" c2 is underdefined, but there is a molecular plane\n");
960 for (k = 0; k < DIMENSION; k++)
964 printf(
" c2 is underdefined, trying random direction\n");
965 for (k = 0; k < DIMENSION; k++)
976 for (k = 0, r = 0; k < DIMENSION; k++)
979 for (k = 0; k < DIMENSION; k++)
983 for (k = 0; k < DIMENSION; k++)
988 printf(
" refinement failed for the c2 axis\n");
998 double ra, rb, rc, rab, rbc, rac, r;
1001 ra = rb = rc = rab = rbc = rac = 0;
1002 for (
i = 0;
i < DIMENSION;
i++) {
1014 printf(
" points are not on a sphere\n");
1017 for (
i = 0;
i < DIMENSION;
i++) {
1018 rab += (a[
i] - b[
i]) * (a[
i] - b[
i]);
1019 rac += (a[
i] - c[
i]) * (a[
i] - c[
i]);
1020 rbc += (c[
i] - b[
i]) * (c[
i] - b[
i]);
1028 printf(
" points can't be rotation-equivalent\n");
1034 printf(
" rotation is underdefined by these points\n");
1037 rab = (rab + rbc) / 2;
1038 angle = M_PI - 2 *
asin(rac / (2 * rab));
1040 printf(
" rotation angle is %f\n", angle);
1044 printf(
" atoms are too close to a straight line\n");
1047 order =
floor((2 * M_PI) / angle + 0.5);
1051 printf(
" rotation axis order (%d) is not from 3 to %d\n", order,
1056 axis->
order = order;
1058 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1062 for (
i = 0;
i < DIMENSION;
i++)
1066 for (
i = 1;
i < DIMENSION;
i++)
1071 (b[1] - a[1]) * (c[2] - b[2]) - (b[2] - a[2]) * (c[1] - b[1]);
1073 (b[2] - a[2]) * (c[0] - b[0]) - (b[0] - a[0]) * (c[2] - b[2]);
1075 (b[0] - a[0]) * (c[1] - b[1]) - (b[1] - a[1]) * (c[0] - b[0]);
1093 for (
i = 0;
i < DIMENSION;
i++)
1095 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1098 for (
i = 0;
i < DIMENSION;
i++)
1101 printf(
" axis origin is at (%g,%g,%g)\n",
1104 printf(
" axis is in the direction (%g,%g,%g)\n", axis->
direction[0],
1112 double a[DIMENSION], b[DIMENSION], c[DIMENSION];
1116 printf(
"Trying cn axis for the triplet (%d,%d,%d)\n", ia, ib, ic);
1119 for (
i = 0;
i < DIMENSION;
i++) {
1126 printf(
" no coherent axis is defined by the points\n");
1132 printf(
" refinement failed for the c%d axis\n", axis->
order);
1145 double x[3], y[3], a[3], b[3], c[3];
1146 double angle = 2 * M_PI / axis->
order;
1147 double a_sin =
sin(angle);
1148 double a_cos =
cos(angle);
1152 if (DIMENSION != 3) {
1153 fprintf(
stderr,
"Catastrophe in rotate_reflect_atom!\n");
1156 for (
i = 0;
i < 3;
i++)
1158 for (
i = 0, dot = 0;
i < 3;
i++)
1167 for (
i = 0;
i < 3;
i++)
1168 y[
i] = -a[
i] + b[
i] * a_cos + c[
i] * a_sin;
1169 for (
i = 0;
i < 3;
i++)
1171 to->type = from->type;
1176 double a[DIMENSION], b[DIMENSION], c[DIMENSION];
1177 double centerpoint[DIMENSION];
1182 printf(
"Trying sn axis for the triplet (%d,%d,%d)\n", ia, ib, ic);
1185 for (
i = 0;
i < DIMENSION;
i++) {
1190 for (
i = 0, r = 0;
i < DIMENSION;
i++) {
1191 centerpoint[
i] = a[
i] + c[
i] + 2 * b[
i];
1192 r += centerpoint[
i] * centerpoint[
i];
1199 " atoms can not define improper axis of the order more than 2\n");
1202 for (
i = 0;
i < DIMENSION;
i++)
1203 centerpoint[
i] /= r;
1204 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1205 r += centerpoint[
i] * b[
i];
1206 for (
i = 0;
i < DIMENSION;
i++)
1207 b[
i] = 2 * r * centerpoint[
i] - b[
i];
1211 printf(
" no coherent improper axis is defined by the points\n");
1217 printf(
" refinement failed for the s%d axis\n", axis->
order);
1230 double coord_sum[DIMENSION];
1233 for (
j = 0;
j < DIMENSION;
j++)
1236 for (
j = 0;
j < DIMENSION;
j++)
1239 for (
j = 0;
j < DIMENSION;
j++)
1242 printf(
"Center of something is at %15.10f, %15.10f, %15.10f\n",
1246 fprintf(
stderr,
"Unable to allocate array for the distances\n");
1250 for (
j = 0, r = 0;
j < DIMENSION;
j++)
1261 if (plane != NULL) {
1267 perror(
"Out of memory in find_planes");
1281 perror(
"Out of memory in find_planes");
1328 perror(
"Out of memory in find_infinity_axes()");
1337 double center[DIMENSION];
1338 double *distances = calloc(
AtomsCount,
sizeof(
double));
1342 if (distances == NULL) {
1343 fprintf(
stderr,
"Out of memory in find_c2_axes()\n");
1347 for (
j = 0;
j <
i;
j++) {
1356 for (k = 0, r = 0; k < DIMENSION; k++) {
1367 perror(
"Out of memory in find_c2_axes");
1384 perror(
"Out of memory in find_c2_axes");
1394 for (
l = 0, r = 0;
l < DIMENSION;
l++)
1396 distances[k] =
sqrt(r);
1406 for (m = 0; m < DIMENSION; m++)
1413 perror(
"Out of memory in find_c2_axes");
1467 perror(
"Out of memory in find_higher_axes");
1489 perror(
"Out of memory in find_higher_axes");
1503 printf(
"There are no planes of symmetry in the molecule\n");
1506 printf(
"There is a plane of symmetry in the molecule\n");
1508 printf(
"There are %d planes of symmetry in the molecule\n",
PlanesCount);
1510 " Residual Direction of the normal Distance\n");
1512 printf(
"%3d %8.4e ",
i,
Planes[
i]->maxdev);
1513 printf(
"(%11.8f,%11.8f,%11.8f) ",
Planes[
i]->normal[0],
1522 printf(
"There is no inversion center in the molecule\n");
1524 printf(
"There in an inversion center in the molecule\n");
1525 printf(
" Residual Position\n");
1527 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1538 printf(
"There are no normal axes in the molecule\n");
1541 printf(
"There is a normal axis in the molecule\n");
1543 printf(
"There are %d normal axes in the molecule\n",
NormalAxesCount);
1544 printf(
" Residual Order Direction of the axis "
1545 " Supporting point\n");
1552 printf(
"(%11.8f,%11.8f,%11.8f) ",
NormalAxes[
i]->direction[0],
1554 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1566 printf(
"There are no improper axes in the molecule\n");
1569 printf(
"There is an improper axis in the molecule\n");
1572 printf(
" Residual Order Direction of the axis "
1573 " Supporting point\n");
1580 printf(
"(%11.8f,%11.8f,%11.8f) ",
ImproperAxes[
i]->direction[0],
1582 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1594 printf(
" %10ld candidates examined\n"
1595 " %10ld removed early\n"
1596 " %10ld removed during initial mating stage\n"
1597 " %10ld removed as duplicates\n"
1598 " %10ld removed because of the wrong transformation order\n"
1599 " %10ld removed after unsuccessful optimization\n"
1600 " %10ld accepted\n",
1610 printf(
"Looking for the inversion center\n");
1615 printf(
"Looking for the planes of symmetry\n");
1620 printf(
"Looking for infinity axis\n");
1625 printf(
"Looking for C2 axes\n");
1630 printf(
"Looking for higher axes\n");
1635 printf(
"Looking for the improper axes\n");
1646 int i, order_a, order_b;
1648 order_a = axis_a->
order;
1651 order_b = axis_b->
order;
1654 if ((
i = order_b - order_a) != 0)
1697 char *symmetry_code =
1702 if (symmetry_code == NULL) {
1703 fprintf(
stderr,
"Unable to allocate memory for symmetry ID code in "
1704 "report_symmetry_elements_brief()\n");
1711 printf(
"Molecule has no symmetry elements\n");
1714 printf(
"Molecule has the following symmetry elements: ");
1716 strcat(symmetry_code,
"(i) ");
1718 strcat(symmetry_code,
"(Cinf) ");
1721 strcat(symmetry_code, buf);
1725 sprintf(buf,
"(C%d) ",
i);
1726 strcat(symmetry_code, buf);
1730 strcat(symmetry_code, buf);
1735 sprintf(buf,
"(S%d) ",
i);
1736 strcat(symmetry_code, buf);
1740 strcat(symmetry_code, buf);
1744 strcat(symmetry_code,
"(sigma) ");
1747 strcat(symmetry_code, buf);
1750 printf(
"%s\n", symmetry_code);
1757 int last_matching = -1;
1758 int matching_count = 0;
1760 for (
i = 0;
i < PointGroupsCount;
i++) {
1767 printf(
"It looks very much like %s, but it is not since %s\n",
1773 if (matching_count == 0) {
1774 printf(
"These symmetry elements match no point group I know of. Sorry.\n");
1776 if (matching_count > 1) {
1777 printf(
"These symmetry elements match more than one group I know of.\n"
1778 "SOMETHING IS VERY WRONG\n");
1779 printf(
"Matching groups are:\n");
1780 for (
i = 0;
i < PointGroupsCount;
i++) {
1787 if (
verbose > 0 && matching_count == 1) {
1788 printf(
"It seems to be the %s point group\n",
1792 *point_group = last_matching;
1799void FC_FUNC_(symmetries_finite_init,
1800 SYMMETRIES_FINITE_INIT)(
const int *natoms,
const int *types,
1801 const double *positions,
1802 const int *verbosity,
int *point_group) {
1810 Atoms[
i].x[0] = positions[3 *
i + 0];
1811 Atoms[
i].x[1] = positions[3 *
i + 1];
1812 Atoms[
i].x[2] = positions[3 *
i + 2];
1824 printf(
"Refinement of some symmetry elements was terminated before "
1825 "convergence was reached.\n"
1826 "Some symmetry elements may remain unidentified.\n");
1836 strcpy(name,
PointGroups[*point_group].group_name);
1840 const int *point_group,
char * elements) {
1842 strncpy(elements,
PointGroups[*point_group].symmetry_code, strlen(elements));
1845void FC_FUNC_(symmetries_finite_end, SYMMETRIES_FINITE_END)() {
void * memcpy(void *__restrict __dest, const void *__restrict __src, size_t __n) __attribute__((__nothrow__
pure real(real64) function center(this)
Center of the filter interval.
real(real64) function s()
static double f(double w, void *p)
void(* transform_atom)(struct _SYMMETRY_ELEMENT_ *el, ATOM *from, ATOM *to)
SYMMETRY_ELEMENT * init_inversion_center(void)
char * PointGroupRejectionReason
void set_params(SYMMETRY_ELEMENT *elem, double values[])
SYMMETRY_ELEMENT * init_axis_parameters(double a[3], double b[3], double c[3])
void find_center_of_something(void)
static double OptChangeThreshold
SYMMETRY_ELEMENT * init_c2_axis(int i, int j, double support[3])
struct _SYMMETRY_ELEMENT_ SYMMETRY_ELEMENT
void report_improper_axes(void)
SYMMETRY_ELEMENT * init_mirror_plane(int i, int j)
int establish_pairs(SYMMETRY_ELEMENT *elem)
static SYMMETRY_ELEMENT ** NormalAxes
int compare_axes(const void *a, const void *b)
void FC_FUNC_(symmetries_finite_init, SYMMETRIES_FINITE_INIT) const
void destroy_inversion_centers(void)
void sort_symmetry_elements(void)
void find_improper_axes(void)
void find_inversion_centers(void)
void symmetries_finite_get_group_elements(const int *point_group, char *elements)
static double * DistanceFromCenter
double sin(double __x) __attribute__((__nothrow__
int check_transform_order(SYMMETRY_ELEMENT *elem)
static double TolerancePrimary
static int NormalAxesCount
void find_higher_axes(void)
void destroy_symmetry_element(SYMMETRY_ELEMENT *elem)
static double ToleranceSame
void symmetries_finite_get_group_name(const int *point_group, char *name)
void destroy_normal_axes()
static int ImproperAxesCount
double asin(double __x) __attribute__((__nothrow__
static char * SymmetryCode
void find_symmetry_elements(void)
double fabs(double __x) __attribute__((__nothrow__
static double GradientStep
void find_infinity_axis(void)
SYMMETRY_ELEMENT * alloc_symmetry_element(void)
static SYMMETRY_ELEMENT * MolecularPlane
void optimize_transformation_params(SYMMETRY_ELEMENT *elem)
POINT_GROUP PointGroups[]
static SYMMETRY_ELEMENT ** InversionCenters
void invert_atom(SYMMETRY_ELEMENT *center, ATOM *from, ATOM *to)
static double ToleranceFinal
SYMMETRY_ELEMENT * init_improper_axis(int ia, int ib, int ic)
static double CenterOfSomething[3]
double sqrt(double __x) __attribute__((__nothrow__
void report_symmetry_elements_brief()
double eval_optimization_target_function(SYMMETRY_ELEMENT *elem, int *finish)
void summarize_symmetry_elements(void)
SYMMETRY_ELEMENT * init_ultimate_plane(void)
void destroy_improper_axes()
void report_symmetry_elements_verbose(void)
static int BadOptimization
int check_transform_quality(SYMMETRY_ELEMENT *elem)
static int * NormalAxesCounts
static SYMMETRY_ELEMENT ** Planes
void rotate_atom(SYMMETRY_ELEMENT *axis, ATOM *from, ATOM *to)
double cos(double __x) __attribute__((__nothrow__
void report_and_reset_counters(void)
void destroy_planes(void)
void identify_point_group(int *point_group)
void report_inversion_centers(void)
void rotate_reflect_atom(SYMMETRY_ELEMENT *axis, ATOM *from, ATOM *to)
void get_params(SYMMETRY_ELEMENT *elem, double values[])
double floor(double __x) __attribute__((__nothrow__
int same_transform(SYMMETRY_ELEMENT *a, SYMMETRY_ELEMENT *b)
void mirror_atom(SYMMETRY_ELEMENT *plane, ATOM *from, ATOM *to)
static int InversionCentersCount
SYMMETRY_ELEMENT * init_ultimate_axis(void)
static int * ImproperAxesCounts
SYMMETRY_ELEMENT * init_higher_axis(int ia, int ib, int ic)
static SYMMETRY_ELEMENT ** ImproperAxes
int refine_symmetry_element(SYMMETRY_ELEMENT *elem, int build_table)
real(real64) function values(xx)
void distance(const int iatom, const int jatom, const double coordinates[], double *rr, double *rr2, double *rr6, double *rr7)