Using the LinKnot package

From Knot Atlas
Revision as of 14:12, 7 April 2006 by Drorbn (talk | contribs)
Jump to navigationJump to search


The Mathematica package LinKnot is a combination of two packages. The first, "Knot2000" was written by M. Ochiai and N. Imafuji. This was extended to the package LinKnot by S. Jablan and R. Sazdanovic. This package provides many useful things KnotTheory can't do natively; for example, it can interpret Conway notation, and, at least on Windows machines, provides nice graphics for knots, and a graphical interface for drawing knots by hand.

There are two ways LinKnot can be used along with KnotTheory`:

  • As a "subcontractor": LinKnot is mostly hidden and wrapper functions are provided to access some of its functionality from within KnotTheory`.
  • In parallel: everything from both packages is visible.

The advantage for the first approach is that the interface to LinKnot is then consistent with the conventions used by KnotTheory` and the Mathematica name space remains less cluttered. The advantage of the second approach is obvious - with it, all the functionality of LinKnot is available, and not just the parts for which wrapper functions are provided within KnotTheory`.

Using LinKnot as a "subcontractor"

To use LinKnot with KnotTheory, you should download the file LinKnot.zip from the LinKnot site or from our mirror. Unzip and install the content of LinKnot.zip wherever you like, and within Mathematica issue a command like

(For In[1] see Setup)

In[2]:= AppendTo[$Path, "/path/to/LinKnots.m"];

After you've done this, everything should just work. (LinKnot will only be loaded when necessary, and there might be a short delay when this happens.) If everything doesn't just work, please complain to Scott.

You may find it helpful to explicitly set the path in which you've installed LinKnot (although KnotTheory tries to do this itself). Simply set LinKnotDirectory[].

In[3]:= ?LinKnotDirectory
LinKnotDirectory[] contains the path to the ''LinKnot'' package. It must be set correctly in order for all the (Windows only) MathLink components of ''LinKnot'' to be usable. It can be overriden by the user.

Using LinKnot in parallel with KnotTheory`

Usage notes by Jablans

If you have any problem with running LinKnot (as a separate program) please do the following:

1) in your Mathematica directory (e.g., C:\Program Files\Wolfram Research\Mathematica\5.0) make a new folder named LinKnot;

2) extract the contents of the file LinKnot.zip into the directory LinKnot;

3) open the "Mathematica" notebook K2KL.nb that you will find in the directory LinKnot;

4) run the first line:

SetDirectory["LinKnot"]

<< LinKnots.m

Then you can fix the appropriate path and work with KnotTheory and LinKnot as well.

See also

See also Extending/Modifying KnotTheory`#Lessons learnt from integrating LinKnot` for technical details on how LinKnot` and KnotTheory` were integrated.