Wolfram Mathematica

Wolfram Demonstrations Project contributions:

Useful Mathematica packages

    1. To improve the quality of ticks in the 2D and 3D plots use CustomTicks by Mark A. Caprio.

    2. To get LaTeX typesetting in Mathematica use MaTeX by Szabolcs Horvát. See also in GitHub. Note that in addition to Ghostscript MaTeX needs pdflatex. It can be installed as a part of MikTeX distribution. Reinstalling MikTeX may results in a different location of pdflatex, which needs reconfiguring MaTeX by showing it the new path to pdflatex.exe: ConfigureMaTeX["pdfLaTeX"-> path to pdflatex.exe]. The new path can be found in MikTeX Console by chosing Settings->Directories and looking at Bin directory field.

    3. For work with second quantization use SNEG Library by Rok Zitko.

    4. To work with group theory and calculate condensed matter propeties use Group Theory Pack (GTPack) by W. Hergert, M. Geilhufe, S. Schenk.

Reasearh with Mathematica

To get the best in terms of time and quality outcome from using Mathematica in your scientific work, it is better to shape it from the very begining and to carry out in a structured way. The research projects (like Master's or PhD degrees, etc.) can be organized in form of Research notebooks.

Compilation to C code

Windows 7

As has been discussed in the forums, the easiest way of making Mathematica working with C compilers on Windows 64-bit is to install .Net Framework 4 and Windows SDK 7.1. After such an installation the compilation to C works in Mathematica 10.4 and 9.0 automatically. However, a new installation or upgrade of Mathematica may not see the already installed C complilers. In this case they can be specified manually. In your Mathematica Notebook file .nb type in an input cell and evaluate:

  1. << CCompilerDriver`

    1. $CCompiler = { "Compiler" -> CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler, "CompilerInstallation" -> "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0", "CompilerName" -> Automatic};.

Windows 10

In contrast to Windows 7, Windows 10 has higher version of .Net Framework built-in, so that attempt to intall Framework 4 results in a warning. At the same time installation of Windows SDK for Windows 7 installs without C+ complilers, for which the corresponding boxes simply cannot be ticked as they are shown in grey. The solution for this problem is given at MATLAB Answers forum. In this situation one needs to intall Windows SDK 7.1 without C++ compilers and then intall compilers separately as the Service Pack 1 Compiler Update for the Windows SDK 7.1. After such an installation Visual Studio C compilers can be still unseen by Mathematica 11.3. This can be resolved by specifying the path to Visual Studio Compiler manually as written in the above Window 7 section.

Developing Mathematica application

Mathematica application it is a Mathematica package with documentation that can be integrated into Mathematica Help system. It can also contain an extenstion to the Mathematica interface called Front End. The basic package that presents an extention to the Mathematica Kernel without documentation can be developed by using only tools of Mathematica. In contrast to this, the development of the package with documentation requires using of Wolfram Workbench. The Workbench is a plug-in for Eclipse IDE.

Starting working with Workbench

    1. Presuming that Mathematica is already installed on the computer, download Workbench from your Wolfram account. This will be some archive such as .zip.

    2. Following the Wolfram Research instruction, intall the latest version of Java Development Kit (JDK), and one of the Eclipse Packages. Note that Eclipse can be intalled by downloading the Eclipse IDE Intaller offering to choose between several packages of Eclipse IDE: for Jave Developers, for C/C++ Developers, for PHP Developers, for Scientific Computing and etc. It is written that Workbench is working with various standard Eclipse packages (but may be not all of them). It is safe to choose Eclipse IDE for Jave Developers since it is used in the Wolfram Research instructions. Note also that if the package is downloaded as separate achive, it works straight after extracting into a folder.

    3. Configure Eclipse IDE for Jave Developers as explained in the Wolfram Research instruction.

    4. Watch the tutorial on how to use Workbench Help,

    5. In Workbench Help read How to create an Application Project, what is its typical structure, What PacletInfor.m file is and how to edit it, How to Launch the Wolfram Mathematica Kernel (aka Wolfram Language Engine) from within the Workbecnh and How Run and Debug the code. Finally, read How to Build and Deploy the Application.

Note that the Project Application structure is different from the Build Application structure that is automatically created in the folder called 'build' of the parrent folder of the application when you press 'build' button. The Deployed Application structure is different from both. It must be kept in a separate folder of its own because presence of two PacletInfo.m files in the project folder will prevent further sucessful deployments that may be needed to update the package. Although after build the application can be deployed straight to the $UserBaseDirectory which allows one to download it in Mathematica as Get["<application name here>`"] outside the Workbench, it is better not to do this untill the application is finished because such deployed application prevents code updates during the debugging and running the code in Test notebooks from within Workbench.

General notes on package development