-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPHI.m
136 lines (91 loc) · 3.83 KB
/
PHI.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
(* ::Package:: *)
(* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
(* :Title: PHI *)
(*
This software is covered by the GNU General Public License 3.
Copyright (C) 1990-2022 Rolf Mertig
Copyright (C) 1997-2022 Frederik Orellana
Copyright (C) 2014-2022 Vladyslav Shtabovenko
*)
(* :Summary: Physics of Hadronic Interactions - Tools for ChPT *)
(* ------------------------------------------------------------------------ *)
$PHIVersion::usage=
"$PHIVersion is the string that represents the version of PHI";
$PHIDirectory::usage=
"$PHIDirectory is the string that represents the full path to the PHI \
directory";
$Lagrangians::usage =
"$Lagrangians is a list of the lagrangians loaded (without heads \
Lagrangian). Setting $Lagrangians to a list of lagrangians in PhiStart.m \
causes these lagrangians to be loaded at startup.";
$Configuration::usage =
"$Configuration is a string variable determining which configuration is loaded \
at startup or restart. It can be set before loading FeynCalc, in PhiStart.m or with the \
configurations palette. If the palette is used for restarting, the setting \
in PhiStart.m is overruled. Possible values include \"ChPT2\" and \"QED\". Default \
value : \"None\".";
$PaletteConfiguration::usage =
"$PaletteConfiguration is a string variable set when clicking on the \
configuration palette and overruling the setting of $Configuration. Default \
value : \"None\".";
Begin["`Package`"]
End[]
Begin["`PHI`Private`"];
$PHIVersion="1.3";
$PHIDirectory =
ToFileName[{$FeynCalcDirectory, "AddOns", "PHI"}];
Off[General::shdw];
If[ !ValueQ[Global`$Configuration],
FeynCalc`$Configuration = "None",
FeynCalc`$Configuration = Global`$Configuration
];
Remove[Global`$Configuration];
If[ !ValueQ[Global`$PaletteConfiguration],
FeynCalc`$PaletteConfiguration = "None",
FeynCalc`$PaletteConfiguration = Global`$PaletteConfiguration
];
Remove[Global`$PaletteConfiguration];
If[ !ValueQ[Global`$Lagrangians],
FeynCalc`$Lagrangians = {},
FeynCalc`$Lagrangians = Global`$Lagrangians
];
Remove[Global`$Lagrangians];
On[General::shdw];
tmp`phiFiles = Map[ToFileName[{$PHIDirectory,"Shared"}, (# <> ".m")] &,
{"Objects", "Couplings", "Channels", "Utilities", "Renormalization", "Palettes"}];
(* Load the .m files *)
BeginPackage["FeynCalc`",{"JLink`"}];
FCDeclareHeader[FileNameJoin[{$PHIDirectory,"First.m"}]];
Get[FileNameJoin[{$PHIDirectory,"First.m"}]];
FCDeclareHeader/@tmp`phiFiles;
Get/@tmp`phiFiles;
Remove[tmp`phiFiles];
(* Loading of user definitions *)
FCPrint[2,"Loading Phi`PhiStart`"];
FCDeclareHeader[FileNameJoin[{$PHIDirectory,"PhiStart.m"}]];
Get[FileNameJoin[{$PHIDirectory,"PhiStart.m"}]];
(*Clean out doubles (strings and non-strings) in $Lagrangians*)
$Lagrangians = Union[(ToExpression[#[[0]]] @@ #) & /@ $Lagrangians];
(* ************************************************************** *)
(* Update particles *)
FAUpdate;
(* ************************************************************** *)
(* FeynArts definitions are cleared to avoid error messages *)
(*
If[ NumberQ[FeynArts`$FeynArts],
ClearAll[FeynArts`Greek, FeynArts`UCGreek],
Remove[FeynArts`$FeynArts]
];*)
EndPackage[]
(* Print startup message *)
If[ $FeynCalcStartupMessages =!= False,
Print[Style["PHI ", "Text", Bold], Style[$PHIVersion <> " loaded.", "Text"]];
Print[ Style["Have a look at the supplied ","Text"],
Style[DisplayForm@ButtonBox["examples.", BaseStyle -> "Hyperlink", ButtonFunction :>
SystemOpen[FileNameJoin[{$PHIDirectory, "Examples"}]],
Evaluator -> Automatic, Method -> "Preemptive"], "Text"],
Style[" If you use PHI in your research, please cite","Text"]];
Print [Style[" \[Bullet] F. Orellana, doctoral dissertation, University of Bern, 2003","Text"]];
Print [Style[" \[Bullet] F. Orellana, R. Mertig and V. Shtabovenko, in preparation","Text"]];
];
End[]