Macaulay2 » Documentation
Packages » PALPInterface :: PALPInterface
next | previous | forward | backward | up | index | toc

PALPInterface -- an interface to PALP, software for analyzing lattice polytopes

Description

PALP, a Package for Analyzing Lattice Polytopes, was written by Maximilian Kreuzer and Harald Skarke to classify reflexive polytopes, and in particular to produce the list of the 473800776 reflexive polytopes of dimension four. It also computes normal forms of lattice polytopes, the lattice points of a polytope and of its dual, weight systems, and nef partitions together with the Hodge numbers of the corresponding Calabi-Yau complete intersections. This package makes that functionality available in Macaulay2.

New users should start with Lattice polytopes in PALP, which explains how polytopes are given to these functions, and the M and N lattices.

PALP is a separate program, which must be installed; on macOS, for instance, with brew install macaulay2/tap/palp. The package loads without it, and looks for the PALP executables only when a function first needs one; see palpProgram. PALP's source and documentation are at https://hep.itp.tuwien.ac.at/~kreuzer/CY/CYpalp.html, and it is described in

M. Kreuzer and H. Skarke, PALP: A Package for Analyzing Lattice Polytopes
with Applications to Toric Geometry, Comput. Phys. Commun. 157 (2004)
87-106, arXiv:math/0204356.

A first computation: the polytope of a weight system, its dual, and the Hodge numbers of the Calabi-Yau threefolds of a related weight system in codimension two.

i1 : ws = {10, 1, 2, 3, 4};
i2 : palpMVertices ws

o2 = | -1 4  1  -1 -1 -1 0  |
     | -1 -1 1  2  1  -1 -1 |
     | -1 -1 -1 -1 0  1  1  |

              3       7
o2 : Matrix ZZ  <-- ZZ
i3 : palpNVertices ws

o3 = | 0 1 0 0  -2 -1 |
     | 1 0 0 -1 -3 -2 |
     | 0 0 1 -2 -4 -2 |

              3       6
o3 : Matrix ZZ  <-- ZZ
i4 : palpIsReflexive ws

o4 = true
i5 : L = palpNefPartitions({10, 1, 1, 2, 2, 2, 2}, 2);
i6 : apply(L, hodgeNumbers)

o6 = {{2, 86}, {2, 68}, {2, 68}}

o6 : List

Polytopes

  • Lattice polytopes in PALP -- how polytopes are given to PALP, and the M and N lattices
  • palpMVertices -- the vertices and the lattice points of a lattice polytope
  • palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
  • palpNormalForm -- the PALP normal form of a lattice polytope
  • palpInfo -- the summary line PALP prints for a polytope
  • palpIsIP -- whether the origin is an interior point of a polytope
  • palpIsCanonical -- whether the origin is the only interior lattice point of a polytope
  • palpIsReflexive -- whether PALP considers a polytope reflexive

Weight systems

Nef partitions

Running PALP directly

For PALP options that have no function of their own.

The PALP commands behind each function

See also

Author

Version

This documentation describes version 0.3 of PALPInterface, released 16 November 2026.

Citation

If you have used this package in your research, please cite it as follows:

