131int true(void) {
return 1; }
134 {
"Cs",
"(sigma) ",
true},
135 {
"Ci",
"(i) ",
true},
136 {
"C2",
"(C2) ",
true},
137 {
"C3",
"(C3) ",
true},
138 {
"C4",
"(C4) (C2) ",
true},
139 {
"C5",
"(C5) ",
true},
140 {
"C6",
"(C6) (C3) (C2) ",
true},
141 {
"C7",
"(C7) ",
true},
142 {
"C8",
"(C8) (C4) (C2) ",
true},
143 {
"D2",
"3*(C2) ",
true},
144 {
"D3",
"(C3) 3*(C2) ",
true},
145 {
"D4",
"(C4) 5*(C2) ",
true},
146 {
"D5",
"(C5) 5*(C2) ",
true},
147 {
"D6",
"(C6) (C3) 7*(C2) ",
true},
148 {
"D7",
"(C7) 7*(C2) ",
true},
149 {
"D8",
"(C8) (C4) 9*(C2) ",
true},
150 {
"C2v",
"(C2) 2*(sigma) ",
true},
151 {
"C3v",
"(C3) 3*(sigma) ",
true},
152 {
"C4v",
"(C4) (C2) 4*(sigma) ",
true},
153 {
"C5v",
"(C5) 5*(sigma) ",
true},
154 {
"C6v",
"(C6) (C3) (C2) 6*(sigma) ",
true},
155 {
"C7v",
"(C7) 7*(sigma) ",
true},
156 {
"C8v",
"(C8) (C4) (C2) 8*(sigma) ",
true},
157 {
"C2h",
"(i) (C2) (sigma) ",
true},
158 {
"C3h",
"(C3) (S3) (sigma) ",
true},
159 {
"C4h",
"(i) (C4) (C2) (S4) (sigma) ",
true},
160 {
"C5h",
"(C5) (S5) (sigma) ",
true},
161 {
"C6h",
"(i) (C6) (C3) (C2) (S6) (S3) (sigma) ",
true},
162 {
"C7h",
"(C7) (S7) (sigma) ",
true},
163 {
"C8h",
"(i) (C8) (C4) (C2) (S8) (S4) (sigma) ",
true},
164 {
"D2h",
"(i) 3*(C2) 3*(sigma) ",
true},
165 {
"D3h",
"(C3) 3*(C2) (S3) 4*(sigma) ",
true},
166 {
"D4h",
"(i) (C4) 5*(C2) (S4) 5*(sigma) ",
true},
167 {
"D5h",
"(C5) 5*(C2) (S5) 6*(sigma) ",
true},
168 {
"D6h",
"(i) (C6) (C3) 7*(C2) (S6) (S3) 7*(sigma) ",
true},
169 {
"D7h",
"(C7) 7*(C2) (S7) 8*(sigma) ",
true},
170 {
"D8h",
"(i) (C8) (C4) 9*(C2) (S8) (S4) 9*(sigma) ",
true},
171 {
"D2d",
"3*(C2) (S4) 2*(sigma) ",
true},
172 {
"D3d",
"(i) (C3) 3*(C2) (S6) 3*(sigma) ",
true},
173 {
"D4d",
"(C4) 5*(C2) (S8) 4*(sigma) ",
true},
174 {
"D5d",
"(i) (C5) 5*(C2) (S10) 5*(sigma) ",
true},
175 {
"D6d",
"(C6) (C3) 7*(C2) (S12) (S4) 6*(sigma) ",
true},
176 {
"D7d",
"(i) (C7) 7*(C2) (S14) 7*(sigma) ",
true},
177 {
"D8d",
"(C8) (C4) 9*(C2) (S16) 8*(sigma) ",
true},
178 {
"S4",
"(C2) (S4) ",
true},
179 {
"S6",
"(i) (C3) (S6) ",
true},
180 {
"S8",
"(C4) (C2) (S8) ",
true},
181 {
"T",
"4*(C3) 3*(C2) ",
true},
182 {
"Th",
"(i) 4*(C3) 3*(C2) 4*(S6) 3*(sigma) ",
true},
183 {
"Td",
"4*(C3) 3*(C2) 3*(S4) 6*(sigma) ",
true},
184 {
"O",
"3*(C4) 4*(C3) 9*(C2) ",
true},
185 {
"Oh",
"(i) 3*(C4) 4*(C3) 9*(C2) 4*(S6) 3*(S4) 9*(sigma) ",
true},
186 {
"Cinfv",
"(Cinf) (sigma) ",
true},
187 {
"Dinfh",
"(i) (Cinf) (C2) 2*(sigma) ",
true},
188 {
"I",
"6*(C5) 10*(C3) 15*(C2) ",
true},
189 {
"Ih",
"(i) 6*(C5) 10*(C3) 15*(C2) 6*(S10) 10*(S6) 15*(sigma) ",
true},
190 {
"Kh",
"(i) (Cinf) (sigma) ",
true},
192#define PointGroupsCount (sizeof(PointGroups) / sizeof(POINT_GROUP))
199double pow2(
double x) {
return x * x; }
207 if (atom_used == NULL) {
208 fprintf(
stderr,
"Out of memory for tagging array in establish_pairs()\n");
214 printf(
" looking for a pair for %d\n",
i);
217 printf(
" new coordinates are: (%g,%g,%g)\n", symmetric.x[0],
218 symmetric.x[1], symmetric.x[2]);
222 if (
Atoms[
j].type != symmetric.type || atom_used[
j])
224 for (k = 0,
distance = 0; k < DIMENSION; k++) {
229 printf(
" distance to %d is %g\n",
j,
distance);
238 printf(
" no pair for atom %d - best was %d with err = %g\n",
i,
239 best_j, best_distance);
244 atom_used[best_j] = 1;
246 printf(
" atom %d transforms to the atom %d, err = %g\n",
i,
247 best_j, best_distance);
270 printf(
" transform looped %d steps too early from atom %d\n",
280 printf(
" (improper) transform looped %d steps too early "
289 printf(
" transform failed to loop after %d steps from atom %d\n",
327 fprintf(
stderr,
"Out of memory allocating symmetry element\n");
333 "Out of memory allocating transform table for symmetry element\n");
358 for (k = 0, r = 0; k < DIMENSION; k++) {
364 printf(
" distance to symmetric atom (%g) is too big for %d\n", r,
378 double target, r, maxr;
381 for (k = 0, r = 0; k < DIMENSION; k++) {
386 fprintf(
stderr,
"Normal collapsed!\n");
389 for (k = 0; k < DIMENSION; k++) {
394 for (k = 0; k < DIMENSION; k++) {
400 for (k = 0, r = 0; k < DIMENSION; k++) {
405 fprintf(
stderr,
"Direction collapsed!\n");
408 for (k = 0; k < DIMENSION; k++) {
415 for (k = 0, r = 0; k < DIMENSION; k++) {
422 if (finish != NULL) {
440 double grad[MAXPARAM];
441 double force[MAXPARAM];
442 double step[MAXPARAM];
443 double f, fold, fnew, fnew2, fdn, fup, snorm;
450 if (
vars > MAXPARAM) {
451 fprintf(
stderr,
"Catastrophe in optimize_transformation_params()!\n");
460 printf(
" function value = %g\n", f);
463 printf(
" function value is small enough\n");
473 printf(
" no progress is made, stop optimization\n");
489 printf(
" i = %d, grad = %12.6e, force = %12.6e\n",
i, grad[
i],
493 for (
i = 0, snorm = 0;
i <
vars;
i++) {
495 force[
i] = -force[
i];
500 step[
i] = -grad[
i] / force[
i];
501 snorm += step[
i] * step[
i];
531 printf(
" interpolation base points: %g, %g, %g\n", f, fnew,
535 a = (4 * f - fnew2 - 3 * fnew) / 2;
536 b = (f + fnew2 - 2 * fnew) / 2;
538 printf(
" linear interpolation coefficients %g, %g\n", a, b);
541 if (x > 0.2 && x < 1.8) {
543 printf(
" interpolated: %g\n", x);
566 printf(
" maximum number of optimization cycles made\n");
567 printf(
" optimization completed after %d cycles with f = %g\n",
578 printf(
" no transformation correspondence table can be "
586 printf(
" transformation is identical to plane %d\n",
i);
594 printf(
" transformation is identical to inversion center %d\n",
603 printf(
" transformation is identical to normal axis %d\n",
i);
611 printf(
" transformation is identical to improper axis %d\n",
i);
618 printf(
" incorrect transformation order\n");
625 printf(
" refined transformation does not pass the numeric "
641 for (
i = 0, r = plane->
distance;
i < DIMENSION;
i++) {
644 to->type = from->type;
645 for (
i = 0;
i < DIMENSION;
i++) {
646 to->x[
i] = from->x[
i] + 2 * r * plane->
normal[
i];
652 double dx[DIMENSION], midpoint[DIMENSION], rab, r;
656 printf(
"Trying mirror plane for atoms %d,%d\n",
i,
j);
661 for (k = 0, rab = 0; k < DIMENSION; k++) {
664 rab += dx[k] * dx[k];
668 fprintf(
stderr,
"Atoms %d and %d coincide (r = %g)\n",
i,
j, rab);
671 for (k = 0, r = 0; k < DIMENSION; k++) {
672 plane->
normal[k] = dx[k] / rab;
673 r += midpoint[k] * plane->
normal[k];
677 for (k = 0; k < DIMENSION; k++) {
683 printf(
" initial plane is at %g from the origin\n", r);
686 printf(
" refinement failed for the plane\n");
695 double d0[DIMENSION], d1[DIMENSION], d2[DIMENSION];
697 double r, s0, s1, s2;
702 printf(
"Trying whole-molecule mirror plane\n");
707 for (k = 0; k < DIMENSION; k++)
708 d0[k] = d1[k] = d2[k] = 0;
713 for (
j = 0;
j <
i;
j++) {
714 for (k = 0, r = 0; k < DIMENSION; k++) {
719 for (k = 0, s0 = s1 = s2 = 0; k < DIMENSION; k++) {
725 for (k = 0; k < DIMENSION; k++) {
732 for (k = 0, s0 = s1 = s2 = 0; k < DIMENSION; k++) {
738 if (s0 >= s1 && s0 >= s2)
740 if (s1 >= s0 && s1 >= s2)
742 if (s2 >= s0 && s2 >= s1)
746 "Catastrophe in init_ultimate_plane(): %g, %g and %g have no "
751 for (k = 0, r = 0; k < DIMENSION; k++)
755 for (k = 0; k < DIMENSION; k++)
756 plane->
normal[k] = d[k] / r;
758 for (k = 1; k < DIMENSION; k++)
762 for (k = 0, r = 0; k < DIMENSION; k++)
769 printf(
" refinement failed for the plane\n");
781 to->type = from->type;
782 for (
i = 0;
i < DIMENSION;
i++) {
793 printf(
"Trying inversion center at the center of something\n");
798 for (k = 0, r = 0; k < DIMENSION; k++)
802 for (k = 0; k < DIMENSION; k++)
806 for (k = 1; k < DIMENSION; k++)
811 printf(
" initial inversion center is at %g from the origin\n", r);
814 printf(
" refinement failed for the inversion center\n");
825 double x[3], y[3], a[3], b[3], c[3];
826 double angle = axis->
order ? 2 * M_PI / axis->
order : 1.0;
827 double a_sin =
sin(angle);
828 double a_cos =
cos(angle);
832 if (DIMENSION != 3) {
833 fprintf(
stderr,
"Catastrophe in rotate_atom!\n");
836 for (
i = 0;
i < 3;
i++)
838 for (
i = 0, dot = 0;
i < 3;
i++)
847 for (
i = 0;
i < 3;
i++)
848 y[
i] = a[
i] + b[
i] * a_cos + c[
i] * a_sin;
849 for (
i = 0;
i < 3;
i++)
851 to->type = from->type;
856 double dir[DIMENSION], rel[DIMENSION];
861 printf(
"Trying infinity axis\n");
866 for (k = 0; k < DIMENSION; k++)
869 for (k = 0,
s = 0; k < DIMENSION; k++) {
871 s += rel[k] * dir[k];
874 for (k = 0; k < DIMENSION; k++)
877 for (k = 0; k < DIMENSION; k++)
880 for (k = 0,
s = 0; k < DIMENSION; k++)
884 for (k = 0; k < DIMENSION; k++)
888 for (k = 0; k < DIMENSION; k++)
890 for (k = 0,
s = 0; k < DIMENSION; k++)
894 for (k = 0; k < DIMENSION; k++)
897 for (k = 1; k < DIMENSION; k++)
906 printf(
" refinement failed for the infinity axis\n");
917 double r,
center[DIMENSION];
920 printf(
"Trying c2 axis for the pair (%d,%d) with the support (%g,%g,%g)\n",
921 i,
j, support[0], support[1], support[2]);
924 for (k = 0, ris = rjs = 0; k < DIMENSION; k++) {
933 printf(
" Support can't actually define a rotation axis\n");
940 for (k = 0, r = 0; k < DIMENSION; k++)
944 for (k = 0; k < DIMENSION; k++)
948 for (k = 1; k < DIMENSION; k++)
952 for (k = 0, r = 0; k < DIMENSION; k++) {
961 printf(
" c2 is underdefined, but there is a molecular plane\n");
962 for (k = 0; k < DIMENSION; k++)
966 printf(
" c2 is underdefined, trying random direction\n");
967 for (k = 0; k < DIMENSION; k++)
978 for (k = 0, r = 0; k < DIMENSION; k++)
981 for (k = 0; k < DIMENSION; k++)
985 for (k = 0; k < DIMENSION; k++)
990 printf(
" refinement failed for the c2 axis\n");
1000 double ra, rb, rc, rab, rbc, rac, r;
1003 ra = rb = rc = rab = rbc = rac = 0;
1004 for (
i = 0;
i < DIMENSION;
i++) {
1016 printf(
" points are not on a sphere\n");
1019 for (
i = 0;
i < DIMENSION;
i++) {
1020 rab += (a[
i] - b[
i]) * (a[
i] - b[
i]);
1021 rac += (a[
i] - c[
i]) * (a[
i] - c[
i]);
1022 rbc += (c[
i] - b[
i]) * (c[
i] - b[
i]);
1030 printf(
" points can't be rotation-equivalent\n");
1036 printf(
" rotation is underdefined by these points\n");
1039 rab = (rab + rbc) / 2;
1040 angle = M_PI - 2 *
asin(rac / (2 * rab));
1042 printf(
" rotation angle is %f\n", angle);
1046 printf(
" atoms are too close to a straight line\n");
1049 order =
floor((2 * M_PI) / angle + 0.5);
1053 printf(
" rotation axis order (%d) is not from 3 to %d\n", order,
1058 axis->
order = order;
1060 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1064 for (
i = 0;
i < DIMENSION;
i++)
1068 for (
i = 1;
i < DIMENSION;
i++)
1073 (b[1] - a[1]) * (c[2] - b[2]) - (b[2] - a[2]) * (c[1] - b[1]);
1075 (b[2] - a[2]) * (c[0] - b[0]) - (b[0] - a[0]) * (c[2] - b[2]);
1077 (b[0] - a[0]) * (c[1] - b[1]) - (b[1] - a[1]) * (c[0] - b[0]);
1095 for (
i = 0;
i < DIMENSION;
i++)
1097 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1100 for (
i = 0;
i < DIMENSION;
i++)
1103 printf(
" axis origin is at (%g,%g,%g)\n",
1106 printf(
" axis is in the direction (%g,%g,%g)\n", axis->
direction[0],
1114 double a[DIMENSION], b[DIMENSION], c[DIMENSION];
1118 printf(
"Trying cn axis for the triplet (%d,%d,%d)\n", ia, ib, ic);
1121 for (
i = 0;
i < DIMENSION;
i++) {
1128 printf(
" no coherent axis is defined by the points\n");
1134 printf(
" refinement failed for the c%d axis\n", axis->
order);
1147 double x[3], y[3], a[3], b[3], c[3];
1148 double angle = 2 * M_PI / axis->
order;
1149 double a_sin =
sin(angle);
1150 double a_cos =
cos(angle);
1154 if (DIMENSION != 3) {
1155 fprintf(
stderr,
"Catastrophe in rotate_reflect_atom!\n");
1158 for (
i = 0;
i < 3;
i++)
1160 for (
i = 0, dot = 0;
i < 3;
i++)
1169 for (
i = 0;
i < 3;
i++)
1170 y[
i] = -a[
i] + b[
i] * a_cos + c[
i] * a_sin;
1171 for (
i = 0;
i < 3;
i++)
1173 to->type = from->type;
1178 double a[DIMENSION], b[DIMENSION], c[DIMENSION];
1179 double centerpoint[DIMENSION];
1184 printf(
"Trying sn axis for the triplet (%d,%d,%d)\n", ia, ib, ic);
1187 for (
i = 0;
i < DIMENSION;
i++) {
1192 for (
i = 0, r = 0;
i < DIMENSION;
i++) {
1193 centerpoint[
i] = a[
i] + c[
i] + 2 * b[
i];
1194 r += centerpoint[
i] * centerpoint[
i];
1201 " atoms can not define improper axis of the order more than 2\n");
1204 for (
i = 0;
i < DIMENSION;
i++)
1205 centerpoint[
i] /= r;
1206 for (
i = 0, r = 0;
i < DIMENSION;
i++)
1207 r += centerpoint[
i] * b[
i];
1208 for (
i = 0;
i < DIMENSION;
i++)
1209 b[
i] = 2 * r * centerpoint[
i] - b[
i];
1213 printf(
" no coherent improper axis is defined by the points\n");
1219 printf(
" refinement failed for the s%d axis\n", axis->
order);
1232 double coord_sum[DIMENSION];
1235 for (
j = 0;
j < DIMENSION;
j++)
1238 for (
j = 0;
j < DIMENSION;
j++)
1241 for (
j = 0;
j < DIMENSION;
j++)
1244 printf(
"Center of something is at %15.10f, %15.10f, %15.10f\n",
1248 fprintf(
stderr,
"Unable to allocate array for the distances\n");
1252 for (
j = 0, r = 0;
j < DIMENSION;
j++)
1263 if (plane != NULL) {
1269 perror(
"Out of memory in find_planes");
1283 perror(
"Out of memory in find_planes");
1330 perror(
"Out of memory in find_infinity_axes()");
1339 double center[DIMENSION];
1340 double *distances = calloc(
AtomsCount,
sizeof(
double));
1344 if (distances == NULL) {
1345 fprintf(
stderr,
"Out of memory in find_c2_axes()\n");
1349 for (
j = 0;
j <
i;
j++) {
1358 for (k = 0, r = 0; k < DIMENSION; k++) {
1369 perror(
"Out of memory in find_c2_axes");
1386 perror(
"Out of memory in find_c2_axes");
1396 for (
l = 0, r = 0;
l < DIMENSION;
l++)
1398 distances[k] =
sqrt(r);
1408 for (m = 0; m < DIMENSION; m++)
1415 perror(
"Out of memory in find_c2_axes");
1469 perror(
"Out of memory in find_higher_axes");
1491 perror(
"Out of memory in find_higher_axes");
1505 printf(
"There are no planes of symmetry in the molecule\n");
1508 printf(
"There is a plane of symmetry in the molecule\n");
1510 printf(
"There are %d planes of symmetry in the molecule\n",
PlanesCount);
1512 " Residual Direction of the normal Distance\n");
1514 printf(
"%3d %8.4e ",
i,
Planes[
i]->maxdev);
1515 printf(
"(%11.8f,%11.8f,%11.8f) ",
Planes[
i]->normal[0],
1524 printf(
"There is no inversion center in the molecule\n");
1526 printf(
"There in an inversion center in the molecule\n");
1527 printf(
" Residual Position\n");
1529 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1540 printf(
"There are no normal axes in the molecule\n");
1543 printf(
"There is a normal axis in the molecule\n");
1545 printf(
"There are %d normal axes in the molecule\n",
NormalAxesCount);
1546 printf(
" Residual Order Direction of the axis "
1547 " Supporting point\n");
1554 printf(
"(%11.8f,%11.8f,%11.8f) ",
NormalAxes[
i]->direction[0],
1556 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1568 printf(
"There are no improper axes in the molecule\n");
1571 printf(
"There is an improper axis in the molecule\n");
1574 printf(
" Residual Order Direction of the axis "
1575 " Supporting point\n");
1582 printf(
"(%11.8f,%11.8f,%11.8f) ",
ImproperAxes[
i]->direction[0],
1584 printf(
"(%14.8f,%14.8f,%14.8f)\n",
1596 printf(
" %10ld candidates examined\n"
1597 " %10ld removed early\n"
1598 " %10ld removed during initial mating stage\n"
1599 " %10ld removed as duplicates\n"
1600 " %10ld removed because of the wrong transformation order\n"
1601 " %10ld removed after unsuccessful optimization\n"
1602 " %10ld accepted\n",
1612 printf(
"Looking for the inversion center\n");
1617 printf(
"Looking for the planes of symmetry\n");
1622 printf(
"Looking for infinity axis\n");
1627 printf(
"Looking for C2 axes\n");
1632 printf(
"Looking for higher axes\n");
1637 printf(
"Looking for the improper axes\n");
1648 int i, order_a, order_b;
1650 order_a = axis_a->
order;
1653 order_b = axis_b->
order;
1656 if ((
i = order_b - order_a) != 0)
1699 char *symmetry_code =
1704 if (symmetry_code == NULL) {
1705 fprintf(
stderr,
"Unable to allocate memory for symmetry ID code in "
1706 "report_symmetry_elements_brief()\n");
1713 printf(
"Molecule has no symmetry elements\n");
1716 printf(
"Molecule has the following symmetry elements: ");
1718 strcat(symmetry_code,
"(i) ");
1720 strcat(symmetry_code,
"(Cinf) ");
1723 strcat(symmetry_code, buf);
1727 sprintf(buf,
"(C%d) ",
i);
1728 strcat(symmetry_code, buf);
1732 strcat(symmetry_code, buf);
1737 sprintf(buf,
"(S%d) ",
i);
1738 strcat(symmetry_code, buf);
1742 strcat(symmetry_code, buf);
1746 strcat(symmetry_code,
"(sigma) ");
1749 strcat(symmetry_code, buf);
1752 printf(
"%s\n", symmetry_code);
1759 int last_matching = -1;
1760 int matching_count = 0;
1762 for (
i = 0;
i < PointGroupsCount;
i++) {
1769 printf(
"It looks very much like %s, but it is not since %s\n",
1775 if (matching_count == 0) {
1776 printf(
"These symmetry elements match no point group I know of. Sorry.\n");
1778 if (matching_count > 1) {
1779 printf(
"These symmetry elements match more than one group I know of.\n"
1780 "SOMETHING IS VERY WRONG\n");
1781 printf(
"Matching groups are:\n");
1782 for (
i = 0;
i < PointGroupsCount;
i++) {
1789 if (
verbose > 0 && matching_count == 1) {
1790 printf(
"It seems to be the %s point group\n",
1794 *point_group = last_matching;
1801void FC_FUNC_(symmetries_finite_init,
1802 SYMMETRIES_FINITE_INIT)(
const int *natoms,
const int *types,
1803 const double *positions,
1804 const int *verbosity,
int *point_group) {
1812 Atoms[
i].x[0] = positions[3 *
i + 0];
1813 Atoms[
i].x[1] = positions[3 *
i + 1];
1814 Atoms[
i].x[2] = positions[3 *
i + 2];
1826 printf(
"Refinement of some symmetry elements was terminated before "
1827 "convergence was reached.\n"
1828 "Some symmetry elements may remain unidentified.\n");
1835void FC_FUNC_(symmetries_finite_get_group_name,
1836 SYMMETRIES_FINITE_GET_GROUP_NAME)(
const int *point_group,
1837 STR_F_TYPE name STR_ARG1) {
1839 TO_F_STR1(
PointGroups[*point_group].group_name, name);
1842void FC_FUNC_(symmetries_finite_get_group_elements,
1843 SYMMETRIES_FINITE_GET_GROUP_ELEMENTS)(
1844 const int *point_group, STR_F_TYPE elements STR_ARG1) {
1846 TO_F_STR1(
PointGroups[*point_group].symmetry_code, elements);
1849void 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()
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 destroy_inversion_centers(void)
void sort_symmetry_elements(void)
void find_improper_axes(void)
void find_inversion_centers(void)
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 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)