Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1\Chapter{Interface to CARAT}23The {GAP} interface to {\CARAT} consists of two parts, low level4interface routines to {\CARAT} functions on the one hand, and5comfortable high level {\GAP} functions on the other hand.6The high level functions, implemented in terms of the low level7functions, provide actually methods for functions and operations8declared in the {GAP} library.910Note that while (almost) all {\CARAT} functions should be accessible11from within {\GAP} by the low level interface routines, high level12interface routines are provided only for a small subset of the13{\CARAT} functions. Priority has been given to routines providing14functionality that has previously not been available in {\GAP}.15Further high level interface routines may be added in the future.1617%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%18\Section{Action from the left and from the right}1920In crystallography, the convention usually is that matrix groups21act from the left on column vectors. This convention is adopted22also in {\CARAT}. The low level interface routines described below23must respect this convention and provide {\CARAT} with data in the24expected format.2526On the other hand, in {\GAP} the convention is that all groups27act from the right, in the case of matrix groups on row vectors.28However, in order to make {\GAP} accessible to crystallographers,29functions that are important in crystallography and for which it30matters which action is assumed, are provided in two variants,31one for each convention. The high level routines currently provided32by this package do not depend on which convention is assumed.33This may change, however, when further high level routines are34added in the future.3536%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%37\Section{CARAT input and output files}3839{\CARAT} routines read their input from one or several input files,40and write the result to standard output. In order to use {\CARAT}41routines from within {\GAP}, the input must be prepared in suitably42formatted input files. A {\CARAT} command is then executed with these43input files, with standard output redirected to an output file,44which is read back into {\GAP} afterwards. This section describes45routines interfacing with {\CARAT} input and output files.4647Working with {\CARAT} requires many temporary files. When the {\CARAT}48package is loaded, a temporary directory is created, where one can49put such files. The routine5051\>CaratTmpFile( <filename> ) F5253returns a file name <filename> in the {\CARAT} temporary directory, which54can be used to store temporary data. Of course, it is also possible55to use any other file name, for instance files in the current directory.5657\>CaratShowFile( <filename> ) F5859displays the contents of any text file on the terminal. This can be60used to inspect the contents of {\CARAT} input and output files.6162Most {\CARAT} data files are in either of two formats. The first {\CARAT}63file type is the Matrix File, containing one or several matrices.64The following routines serve as interface to {\CARAT} Matrix Files.6566\>CaratWriteMatrixFile( <filename>, <data> ) F6768takes a file name and a matrix or a list of matrices, and writes the69matrix or matrices to the file.7071\>CaratReadMatrixFile( <filename> ) F7273reads a {\CARAT} matrix file, and returns a matrix or a list of matrices74read from the file.7576The second {\CARAT} file type is the Bravais File, containing information77on a finite unimodular group. In { \GAP}, the contents of a Bravais File78is represented by a Bravais record, having the following components:79\beginitems80`generators' & generators of the finite unimodular group8182`formspace' & basis of the space of invariant forms (optional)8384`centerings' & list of centering matrices (optional)8586`normalizer' & additional generators of the normalizer in GL(n,Z) (optional)8788`centralizer' & additional generators of the centralizer in GL(n,Z) (optional)8990`size' & size of the unimodular group (optional)91\enditems9293The following routines serve as interface to {\CARAT} Bravais Files.9495\>CaratWriteBravaisFile( <filename>, <data> ) F9697takes a file name and a Bravais record, and writes the data in the98Bravais record to the file.99100\>CaratReadBravaisFile( <filename> ) F101102reads a Bravais File, and returns the resulting Bravais record.103104Certain {\CARAT} programs produce output files containing several Bravais105records, possibly preceeded by a varying number of header lines.106107\>CaratReadMultiBravaisFile( <filename> ) F108109reads such a multi-Bravais file, and returns a record with the components110`info' and `groups'. `info' is the list of header lines before the first111Bravais record starts, and `groups' is the list of Bravais records read from112the file.113114%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%115\Section{Executing CARAT commands}116117To execute a {\CARAT} program from within {\GAP}, some low level,118general purpose routines are provided in this package.119Higher level routines for certain {\CARAT} functions may be available120in the {\GAP} library or in other packages. These higher121level functions are expected to use the following low level routines,122so that changes in the low level interface will be transparent.123124An arbitrary {\CARAT} program can be executed with the routine125126\>CaratCommand( <command>, <args>, <outfile> ) F127128where <command> is the name of a {\CARAT} program, <args> is a string129containing the command line arguments of the {\CARAT} program,130and <outfile> is the name of the file to which the output is to be131written. Example:132133\begintt134gap> CaratCommand( "Z_equiv", "file1 file2", "file.out" );135\endtt136137A short description of the arguments and options of any {\CARAT}138program can be obtained from the {\CARAT} online help facility with139140\>CaratHelp( <command> ) F141142where <command> is the name of the {\CARAT} program. CaratHelp executes143the program with the `-h' option, and writes the output to the144terminal. Example:145146\begintt147gap> CaratHelp( "Z_equiv" );148\endtt149150A list of all {\CARAT} programs, along with a description of their151usage and functionality, can be found in the {\CARAT} documentation152(in HTML), in the file153154\begintt155documentation/introduction.html156\endtt157158in the {\CARAT} home directory.159160161%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%162\Section{Methods provided by CARAT}163164{\CARAT} implements methods for the following functions and operations165declared in the {\GAP} library. For a detailed description of these166functions, please consult the {\GAP} manual (section167"ref:Matrix Groups in Characteristic 0").168169\>BravaisGroup( <G> ) A170171\>IsBravaisGroup( <G> ) P172173\>BravaisSubgroups( <G> ) A174175\>BravaisSupergroups( <G> ) A176177\>NormalizerInGLnZBravaisGroup( <G> ) A178179\>`Normalizer( GL(<n>, Integers), <G> )'{Normalizer!in GLnZ}@{in GLnZ} O180181\>`Centralizer( GL(<n>, Integers), <G> )'{Centralizer!in GLnZ}@{in GLnZ} O182183\>ZClassRepsQClass( <G> ) A184185\>`RepresentativeAction( GL(<n>,Integers), <G1>, <G2> )'{RepresentativeAction!in GLnZ}@{in GLnZ} O186187188%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%189\Section{CARAT Bravais Catalog}190191{\CARAT} contains a catalog with $\Z$-class representatives of all192Bravais groups of dimension up to 6. These Bravais groups are193accessed via a crystal family symbol.194195\>`CaratCrystalFamilies[d]'{CaratCrystalFamilies}@{`CaratCrystalFamilies'} V196197returns a list of inequivalent crystal family symbols in dimension <d>.198199\>BravaisGroupsCrystalFamily( <symb> ) F200201returns a list of $\Z$-class representatives of the Bravais groups202in the crystal family with symbol <symb>.203204%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%205\Section{CARAT Q-Class Catalog}206207{\CARAT} contains a catalog with representatives of all $Q$-classes of208finite unimodular groups up to dimension~6. This catalog can be accessd209with the function210211\>CaratQClassCatalog( <grp>, <mode> ) F212213where <grp> is a finite unimodular group of dimension up to 6, and214<mode> is an integer. This function returns a record with one or215several of the following components, depending on the decomposition of216$mode = n_{0} + n_{1} * 2 + n_{2} * 4$ into powers of 2:217\beginitems218`qclass' & Q-class symbol; this component is always present219220`familysymb' & crystal family symbol (present if $n_{0} \<> 0$)221222`trans' & transformation to standard representative of Q-class:223<grp>\^{}<trans> = <std>224(present if $n_{1} \<> 0$)225226`group' & standard representative of Q-class of <grp>227(present if $n_{2} \<> 0$ )228\enditems229230If <G1> and <G2> are two unimodular groups,231232\>ConjugatorQClass( <G1>, <G2> ) F233234returns a rational matrix <m> such that <G1>\^{}<m> = <G2>, or fail, if235the groups are not in the same Q-class. Since this function uses the236{\CARAT} Q-class catalog, only groups up to dimension 6 are supported.237If this dimension is exceeded, an error is reported.238239240241242