Using the LinKnot package
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.
(LinKnot also has a webMathematica interface!)
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 from within KnotTheory, 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 see Setup)
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.
In case of problems, 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.
Using LinKnot in parallel with KnotTheory`
To use LinKnot in parallel with KnotTheory`, you should download LinKnot.zip from the LinKnot site (a full LinKnot manual page ManualK2KC.nb is in the zip file, and the main file is the mathematica notebook K2KL.nb). After downloading the file LinKnot.zip:
- Extract LinKnot.zip anywhere (e.g., to the local disc "C:\"). It will automatically create a new folder LinKnot.
- Set the directory to LinKnot, add the path to KnotTheory` to the Mathematica
$Path, and run:
SetDirectory["/path/to/LinKnot/"]; << LinKnots` AppendTo[$Path, "Path to KnotTheory"]; << KnotTheory`
For example, if LinKnot is installed in "C:\LinKnot" and KnotTheory` is installed at "C:\KnotTheory", run:
SetDirectory["C:\\LinKnot"]; << LinKnots` AppendTo[$Path, "C:\\"]; << KnotTheory`
Then you can work with the both programs KnotTheory` and LinKnot.
If you need to have the complete program LinKnot visible (with the usage, description of all LinKnot functions, etc.) and run together KnotTheory` and LinKnot, you can open the file K2KL.nb from the directory LinKnot and run the same command as before.
After you've done this, everything should just work. If everything doesn't just work, please complain to S. Jablan (firstname.lastname@example.org).
Further usage notes by Jablans
If you have any problem with running LinKnot (as a separate program) please do the following:
- in your Mathematica directory (e.g., C:\Program Files\Wolfram Research\Mathematica\5.0) make a new folder named LinKnot;
- extract the contents of the file LinKnot.zip into the directory LinKnot;
- open the "Mathematica" notebook K2KL.nb that you will find in the directory LinKnot;
- 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 Extending/Modifying KnotTheory`#Lessons learnt from integrating LinKnot` for technical details on how LinKnot` and KnotTheory` were integrated.