Utilities
Reading polytopes from the Kreuzer-Skarke database
CYTools.read_polytopes
— Methodreadpolytopes(input::String; inputtype::String="file", format::String="ks")
Read the polytopes from a string or file. The parameter input
can serve the input string or the filename depending on whether the keyword argument input_type
is set to "string" or "file". Currently, only the format in the Kreuzer-Skarke database is supported, but in the future we may support weight systems.
Examples
julia> example_string = "4 5 M:201 5 N:7 5 H:1,149 [-296]\n1 1 1 1 -7\n0 2 2 2 -6\n0 0 8 0 -8\n0 0 0 8 -8";
julia> polytopes = read_polytopes(example_string, input_type="string");
julia> length(polytopes)
1
julia> polytopes[1]
A polyhedron in ambient dimension 4
CYTools.fetch_polytopes
— Methodfetchpolytopes(; h11::Union{Int, Nothing}=nothing, h12::Union{Int, Nothing}=nothing, h13::Union{Int, Nothing}=nothing, h22::Union{Int, Nothing}=nothing, chi::Union{Int, Nothing}=nothing, lattice::Union{Char, Nothing}=nothing, dim::Int=4, npoints::Union{Int, Nothing}=nothing, nvertices::Union{Int, Nothing}=nothing, ndualpoints::Union{Int, Nothing}=nothing, nfacets::Union{Int, Nothing}=nothing, limit::Int=1000, timeout::Int=60, raw_output::Bool=false)
Fetch polytopes from the Kreuzer-Skarke database or the Schöller-Skarke database. The data is fetched from the websites http://hep.itp.tuwien.ac.at/~kreuzer/CY/ and http://rgc.itp.tuwien.ac.at/fourfolds/ respectively.
Supported keyword arguments:
h11::Int
: Specifies the Hodge number $h^{1,1}$ of the Calabi-Yau hypersurface.h12::Int
: Specifies the Hodge number $h^{1,2}$ of the Calabi-Yau hypersurface.h13::Int
: Specifies the Hodge number $h^{1,3}$ of the Calabi-Yau hypersurface.h22::Int
: Specifies the Hodge number $h^{2,2}$ of the Calabi-Yau hypersurface.chi::Int
: Specifies the Euler characteristic of the Calabi-Yau hypersurface.lattice::Char
: Specifies the lattice on which the polytope is defined. Options are 'N' and 'M'. Has to be specified if the Hodge numbers or the Euler characteristic is specified.dim::Int
: The dimension of the polytope. The only available options are 4 and 5.n_points::Int
: Specifies the number of lattice points of the desired polytopes.n_vertices::Int
: Specifies the number of vertices of the desired polytopes.n_dual_points::Int
: Specifies the number of points of the dual polytopes of the desired polytopes.n_facets::Int
: Specifies the number of facets of the desired polytopes.limit::Int=1000
: Specifies the maximum number of fetched polytopes.timeout::Int=60
: Specifies the maximum number of seconds to wait for the server to return the data.raw_output::Bool=false
: Return the raw string obtained from the server.
Examples
julia> polytopes = fetch_polytopes(; h11=4, lattice='N', limit=5);
julia> polytopes[1]
A polyhedron in ambient dimension 4
julia> length(polytopes)
5