Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563665 views
1
#include "typedef.h"
2
#include "name.h"
3
#include "tools.h"
4
#include "matrix.h"
5
#include "getput.h"
6
#include "bravais.h"
7
#include "contrib.h"
8
#include "sort.h"
9
#include "datei.h"
10
11
#define HM_TABLE TOPDIR "/tables/qcatalog/translation_HM_symbol"
12
13
14
static void remove_underscore(char *s)
15
{
16
17
char *PP;
18
19
PP = strchr(s,'_');
20
while (PP){
21
*PP=' ';
22
PP = strchr(PP,'_');
23
}
24
25
}
26
27
/*************************************************************************
28
@ void display_HM_symbol(char *qname,
29
@ int zname1,
30
@ int zname2,
31
@ MP_INT *aff_name)
32
**************************************************************************/
33
void display_HM_symbol(char *qname,
34
int zname1,
35
int zname2,
36
MP_INT *aff_name)
37
{
38
39
int number,
40
i,
41
z1in,
42
z2in,
43
found=0;
44
45
FILE *F;
46
47
char qin[1028],
48
affin[128],
49
affstring[128],
50
HMSYMBOL[128];
51
52
mpz_get_str(affstring,10,aff_name);
53
54
F = fopen(HM_TABLE,"r");
55
56
if (F == NULL){
57
fprintf(stderr,"can't open %s\n",HM_TABLE);
58
exit(4);
59
}
60
61
fscanf(F,"#%d\n",&number);
62
63
fprintf(stdout,"possible Herman-Mauguin symbols describing a group\n");
64
fprintf(stdout,"isomorphic to the given one: \n");
65
66
for (i=0;i<number;i++){
67
fscanf(F,"qname: %s zname: %d %d aff_name: %s %s\n",
68
qin,&z1in,&z2in,affin,HMSYMBOL);
69
70
if (strcmp(qin,qname) == 0
71
&& z1in == zname1
72
&& z2in == zname2
73
&& strcmp(affstring,affin) == 0){
74
75
if (found > 0) fprintf(stdout," or ");
76
remove_underscore(HMSYMBOL);
77
fprintf(stdout,"%s",HMSYMBOL);
78
found++;
79
}
80
81
}
82
83
fprintf(stdout,"\n");
84
85
if (found == 0){
86
fprintf(stderr,"error in display_HM_symbol\n");
87
exit(3);
88
}
89
90
return;
91
}
92
93
94