New in version 2.x
Many things changed/improved in version 2.x with respect to version 1.x. The key change is probably that old 1.x notebooks are not compatible with the 2.x software. This was done intentionally in order to give maximal flexibility to improve the system. It is conceivable that at some point an automatic converter will be written, but for the time being you will either need to convert the notebook by hand or keep version 1.x around.
The other user-visible changes include:
- Cadabra manipulations can now programmed using Python. The input format is a combination of Cadabra's old LaTeX-based format mixed with standard Python, so you still get all the benefits of LaTeX-style input.
- You can now do both abstract tensor computations as well as component computations. This means that you can manipulate tensorial expressions as you did before, and then plug in values for their components.
- Various simplification algorithms are now part of the set of default rules to apply at every manipulation stage (collecting equal terms, for instance). This makes a lot of manipulations look shorter and more natural.
- The notebook interface now also has facilities for displaying plots and other graphical output. You can thus explore the results of component computations graphically.
- The user interface now takes into account text scaling settings on high-dpi screens, so it the font size in LaTeX output cells matches that of the input cells.
- Where version 1.x used to write notebook files in a LaTeX-compatible form, the notebook files for 2.x are JSON files. This allows for more flexibility, and also enables easier conversion to other formats, for instance to show notebooks on the web.
There are also many changes under the hood:
- All algorithms and all properties now live in their own \verb|.hh/.cc| files, making it easier to find and debug them.
- Cadabra now relies solely on libraries which are rather common (certainly more common than the old stumbling block \verb|modglue|), and is easier to build as it now uses CMake instead of GNU autotools.
- The user interface code is now cleanly separated into a system-independent base and a very thin layer, making it much easier to write one for e.g. OS X or for a different GUI toolkit like Qt.
Algorithm name changes from version 1 to 2
The main change with respect to algorithm names is that the '@'
prefix for algorithms is no longer necessary. Algorithms are now
standard Python functions. They take an expression as their first
argument, and (optionally) further arguments to determine what to
do. You can use an underscore to refer to the last entered
expression, so you can write collect_factors(_)
where
you would previously write @collect_factors(%)
.
Where you would previously use an exclamation mark to act at any
level, you now add the deep=True
argument to a
function. This is the default for many algorithms where that makes
sense, so you often do not have to add it at all.
A number of algorithms (and a few properties) have changed name or behaviour while going from version 1 to version 2. This was done mostly to make naming more consistent and to avoid weird acronyms in algorithm names.
Algorithms
In general, all algorithms now have names of the form 'action' or 'action_object'.
old name | new name | notes |
---|---|---|
@prodflatten | flatten_product | to avoid abbreviations |
@prodsort | sort_product | to avoid abbreviations |
@rewrite_diracbar | expand_diracbar | make meaning more clear |
@epsprod2gendelta | epsilon_to_delta | avoid obscure names |
@pintegrate | integrate_by_parts | completely reworked and more powerful |
Properties