Questions tagged [packages]

Questions on Mathematica packages, which are self-contained bundles of Mathematica code that add new functions and other functionality.

Filter by
Sorted by
Tagged with
6
votes
1answer
368 views

3D rigid body physics engine

Is there a package in Mathematica that will allow me to simulate collisions of 3d rigid bodies? If not, what known libraries could I use and how? For example, one problem I want to simulate is a ...
10
votes
4answers
557 views

What is the accessibility of a package's `Private` context variables?

I've been reading up on how Mathematica handles contexts, $Context, $ContextPath, and a few of the tutorials they have on ...
7
votes
1answer
122 views

GitLink: Retrieve list of files which were changed in a commit

How can I retrieve the list of files that were changed in a commit using GitLink? I can open a repo like this: repo = GitOpen["~/Repos/GitLink"] Now I can get ...
4
votes
1answer
179 views

TuGames package does not run

I downloaded the package TuGames from http://library.wolfram.com/infocenter/MathSource/5709/ to calculate Shapley Values in cooperative bargaining games. I got it to work earlier today but after ...
5
votes
1answer
71 views

How to reset a built-in symbol to its default definition?

I'm trying to add functionality to some of Mathematica's built-in functions in a package I'm building. I'm not trying to overwrite any functionality—just add it where it isn't already defined. I ...
3
votes
1answer
82 views

Running file with some extension [closed]

I want to run the Mathematica file with some extension, like '.m'. But, I don't know, how can I run the code. Please, guide me.
3
votes
1answer
84 views

How to install MaTeX on Mathematica online?

Can you please tell me the step-by-step procedure to install MaTeX on Mathematica Online platform?
8
votes
1answer
144 views

How to export functions from a package without declaring them at the beginning of the package?

When making a package, I find it a bit difficult to remember to add functions as public, and update the ::usage tag. Is there some neat trick to automatically ...
3
votes
1answer
159 views

Meson build system + C/C++ LibraryLink, help needed for portability check/fix (Windows &MacOs)

As a proof of concept I have created a github repository that shows how to: use the Meson build system to create a Mathematica package using LibraryLink functions The goal is to provide an easy to ...
1
vote
0answers
52 views

Change the posets300.m package since CProduct does not work

I want to build a Cartesian product of two posets (say chain[2] and chain[2]). I wrote ...
8
votes
0answers
47 views

Dealing with over eager shadowing messages

...
8
votes
1answer
164 views

Maeder's articles about Logic Programming with Mathematica

I found by chance Maeder's public articles about Logic Programming with Mathematica at the following links: Logic Programming I: The Interpreter and Logic Programming II: Applications . The first ...
4
votes
1answer
44 views

How to set the value of a symbol in a package [duplicate]

I am writing a package like this: BeginPackage["HNotation2`"]; Begin["`Private`"]; HTransR=3; End[]; EndPackage[]; When I load the package, it seems that the ...
3
votes
2answers
92 views

Overlaying custom plotmarkers onto graphics primitives using Show

I have found the custom plotmarkers package developed by @Alexey Popkov extremely handy for makeing nice, accurate plots. However, I have run into a small issue that I am struggling to make sense of. ...
0
votes
0answers
68 views

How to load a package [duplicate]

I have a package: BeginPackage["HNotation`"]; soma::usage = "asdfa"; Begin["`Private`"]; soma[x_] := x + 1; End[]; EndPackage[]; I save the file with ".m" ...
6
votes
1answer
299 views

Symbol appears in multiple contexts when loading package

I'm building a Mathematica application "APPStestI" that contains three packages: SUBappsA.m, SUBappsB.m, SUBappsC.m and APPStestI.m. Where APPStestI.m is the main package; SUBappsA.m and SUBappsB.m ...
2
votes
0answers
76 views

Antiparticles in Feynrules Lagrangian

