Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Nov 21, 2022
1 parent 143f951 commit 2292d72
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 25 deletions.
28 changes: 3 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
# TOPCOM: Triangulations of Point Configurations and Oriented Matroids
#### Modified Version 0.17.8 for CYTools
#### Modified Version 1.1.2 for CYTools

A modified version of the [TOPCOM](http://www.rambau.wm.uni-bayreuth.de/TOPCOM/) package that is used for the [CYTools](https://github.com/LiamMcAllisterGroup/cytools) package. TOPCOM was originally written by [Jörg Rambau](http://www.rambau.wm.uni-bayreuth.de/) and it was packaged for Debian by [Doug Torrance](https://webwork.piedmont.edu/~dtorrance/). This repository is a fork of the [TOPCOM Debian repository](https://salsa.debian.org/science-team/topcom).
A modified version of the [TOPCOM](https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/TOPCOM/index.html) package that is used for the [CYTools](https://cy.tools) package. TOPCOM was originally written by [Jörg Rambau](https://www.wm.uni-bayreuth.de/de/team/rambau_joerg/index.php) and it was packaged for Debian by [Doug Torrance](https://webwork.piedmont.edu/~dtorrance/). This repository is a fork of the [TOPCOM Debian repository](https://salsa.debian.org/science-team/topcom).

This version of TOPCOM contains additional functionality compared to the original one. In particular, it has the ability to perform random walks in the graph of triangulations by performing random flips, and it can compute $$\mathcal{K}_\cup$$ (i.e. the union of the Kähler cones of toric varieties containing a particular Calabi-Yau hypersurface that is unchanged under the transition to any of those varieties). These tools can be used with the binaries ```topcom-randomwalk``` and ```topcom-computekcup```.

The original TOPCOM code, the modifications by Doug Torrance, and the modifications for CYTools are distributed under the [GPL-2+ license](http://www.gnu.org/licenses/gpl-2.0.html).

The original README file is included as README_ORIGINAL.

## Mod Usage
#### Random Walks
A random walk with $n$ random steps can be performed with ```topcom-randomwalk```. The input file takes the standard format from TOPCOM, followed by the number of random flips $n$ enclosed in parenthesis. If $$n$$ is negative, regularity is not checked at each step. The random flips include non-fine and non-star triangulations, but the flags can be hardcoded in the source file to restrict to these. In CYTools we find it more convenient to impose these restrictions in Python. After performing $$n-1$$ flips it prints all of the triangulations that differ by an additional flip. Thus, one can obtain the neighbor triangulations from a starting one by using $$n=1$$.

This is an example random walk with of a polytope with $h^{1,1}=5 that performs 10 random flips without checking regularity.
```bash
echo "[[-1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [-1, 0, -1, 0, 1], [-1, 0, -1, -1, 1], [-1, 0, 0, -1, 1], [1, 0, -1, 2, 1], [-1, 1, -1, -1, 1], [0, 0, 1, -1, 1], [0, 0, -1, 1, 1], [0, 0, 0, 0, 1]] [] {{3,7,6,9,1},{6,9,0,8,5},{1,4,9,2,0},{4,6,9,2,0},{7,1,0,9,5},{9,1,0,8,5},{1,3,9,2,4},{3,6,9,2,4},{6,7,0,9,5},{1,7,6,9,5},{1,3,7,9,4},{3,1,6,9,5},{3,6,7,9,4},{3,1,9,8,5},{9,1,0,2,8},{3,9,6,8,5},{6,9,0,2,8},{3,1,9,2,8},{3,9,6,2,8},{1,4,7,9,0},{4,6,7,9,0}} (-10)" | topcom-randomwalk
```

#### Computation of $$\mathcal{K}_\cup$$
The computation of $$\mathcal{K}_\cup$$ can be performed with ```topcom-computekcup```. Again, the input follows the standard format, except that the 2-faces of the polytope must be specified with an array using parenthesis. The output of the function are the extremal rays of $$\mathcal{M}_\cap$$ (i.e. the dual of $$\mathcal{K}_\cup$$).

This is an example with a polytope with $h^{1,1}=5$.
```bash
echo "[[-1, 0, 0, 0, 1], [1, -1, 1, 0, 1], [-1, 0, -1, 0, 1], [-1, 0, -1, -1, 1], [-1, 0, 0, -1, 1], [1, 0, -1, 2, 1], [-1, 1, -1, -1, 1], [0, 0, 1, -1, 1], [0, 0, -1, 1, 1], [0, 0, 0, 0, 1]] [] {{3,7,6,9,1},{6,9,0,8,5},{1,4,9,2,0},{4,6,9,2,0},{7,1,0,9,5},{9,1,0,8,5},{1,3,9,2,4},{3,6,9,2,4},{6,7,0,9,5},{1,7,6,9,5},{1,3,7,9,4},{3,1,6,9,5},{3,6,7,9,4},{3,1,9,8,5},{9,1,0,2,8},{3,9,6,8,5},{6,9,0,2,8},{3,1,9,2,8},{3,9,6,2,8},{1,4,7,9,0},{4,6,7,9,0}} ((0,1,2),(1,2,3),(0,1,4),(1,3,4),(0,2,3,4),(0,1,5),(0,2,5,8),(1,2,5,8),(1,3,5),(2,3,5,8),(1,3,6),(2,3,6),(3,4,6),(1,5,6),(2,5,6,8),(3,5,6),(0,2,6),(0,5,6),(0,4,6),(0,1,7),(1,3,7),(0,4,7),(1,4,7),(3,4,7),(0,5,7),(1,5,7),(1,6,7),(3,6,7),(4,6,7),(5,6,7),(0,6,7))" | topcom-computekcup
```
Note that trivial 2-faces can be safely ignored, but we included them here for completeness.
This version of TOPCOM is modified very slightly so that it outputs the neighboring triangulations when asked for the flips of a triangulation. Older version of this modified package contained additional functionality, but they are no longer used in CYTools.
28 changes: 28 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,31 @@ The full instructions to build a Debian package were originally taken from this

### Note
When you build the package it will change a bunch of the files in the repository and create new ones. Therefore, you should make a temporary copy of the directory to be used for this. Otherwise, committing new changes to the repository will become a mess.


# Different architectures

Building the package for a different archtecture is even more tricky. Here we will build for ARM64 while being on AMD64. There might be a better alternative, but this is the way that I got it to work.

First, we install and register qemu as follows.

```bash
sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
docker run --rm --privileged multiarch/qemu-user-static:register --reset
```

Then copy this file (with the target arch) to the current directory.
```bash
cp /usr/bin/qemu-aarch64-static .
```
Now, add the following line in the Dockerfile after the FROM statement.
```
COPY ./qemu-aarch64-static /usr/bin/qemu-aarch64-static
```

Finally, build the image as follows.

```bash
docker buildx build -t debian-builder-arm64 --platform=linux/arm64 .
```

0 comments on commit 2292d72

Please sign in to comment.