CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Path: gap4r8 / pkg / carat / doc / carat.tex
Views: 418346
1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
\Chapter{Interface to CARAT}
3
4
The {GAP} interface to {\CARAT} consists of two parts, low level
5
interface routines to {\CARAT} functions on the one hand, and
6
comfortable high level {\GAP} functions on the other hand.
7
The high level functions, implemented in terms of the low level
8
functions, provide actually methods for functions and operations
9
declared in the {GAP} library.
10
11
Note that while (almost) all {\CARAT} functions should be accessible
12
from within {\GAP} by the low level interface routines, high level
13
interface routines are provided only for a small subset of the
14
{\CARAT} functions. Priority has been given to routines providing
15
functionality that has previously not been available in {\GAP}.
16
Further high level interface routines may be added in the future.
17
18
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
\Section{Action from the left and from the right}
20
21
In crystallography, the convention usually is that matrix groups
22
act from the left on column vectors. This convention is adopted
23
also in {\CARAT}. The low level interface routines described below
24
must respect this convention and provide {\CARAT} with data in the
25
expected format.
26
27
On the other hand, in {\GAP} the convention is that all groups
28
act from the right, in the case of matrix groups on row vectors.
29
However, in order to make {\GAP} accessible to crystallographers,
30
functions that are important in crystallography and for which it
31
matters which action is assumed, are provided in two variants,
32
one for each convention. The high level routines currently provided
33
by this package do not depend on which convention is assumed.
34
This may change, however, when further high level routines are
35
added in the future.
36
37
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38
\Section{CARAT input and output files}
39
40
{\CARAT} routines read their input from one or several input files,
41
and write the result to standard output. In order to use {\CARAT}
42
routines from within {\GAP}, the input must be prepared in suitably
43
formatted input files. A {\CARAT} command is then executed with these
44
input files, with standard output redirected to an output file,
45
which is read back into {\GAP} afterwards. This section describes
46
routines interfacing with {\CARAT} input and output files.
47
48
Working with {\CARAT} requires many temporary files. When the {\CARAT}
49
package is loaded, a temporary directory is created, where one can
50
put such files. The routine
51
52
\>CaratTmpFile( <filename> ) F
53
54
returns a file name <filename> in the {\CARAT} temporary directory, which
55
can be used to store temporary data. Of course, it is also possible
56
to use any other file name, for instance files in the current directory.
57
58
\>CaratShowFile( <filename> ) F
59
60
displays the contents of any text file on the terminal. This can be
61
used to inspect the contents of {\CARAT} input and output files.
62
63
Most {\CARAT} data files are in either of two formats. The first {\CARAT}
64
file type is the Matrix File, containing one or several matrices.
65
The following routines serve as interface to {\CARAT} Matrix Files.
66
67
\>CaratWriteMatrixFile( <filename>, <data> ) F
68
69
takes a file name and a matrix or a list of matrices, and writes the
70
matrix or matrices to the file.
71
72
\>CaratReadMatrixFile( <filename> ) F
73
74
reads a {\CARAT} matrix file, and returns a matrix or a list of matrices
75
read from the file.
76
77
The second {\CARAT} file type is the Bravais File, containing information
78
on a finite unimodular group. In { \GAP}, the contents of a Bravais File
79
is represented by a Bravais record, having the following components:
80
\beginitems
81
`generators' & generators of the finite unimodular group
82
83
`formspace' & basis of the space of invariant forms (optional)
84
85
`centerings' & list of centering matrices (optional)
86
87
`normalizer' & additional generators of the normalizer in GL(n,Z) (optional)
88
89
`centralizer' & additional generators of the centralizer in GL(n,Z) (optional)
90
91
`size' & size of the unimodular group (optional)
92
\enditems
93
94
The following routines serve as interface to {\CARAT} Bravais Files.
95
96
\>CaratWriteBravaisFile( <filename>, <data> ) F
97
98
takes a file name and a Bravais record, and writes the data in the
99
Bravais record to the file.
100
101
\>CaratReadBravaisFile( <filename> ) F
102
103
reads a Bravais File, and returns the resulting Bravais record.
104
105
Certain {\CARAT} programs produce output files containing several Bravais
106
records, possibly preceeded by a varying number of header lines.
107
108
\>CaratReadMultiBravaisFile( <filename> ) F
109
110
reads such a multi-Bravais file, and returns a record with the components
111
`info' and `groups'. `info' is the list of header lines before the first
112
Bravais record starts, and `groups' is the list of Bravais records read from
113
the file.
114
115
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116
\Section{Executing CARAT commands}
117
118
To execute a {\CARAT} program from within {\GAP}, some low level,
119
general purpose routines are provided in this package.
120
Higher level routines for certain {\CARAT} functions may be available
121
in the {\GAP} library or in other packages. These higher
122
level functions are expected to use the following low level routines,
123
so that changes in the low level interface will be transparent.
124
125
An arbitrary {\CARAT} program can be executed with the routine
126
127
\>CaratCommand( <command>, <args>, <outfile> ) F
128
129
where <command> is the name of a {\CARAT} program, <args> is a string
130
containing the command line arguments of the {\CARAT} program,
131
and <outfile> is the name of the file to which the output is to be
132
written. Example:
133
134
\begintt
135
gap> CaratCommand( "Z_equiv", "file1 file2", "file.out" );
136
\endtt
137
138
A short description of the arguments and options of any {\CARAT}
139
program can be obtained from the {\CARAT} online help facility with
140
141
\>CaratHelp( <command> ) F
142
143
where <command> is the name of the {\CARAT} program. CaratHelp executes
144
the program with the `-h' option, and writes the output to the
145
terminal. Example:
146
147
\begintt
148
gap> CaratHelp( "Z_equiv" );
149
\endtt
150
151
A list of all {\CARAT} programs, along with a description of their
152
usage and functionality, can be found in the {\CARAT} documentation
153
(in HTML), in the file
154
155
\begintt
156
documentation/introduction.html
157
\endtt
158
159
in the {\CARAT} home directory.
160
161
162
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163
\Section{Methods provided by CARAT}
164
165
{\CARAT} implements methods for the following functions and operations
166
declared in the {\GAP} library. For a detailed description of these
167
functions, please consult the {\GAP} manual (section
168
"ref:Matrix Groups in Characteristic 0").
169
170
\>BravaisGroup( <G> ) A
171
172
\>IsBravaisGroup( <G> ) P
173
174
\>BravaisSubgroups( <G> ) A
175
176
\>BravaisSupergroups( <G> ) A
177
178
\>NormalizerInGLnZBravaisGroup( <G> ) A
179
180
\>`Normalizer( GL(<n>, Integers), <G> )'{Normalizer!in GLnZ}@{in GLnZ} O
181
182
\>`Centralizer( GL(<n>, Integers), <G> )'{Centralizer!in GLnZ}@{in GLnZ} O
183
184
\>ZClassRepsQClass( <G> ) A
185
186
\>`RepresentativeAction( GL(<n>,Integers), <G1>, <G2> )'{RepresentativeAction!in GLnZ}@{in GLnZ} O
187
188
189
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
\Section{CARAT Bravais Catalog}
191
192
{\CARAT} contains a catalog with $\Z$-class representatives of all
193
Bravais groups of dimension up to 6. These Bravais groups are
194
accessed via a crystal family symbol.
195
196
\>`CaratCrystalFamilies[d]'{CaratCrystalFamilies}@{`CaratCrystalFamilies'} V
197
198
returns a list of inequivalent crystal family symbols in dimension <d>.
199
200
\>BravaisGroupsCrystalFamily( <symb> ) F
201
202
returns a list of $\Z$-class representatives of the Bravais groups
203
in the crystal family with symbol <symb>.
204
205
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
206
\Section{CARAT Q-Class Catalog}
207
208
{\CARAT} contains a catalog with representatives of all $Q$-classes of
209
finite unimodular groups up to dimension~6. This catalog can be accessd
210
with the function
211
212
\>CaratQClassCatalog( <grp>, <mode> ) F
213
214
where <grp> is a finite unimodular group of dimension up to 6, and
215
<mode> is an integer. This function returns a record with one or
216
several of the following components, depending on the decomposition of
217
$mode = n_{0} + n_{1} * 2 + n_{2} * 4$ into powers of 2:
218
\beginitems
219
`qclass' & Q-class symbol; this component is always present
220
221
`familysymb' & crystal family symbol (present if $n_{0} \<> 0$)
222
223
`trans' & transformation to standard representative of Q-class:
224
<grp>\^{}<trans> = <std>
225
(present if $n_{1} \<> 0$)
226
227
`group' & standard representative of Q-class of <grp>
228
(present if $n_{2} \<> 0$ )
229
\enditems
230
231
If <G1> and <G2> are two unimodular groups,
232
233
\>ConjugatorQClass( <G1>, <G2> ) F
234
235
returns a rational matrix <m> such that <G1>\^{}<m> = <G2>, or fail, if
236
the groups are not in the same Q-class. Since this function uses the
237
{\CARAT} Q-class catalog, only groups up to dimension 6 are supported.
238
If this dimension is exceeded, an error is reported.
239
240
241
242