**Next message:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Previous message:**Vladyslav Shtabovenko: "Re: FeynCalc 8.2 with mathematica 9"**Next in thread:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Reply:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ]**Mail actions:**[ respond to this message ] [ mail a new topic ]

Dear FeynCalc users,

the new commit

<https://github.com/FeynCalc/feyncalc/commit/9365d4937c208d53d843568bb059f48e83cd3c26>

to the git repository of FeynCalc introduces a lot of changes to the

structure of FeynCalc that we would like to introduce in details here:

1) You might have been wondering, why FeynCalc must be installed to the

directory "HighEnergyPhysics" and not just "FeynCalc". Well, this used

to be liked that for some legacy reasons but is actually not necessary

nowadays. From now on FeynCalc lives in "FeynCalc" and

it is started simply via "<<FeynCalc`"

2) The internal structure of FeynCalc got completely refactored to

simplify the maintenance and avoid problems with Mathematica's

autocompletion. Before that FeynCalc actually consisted of hundreds of

separate packages (each .m file was a package). Loading that number of

packages in one session was freezing Mathematica's auto-complete. This

should not occur anymore. Now FeynCalc is just one package and all its

objects live in the context HighEnergyPhysics`FeynCalc`. This allows us

to get rid of the (error-prone) tricks with MakeContext and CheckContext

that we had in the source code before. Furthermoe, the directory

structure was adjusted to be compatible with the standard layout in

Wolfram Workbench, which is the state of the art tool to develop large

Mathematica packages.

3) Much of the source code (although not everything yet) is now nicely

formatted.

4) The directory structure inside HighEnergyPhysics is now organized in

the following way

* "AddOns": small user addons for FeynCalc

* "Database" : contains cached results for user's computations

* "Dirac": tools for Dirac algebra

* "Documentation": contains package documentation

* "Examples": sample computations with FeynCalc that reproduce known

results from the literature

* "ExportImport": tools for exchanging results between FeynCalc and

other tools

* "FeynArts": contains patched FeynArts

* "Feynman" : tools for dealing with S-matrix elements, including

derivation of Feynman rules and computation of the matrix element squared

* "Kernel": related to the way Mathematica loads packages

* "LoopIntegral": tools for loop integrals

* "Lorentz": tools for working with quantities that carry Lorentz

indices and for dealing with the kinematics

* "Misc" : for routines that don't fall into any other category.

* "NonComAlgebra": general functions for non-commutative objects

* "Phi": contains Frederik Orellana's PHI

* "QCD" : tools for QCD OPE calculations (still poorly tested and

documented)

* "Shared": general objects (e.g. Pair, DiracGamma, SUNF) and functions

(e.g. FreeQ2, SelectFree, Factor2) that are widely used by other parts

of the FeynCalc code.

* "SUN": tools for SU(N) algebra

* "Tables": database with various analytic expressions

* "Phi": contains TARCER by Rolf Mertig and Rainer Scharf

5) Since FeynCalc now always loads all its .m files, we squashed some

(short) functions into common files. For example, Apart1, Apart2 and

Apart3 now live in Apart.m. This is done to keep the time FeynCalc needs

to load reasonably small.

6) Options parsing in many functions have been improved to use the

modern MMA's OptionsPattern - OptionValue paradigm.

7) The number of unit tests have been increased. Although we are still

far away from the full code coverage, with more than 2700 unit test we

are doing quite good.

8) FeynCalc tabulates many expressions that can be requested by the

user, e.g. Lagrangians. To make it easy for the user to work with these

expressions, FeynCalc returned them with indices and variables in the

Global` context. However this also means that when FeynCalc is loaded,

it puts a lot of objects into the Global` context where they may clash

with user-defined functions. To solve this problem we introduced a new

object: FCGV which is acronym for FeynCalc Global Variable. The syntax

is FCGV[x_String]. From now on, variables that used to be returned as

Global`VariableName will be outputted as FCGV["VariableName"]. You will

nottice them in your expressions as having FCGV around them, i.e.

FCGV["p"] will be displayed as FCGV(p). You can always convert such

objects to "normal" variables via the replacement rule {FCGV[x_String]

:>ToExpression[x]} We understand that this additional step may pose some

inconveniences to you, but from the point of view of Mathematica

programming and interoperability between different packages, this

solution seems to be the cleanest way to avoid troubles in future.

For example, Lagrangian["QCD"] now returns

-(1/4) FieldStrength[FCGV["\[Alpha]"], FCGV["\[Beta]"],

FCGV["a"]].FieldStrength[FCGV["\[Alpha]"], FCGV["\[Beta]"],

FCGV["a"]]

instead of

-(1/4) FieldStrength[\[Alpha], \[Beta],

a].FieldStrength[\[Alpha], \[Beta], a]

as it used to be. Now suppose that before invoking Lagrangian["QCD"] you

defined \[Alpha] = 1/137. With the new output using FCGV nothing

changes. With the old output

you would have got

-(1/4) FieldStrength[1/137, \[Beta], a].FieldStrength[1/137, \[Beta], a]

which is clearly not what you want.

9) To circumvent problems related to the patching of FeynArts, from now

on FeynCalc will look for FeynArts only in the directory "FeynArts"

inside "HighEnergyPhysics". Nevertheless, it is still possible to

specify an alternative directory by setting

FeynCalc`$FeynArtsDirectory="path" before loading FeynCalc. The patching

code was moved to FeynCalc, i.e. now it will run even when Phi is not

loaded.

10) The TARCER notebook have been converted into a source file

("TARCER.m"). Furthermore, generated TARCER*.mx files are not

distributed anymore with the source code. When you first try to load

TARCER, a dialog will appear with the suggestion to generate the .mx

file now. This process has to be done only once and takes only a couple

of minutes. After that, the generated .mx will be automatically loaded

whenever you want to use TARCER.

11) Prior to this commit FeynCalc used to switch the format of output

cells to TraditionalForm. Now it will only issue a

warning message suggesting the user to do this by himself or herself.

Such messages can be disabled by setting $FCAdvice to False.

So if you despise all the fancy typesetting and prefer to work with

StandardForm, FeynCalc will respect your decision.

12) To avoid clashes with built-in functions of recent Mathematica

versions, we had to rename

some FeynCalc functions:

PartialD -> FCPartialD

Symmetrize -> FCSymmetrize

AntiSymmetrize -> FCAntiSymmetrize

Cheers,

Vladyslav

**Next message:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Previous message:**Vladyslav Shtabovenko: "Re: FeynCalc 8.2 with mathematica 9"**Next in thread:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Reply:**Vladyslav Shtabovenko: "Re: Great Unifying Refactoring"**Messages sorted by:**[ date ] [ thread ] [ subject ] [ author ]**Mail actions:**[ respond to this message ] [ mail a new topic ]

*
This archive was generated by hypermail 2b29
: 02/22/19-03:40:01 PM Z CET
*