ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 07 Dec 2015 22:12:27 +0100How to import buckygenhttps://ask.sagemath.org/question/31381/how-to-import-buckygen/ I am struggling to find the way to import the Graph Theory library buckygen. Any suggestion? Thanks.Mon, 07 Dec 2015 18:26:47 +0100https://ask.sagemath.org/question/31381/how-to-import-buckygen/Comment by vdelecroix for <p>I am struggling to find the way to import the Graph Theory library buckygen. Any suggestion? Thanks.</p>
https://ask.sagemath.org/question/31381/how-to-import-buckygen/?comment=31382#post-id-31382Could you elaborate a bit more? What did you try?Mon, 07 Dec 2015 18:30:35 +0100https://ask.sagemath.org/question/31381/how-to-import-buckygen/?comment=31382#post-id-31382Answer by tmonteil for <p>I am struggling to find the way to import the Graph Theory library buckygen. Any suggestion? Thanks.</p>
https://ask.sagemath.org/question/31381/how-to-import-buckygen/?answer=31389#post-id-31389If you want to install `buckygen` within Sage, you should first do this from a terminal:
sage -i buckygen
Then, `buckygen` is not a Python module, but a C program, hence you can not import it directly, you have to write some kind of interface if you want to interact directly with it. An example is given by the `fullerenes` graph generator, source code which you can get by typing:
sage: graphs.fullerenes??
Or currently looking here (this precise link might not last a long time): http://git.sagemath.org/sage.git/tree/src/sage/graphs/graph_generators.py#n1107
Mon, 07 Dec 2015 22:12:27 +0100https://ask.sagemath.org/question/31381/how-to-import-buckygen/?answer=31389#post-id-31389