I am trying to implement a simple extension of the SM to Feynrules, generating the Lagrangian in a Mathematica notebook file. I am wondering about the following: Is there a way to explicitly use the ...
4
votes
1answer
61 views

Mathematica package to calculate the graph crossing number

I have been searching for a mathematica package that can calculate the graph Crossing number of a (small) given arbitrary graph (the graphdata of known graphs doesn't help me). Before I write my own ...
8
votes
1answer
110 views

Memoization and packages

I am working in a package on symmetric functions, that sometimes are quite expensive to compute. I use memoization extensively, but what is the correct approach for a package intended for the public ...
3
votes
2answers
135 views

How to make an option immutable

I am writing a package featuring several functions which depend on a large number of parameters. I'm trying to use Options so that I can define default values for ...
6
votes
2answers
202 views

Mathematica ExtraPackage

Where can I install the Wolfram ExtraPackages? Especially the "Notation`" package? I do not seem to have it by default (In the Utilities, I have only two documents, ...
0
votes
1answer
57 views

How to enable loading packages dynamicly in Palette UI [duplicate]

Given a directory path and some .m files in it, I want load these packages files mannually outside notebooks, so I created Palette using code: ...
12
votes
1answer
201 views

Profiling a package

I have some code that I want to profile to see how much time each step takes, for instance: ...
2
votes
0answers
82 views

HypExp and HPL packages for hypergeometric functions: Evaluating a function HPL[{minus,plus},x]?

I am currently using the HypExp and HPL packages, which are useful for expanding hypergeometric functions in series around integer or half-integer values, as in common in dimensional regularization ...
2
votes
1answer
78 views

Loading MultivariateStatistics` changes colour of some multivariate distributions to red in notebook. Should I be worried?

I need to use the pdf of a Wishart distribution which is only defined in the package MultivariateStatistics`. However, after loading the package, some or all of the ...
3
votes
0answers
63 views

How to connect to ncbi databases for text search? MathIOmica authoring instructions now do not work [closed]

Mias's suplementary material in the notebook MmaBioinfo_Ch4_Databases contains a code for search the snp related to autism ...
2
votes
1answer
49 views

How to make indepent linking workspace when using NETLink?

I've created two packages file as CompnentALink.m CompnentBLink.m the functions InstallNET[] and ...
0
votes
1answer
97 views

Main function in my package doesn't work

I am new to Mathematica package development and I have been trying to write and run some simple packages to get a feel for it. I wrote the following package. My aim is to define a package which has ...
3
votes
0answers
21 views

Not too obsolete package extending the built-in functionality of Permutation Groups

Is there a modern package geared to permutation groups? With functions, for instance, for group-isomorphism (either w.r.t. permutation representation & w.r.t. group structure), direct, semidirect ...
0
votes
1answer
81 views

Problem with AddOn-Package Theorema

First of all, I'm fairly new to Mathematica and the Wolfram Environment in general. If this question has already been asked I'm sorry for the duplicate, but I haven't been able to track down the issue ...
1
vote
0answers
52 views

How to call a .nb notebook inside a another notebook [duplicate]

I generally use .m as the file for mathematica. However currently I have started using .nb interface and its looking good. However if I create separate .nb files and try to call/import them inside my ...
7
votes
0answers
76 views

Exclude functions from auto-completion

Is there a way to exclude a function from auto-completion? Suppose that you are developing a package, and in the next version a function will be deprecated. It is better not to auto-complete it so ...
6
votes
1answer
66 views

Loading IGraphM on a Remote Cluster

I am trying to load IGraphM on a remote cluster at a university. I can load the program, then install the package, which is successful I then run <<IGraphM, ...
0
votes
1answer
79 views

Need a package to compute constraint structure

I want to compute constraint structure of some field theory and some gravitational field theory. By constraint structure I mean what is explained in the "Lectures on Quantum Mechanics" by P. A. M. ...
1
vote
0answers
285 views

Problem while installing a custom package (RGTC)

I am using "11.2.0 for Mac OS X x86 (64-bit) (September 11, 2017)" and I am trying to install the RGTC package, which can be found here. Download the package Then following the answer given by ...
3
votes
1answer
89 views

“Hyperlink” to notebook in the package folder

I wrote a package and when I import it I'd like it to print something like: "Bla bla bla. Click HERE for the example notebook." and the the list of functions defined in the package. I'd like HERE to ...
24
votes
1answer
431 views

What to be aware when using new-style package?

A new package format is described in this post. This format does not use BeginPackage and Begin. Instead, each package file is ...
6
votes
3answers
124 views

How to avoid running code when a script is imported as a package?

In Python, the boilerplate line if __name__ == "__main__": defines a code block that should be executed when the code is run as a script, but not when imported as a ...
5
votes
1answer
131 views

How do you set up private contexts shared between sub-packages?

I have a fairly large project that logically splits into several subunits, and for reasons of testing, documentation, and discoverability, I would like to make each subunit its own (sub-)package, like ...
2
votes
1answer
127 views

LieArt — 8 dimensional Irreducible representation of $\mathrm{SO}(8)$ and their decompositions - No.2

This is the followed up question of LieArt --- 3 different 8 dimensional Irreducible representation of SO(8) and their decompositions, Since $$ \mathrm{SO}(8) \supset \mathrm{SU}(2) \times \mathrm{...
1
vote
0answers
119 views

LieArt — 3 different 8 dimensional irreducible representation of $\mathrm{SO}(8)$ and their decompositions

I am using the LieArt which you can download freely online https://arxiv.org/pdf/1206.6379.pdf There are three different 8 dimensional $\mathrm{SO}(8)$ irreducible representations, formally it is ...
3
votes
2answers
135 views

The design implication of PD[X[ #, #, #, #], X[#, #, #, #]]

In Package KnotTheory, there's a function called PD[] that takes a tabulated knot and returns its PD codes, for example: ...
5
votes
1answer
81 views

How to enforce priority on custom directory over paclets default repository

As explained in $Path hijacked by PacletManager? loading packages from custom directories may not be so intuitive. Not to mention absolute lack of documentation of interaction between ...
4
votes
1answer
92 views

Print definition of functions of user created Mathematica Packages

To expedite the work I do I have created a Mathematica Package that has all the functions I need to plot the data I need to analyze. The problem is every now and then I will need to slightly modify ...
7
votes
1answer
96 views

Function defined in a package behaves differently from when defined in a notebook

On a Windows system I'm using the Rubi rule-based integration package by Albert Rich which defines function "Int" in addition to Mathematica's Integrate. In my ..\ProgramData\kernel\init.m I have: <...
5
votes
3answers
206 views

Power Function and Non Commutative Multiply

I'm trying to figure out the best way to define a Power function for non commutative multiply that retains some of the regular features of the ordinary power function. As of now, what I've been ...
3
votes
2answers
74 views

Using Symbolize to Convert Multiple Variables at Once

So, I have created a list of subscripted and overdotted variables that I would like to symbolize, so I run them through a for loop. Seems to me that this would work? Any help is appreciated. ...
3
votes
0answers
83 views

Sneg Library - Number operator simplify

I am trying to use the SNEG Library for evaluating some commutators. For instance I am trying to evaluate $$ \left[n_1^2,a^\dagger_1\right]$$ with the code in Mathematica ...
4
votes
0answers
53 views

Testing packages against old Mathematica versions

I've made a Mathematica package available, and it's been reported to me that it doesn't work with Mathematica 4. I've guessed at some of the issues, and provided work arounds, but that process is ...
3
votes
0answers
104 views

How to find, load and use a legacy Mathematica package

Question: How to find, load and use a legacy Mathematica package from a previous Mathematica version? What is the preferred approach and process? Context: I am working through a set of examples in ...