@misc{PALPInterfaceSource,
  author = {Mike Stillman},
  title = {{PALPInterface: an interface to the PALP software for lattice polytopes. Version~0.3}},
  howpublished = {A \emph{Macaulay2} package available at
    \url{https://github.com/mikestillman/stringtorics}}
}

Exports

  • Types
    • NefPartition -- the class of nef partitions of reflexive polytopes
    • WeightSystem -- see weightSystem -- make a (combined) weight system
  • Functions and commands
    • cayleyPolytopeVertices -- the vertices of the Cayley polytope of a nef partition
    • fromPalpMatrix -- read a matrix printed by PALP
    • isDirectProduct -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isDualProjection -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • naiveNefPartitions -- search directly for nef partitions of a toric variety
    • hodgeNumbers -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • hodgeZero -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • properties -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • nefPartitionDivisors -- the divisors belonging to a nef partition
    • palpHodgeNumbers -- the Hodge numbers of the complete intersection of one nef partition
    • palpInfo -- the summary line PALP prints for a polytope
    • palpIsCanonical -- whether the origin is the only interior lattice point of a polytope
    • palpIsIP -- whether the origin is an interior point of a polytope
    • palpIsReflexive -- whether PALP considers a polytope reflexive
    • palpMPoints -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpNefPartitions -- the nef partitions of a reflexive polytope, with their Hodge numbers
    • palpNormalForm -- the PALP normal form of a lattice polytope
    • palpNPoints -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpProgram -- locate one of the PALP executables
    • palpRun -- run a PALP program and return its output
    • toPalp -- the PALP input format for a matrix or a weight system
    • weightSystem -- make a (combined) weight system
    • weightSystemPolytope -- the polytope of a weight system, computed from the definition
    • weightSystems -- the weight systems of a given dimension
    • weightSystemVertices -- the vertices of the polytope of a weight system
  • Methods
    • cayleyPolytopeVertices(List,Matrix) -- see cayleyPolytopeVertices -- the vertices of the Cayley polytope of a nef partition
    • cayleyPolytopeVertices(NefPartition) -- see cayleyPolytopeVertices -- the vertices of the Cayley polytope of a nef partition
    • fromPalpMatrix(String) -- see fromPalpMatrix -- read a matrix printed by PALP
    • isDirectProduct(List,Matrix) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isDirectProduct(NefPartition) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isDualProjection(List,Matrix) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isDualProjection(NefPartition) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isProjection(List,Matrix) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isProjection(NefPartition) -- see isProjection -- whether a nef partition is a projection, a direct product, or a dual projection
    • isWellDefined(WeightSystem) -- whether a WeightSystem is a valid combined weight system
    • codim(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • euler(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • hodgeNumbers(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • hodgeZero(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • parts(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • properties(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • vertices(NefPartition) -- see NefPartition -- the class of nef partitions of reflexive polytopes
    • palpHodgeNumbers(List,Matrix) -- see palpHodgeNumbers -- the Hodge numbers of the complete intersection of one nef partition
    • palpHodgeNumbers(NefPartition) -- see palpHodgeNumbers -- the Hodge numbers of the complete intersection of one nef partition
    • palpInfo(List) -- see palpInfo -- the summary line PALP prints for a polytope
    • palpInfo(Matrix) -- see palpInfo -- the summary line PALP prints for a polytope
    • palpInfo(WeightSystem) -- see palpInfo -- the summary line PALP prints for a polytope
    • palpIsCanonical(List) -- see palpIsCanonical -- whether the origin is the only interior lattice point of a polytope
    • palpIsCanonical(Matrix) -- see palpIsCanonical -- whether the origin is the only interior lattice point of a polytope
    • palpIsCanonical(WeightSystem) -- see palpIsCanonical -- whether the origin is the only interior lattice point of a polytope
    • palpIsIP(List) -- see palpIsIP -- whether the origin is an interior point of a polytope
    • palpIsIP(Matrix) -- see palpIsIP -- whether the origin is an interior point of a polytope
    • palpIsIP(WeightSystem) -- see palpIsIP -- whether the origin is an interior point of a polytope
    • palpIsReflexive(List) -- see palpIsReflexive -- whether PALP considers a polytope reflexive
    • palpIsReflexive(Matrix) -- see palpIsReflexive -- whether PALP considers a polytope reflexive
    • palpIsReflexive(WeightSystem) -- see palpIsReflexive -- whether PALP considers a polytope reflexive
    • palpMPoints(List) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMPoints(Matrix) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMPoints(WeightSystem) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMVertices(List) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMVertices(Matrix) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpMVertices(WeightSystem) -- see palpMVertices -- the vertices and the lattice points of a lattice polytope
    • palpNefPartitions(List,ZZ) -- see palpNefPartitions -- the nef partitions of a reflexive polytope, with their Hodge numbers
    • palpNefPartitions(Matrix,ZZ) -- see palpNefPartitions -- the nef partitions of a reflexive polytope, with their Hodge numbers
    • palpNefPartitions(WeightSystem,ZZ) -- see palpNefPartitions -- the nef partitions of a reflexive polytope, with their Hodge numbers
    • palpNormalForm(List) -- see palpNormalForm -- the PALP normal form of a lattice polytope
    • palpNormalForm(Matrix) -- see palpNormalForm -- the PALP normal form of a lattice polytope
    • palpNormalForm(WeightSystem) -- see palpNormalForm -- the PALP normal form of a lattice polytope
    • palpNPoints(List) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNPoints(Matrix) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNPoints(WeightSystem) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNVertices(List) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNVertices(Matrix) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpNVertices(WeightSystem) -- see palpNVertices -- the vertices and the lattice points of the dual of a reflexive polytope
    • palpProgram(String) -- see palpProgram -- locate one of the PALP executables
    • palpRun(String,String,List) -- see palpRun -- run a PALP program and return its output
    • palpRun(String,String,Matrix) -- see palpRun -- run a PALP program and return its output
    • palpRun(String,String,WeightSystem) -- see palpRun -- run a PALP program and return its output
    • toPalp(List) -- see toPalp -- the PALP input format for a matrix or a weight system
    • toPalp(Matrix) -- see toPalp -- the PALP input format for a matrix or a weight system
    • toPalp(WeightSystem) -- see toPalp -- the PALP input format for a matrix or a weight system
    • WeightSystem == WeightSystem -- see weightSystem -- make a (combined) weight system
    • weightSystem(List) -- see weightSystem -- make a (combined) weight system
    • weightSystemPolytope(List) -- see weightSystemPolytope -- the polytope of a weight system, computed from the definition
    • weightSystemPolytope(WeightSystem) -- see weightSystemPolytope -- the polytope of a weight system, computed from the definition
    • weightSystems(ZZ) -- see weightSystems -- the weight systems of a given dimension
    • weightSystemVertices(List) -- see weightSystemVertices -- the vertices of the polytope of a weight system
    • weightSystemVertices(WeightSystem) -- see weightSystemVertices -- the vertices of the polytope of a weight system
  • Symbols
    • Lattice -- see cayleyPolytopeVertices -- the vertices of the Cayley polytope of a nef partition
    • HodgeNumbers (missing documentation)
    • KeepSymmetric (missing documentation)
    • Products (missing documentation)
    • Projections (missing documentation)
    • Reflexive (missing documentation)
  • Mutable symbols
    • palpDmax -- which build of the PALP executables to use
    • palpVerbosity -- how much to report about the PALP commands being run
  • Other things
    • palpDmax -- which build of the PALP executables to use
    • palpVerbosity -- how much to report about the PALP commands being run

For the programmer

The object PALPInterface is a package, defined in PALPInterface.m2.


The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/PALPInterface.m2:1150:0.