Using the LinKnot package: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
(LinKnot links updated.)
No edit summary
Line 1: Line 1:
{{Manual TOC Sidebar}}
{{Manual TOC Sidebar}}


The Mathematica package [http://www.mi.sanu.ac.yu/vismath/linknot/ ''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.
The Mathematica package [http://www.mi.sanu.ac.yu/vismath/linknot/ ''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. The package ''LinKnot'' 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.


To use ''LinKnot'' with ''KnotTheory'', you should download LinKnot.zip from the [http://www.mi.sanu.ac.yu/vismath/linknot/ LinKnot site] or from [http://katlas.math.toronto.edu/svn/LinKnot/tags/stable/ our mirror] (a full ''LinKnot'' manual page ManualK2KC.nb is in the zip file, and the main file is the mathematica notebook <tt>K2KL.nb</tt>). Install this wherever you like, and in your Mathematica session issue a command like
To use ''LinKnot'' with ''KnotTheory'', you should download LinKnot.zip from the [http://www.mi.sanu.ac.yu/vismath/linknot/ LinKnot site] (a full ''LinKnot'' manual page ManualK2KC.nb is in the zip file, and the main file is the mathematica notebook <tt>K2KL.nb</tt>). After downloading the file LinKnot.zip:


1) extract it in the Mathematica directory
{{Startup Note}}


C:\ProgramFiles\WolframResearch\Mathematica\5.2
<!--$$AppendTo[$Path, "/path/to/LinKnots.m"];$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 2 |
in = <nowiki>AppendTo[$Path, "/path/to/LinKnots.m"];</nowiki>}}
<!--END-->


It will automatically create new folder LinKnot
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 [[User:Scott|Scott]].


2) from any nb-file run:
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[].


SetDirectory["LinKnot"];
<!--$$?LinKnotDirectory$$-->
<!--Robot Land, no human edits to "END"-->
{{HelpLine|
n = 3 |
in = <nowiki>LinKnotDirectory</nowiki> |
out= <nowiki>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.</nowiki>}}
<!--END-->


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


Then you can work with the both programs ''KnotTheory'' and ''LinKnot''.
1) in your ''Mathematica'' directory (e.g., C:\Program Files\Wolfram Research\Mathematica\5.0) make a new folder named LinKnot;


If you like to have the complete program ''LinKnot'' visible (with the usage, description of all ''LinKnot'' functions, ''etc''.) and run the both programs ''KnotTheory'' and ''LinKnot'', you can open the file K2KL.nb from the directory
2) extract the contents of the file LinKnot.zip into the directory LinKnot;


C://ProgramFiles/WolframResearch/Mathematica/5.2/LinKnot
3) open the "Mathematica" notebook K2KL.nb that you will find in the directory LinKnot;


and run
4) run the first line:


SetDirectory["LinKnot"]
SetDirectory["LinKnot"];


<< LinKnots.m
<<LinKnots`



Then you can fix the appropriate path and work with ''KnotTheory'' and ''LinKnot'' as well.
The directory LinKnot contains ''Knot Theory'' package, that we will try to keep updated. However, if you have in your computer the more recent version of ''Knot Theory'', you can run:

SetDirectory["LinKnot"];

<<LinKnots`

AppendTo[$Path, \\Path to KnotTheory];

Get["Path to Knot Theory\\init.m"]

of just update the version of ''KnotTheory'' already existing in the directory LinKnot by extracting the file most recent file KnotTheory.zip into the directory LinKnot.

Finally, ''LinKnot'' and Knot Theory can be placed anywhere you like, but in this case you need to set the paths by:

SetDirectory["Path to LinKnot"];

<<LinKnots`

AppendTo[$Path,"Path to Knot Theory"];

Get["Path to Knot Theory\\KnotTheory\\init.m"]


After you've done this, everything should just work. If everything doesn't just work, please complain to [[User:Scott|Scott]].


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

Revision as of 08:40, 5 April 2006


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. The package LinKnot 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.

To use LinKnot 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:

1) extract it in the Mathematica directory

C:\ProgramFiles\WolframResearch\Mathematica\5.2

It will automatically create new folder LinKnot

2) from any nb-file run:

SetDirectory["LinKnot"];

<<LinKnots`

Then you can work with the both programs KnotTheory and LinKnot.

If you like to have the complete program LinKnot visible (with the usage, description of all LinKnot functions, etc.) and run the both programs KnotTheory and LinKnot, you can open the file K2KL.nb from the directory

C://ProgramFiles/WolframResearch/Mathematica/5.2/LinKnot

and run

SetDirectory["LinKnot"];

<<LinKnots`


The directory LinKnot contains Knot Theory package, that we will try to keep updated. However, if you have in your computer the more recent version of Knot Theory, you can run:

SetDirectory["LinKnot"];

<<LinKnots`

AppendTo[$Path, \\Path to KnotTheory];

Get["Path to Knot Theory\\init.m"]

of just update the version of KnotTheory already existing in the directory LinKnot by extracting the file most recent file KnotTheory.zip into the directory LinKnot.

Finally, LinKnot and Knot Theory can be placed anywhere you like, but in this case you need to set the paths by:

SetDirectory["Path to LinKnot"];

<<LinKnots`

AppendTo[$Path,"Path to Knot Theory"];

Get["Path to Knot Theory\\KnotTheory\\init.m"]


After you've done this, everything should just work. If everything doesn't just work, please complain to Scott.

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