Skip to content

This repository contains various scripts for parsing the output of TOPCOM or mptopcom.

License

Notifications You must be signed in to change notification settings

dmg-lab/parsing-topcom-triangulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parsing (MP)TOPCOM triangulations

This repository contains several scripts for parsing the output of TOPCOM1 or mptopcom2 to use it in e.g. polymake3, Julia4 or Oscar.jl5.

Sample usage

julia julia/parse_triangulations.jl test_input/D4xD2.dat test_input/mptopcom.out.xz
julia julia/parse_triangulations_oscar.jl test_input/D4xD2.dat test_input/mptopcom.out.xz
polymake --script polymake/parse_triangulations.pl test_input/D4xD2.dat test_input/mptopcom.out.xz

For convenience we also provide a script computing the rays of the secondary cones of the triangulations in the output file up to group action. A sample call is

polymake --script polymake/rays_of_sec_cones.pl test_input/D4xD2.dat test_input/mptopcom.out.xz

Additionally there is a file to turn all data into a Julia tuple of OSCAR datatypes and store them as a .mrdi6 file:

julia julia/parse_triangulations_to_mrdi.jl test_input/D4xD2.dat test_input/mptopcom.out.xz

This tuple has three entries, points the matrix of points, group the group acting, and triangulations a vector of the triangulations as IncidenceMatrixes. These can then be used to assemble every triangulation into a SubdivisionOfPoints. Note that often the output data will be too large for this script to work. Then use one of the other scripts that processes the output line by line.

Encoding triangulations

Both TOPCOM and mptopcom use the same encoding for a triangulation. An examples output line of TOPCOM containing a triangulation is

T[526]:=[526->15,7:{{0,1,2,3,4,5,10},{4,9,10,11,12,13,14},{1,2,3,4,5,9,10},{2,3,5,6,7,9,11},{3,5,6,7,8,9,11},{3,5,7,8,9,11,13},{3,5,7,9,10,11,13},{3,4,9,10,11,12,13},{2,3,4,9,10,11,12},{1,2,3,4,9,10,11},{1,2,3,5,6,9,11},{2,3,5,7,9,10,11},{1,2,3,5,9,10,11},{3,7,9,10,11,12,13},{2,3,7,9,10,11,12}}];

This output is slightly different for mptopcom, but the triangulation is always the part in the curly braces. A triangulation is given as a set of index sets on the vertices. To be precise:

{{0,1,2,3,4,5,10},{4,9,10,11,12,13,14},{1,2,3,4,5,9,10},{2,3,5,6,7,9,11},{3,5,6,7,8,9,11},{3,5,7,8,9,11,13},{3,5,7,9,10,11,13},{3,4,9,10,11,12,13},{2,3,4,9,10,11,12},{1,2,3,4,9,10,11},{1,2,3,5,6,9,11},{2,3,5,7,9,10,11},{1,2,3,5,9,10,11},{3,7,9,10,11,12,13},{2,3,7,9,10,11,12}}

is the triangulation,

{0,1,2,3,4,5,10}

is a simplex of the triangulation and is to be interpreted as the simplex formed by the convex hull of the 0th, 1st, 2nd, 3rd, 4th, 5th, and 10th input point.

Note that Julia indexes from 1, so it is necessary to shift all indexes that come from mptopcom or TOPCOM.

Input files for the scripts

All scripts here assume that the input is given in two files:

  • input.dat The input file of TOPCOM or mptopcom. The format is the same in both cases. This file is parsed by the scripts as well, as the output of TOPCOM or mptopcom only makes sense in conjunction with the correct input. Things that can go wrong otherwise include: The points could have a different order if they are being (re-)computed or a different group may be used.
  • output.xz The output of TOPCOM or mptopcom produced from input.dat. Since the output may be very large, we assume that it is compressed.

Footnotes

  1. TOPCOM

  2. mptopcom

  3. polymake

  4. Julia

  5. Oscar.jl

  6. Della Vecchia, Joswig, Lorenz: A FAIR File Format for Mathematical Software

About

This repository contains various scripts for parsing the output of TOPCOM or mptopcom.

Resources

License

Stars

Watchers

Forks

Packages

No packages published