Python package implementing the action of Kontsevich's graph complex(es) on Poisson structures. This package is designed to be used in SageMath version 9.5 or later.
-
Download the
gcaopssource code as a ZIP file and extract it to a directory such as/path/to/gcaops-master. -
In a terminal (e.g. the SageMath Shell on Windows), run the following:
$ sage -pip install --upgrade /path/to/gcaops-master/This completes the installation.
-
It is optional but highly recommended to configure a default directory where data (such as lists of graphs) can be stored, so it doesn't have to be re-computed each time.
This can be done by setting the environment variable
GCAOPS_DATA_DIRto the path you desire, before starting SageMath. A convenient way to achieve this is by adding a line such as the following to SageMath's shell scriptsagerc:export GCAOPS_DATA_DIR='/home/sage/Documents/gcaops_data/'Be warned that this directory can grow large. If no directory is configured, then graphs are only stored in memory (which may be limiting).
-
It is optional but convenient to enable the importing of all names from the
gcaopspackage (e.g.UndirectedGraphComplex) into the global namespace of every SageMath session, so that the functionality can be used immediately.This can be done by adding the following line to SageMath's startup script
init.sage:from gcaops.all import *
In a SageMath session, import the package and use it. For instance:
sage: from gcaops.graph.undirected_graph_complex import UndirectedGraphComplex
sage: GC = UndirectedGraphComplex(QQ, implementation='vector', sparse=True)
sage: GC.cohomology_basis(4,6)
[1*UndirectedGraph(4, [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)])]
Extensive examples of the use of this software are contained in the author's PhD dissertation: The action of Kontsevich's graph complex on Poisson structures and star products: an implementation.