forked from EverettYou/Mathematica-for-physics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.m
136 lines (78 loc) · 3.78 KB
/
install.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
135
136
(* ::Package:: *)
(* ::Section:: *)
(*Preparing*)
(* ::Text:: *)
(*Palettes directory:*)
(*FileNameJoin[{$BaseDirectory, "SystemFiles", "FrontEnd", "Palettes"}] *)
(*FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "Palettes"}] *)
(* ::Text:: *)
(*Define Functions to overwrite directory and file*)
FileOverwrite[file1_,file2_]:=
(If[FileType[file2]==File,DeleteFile[file2]];
CopyFile[file1,file2];)
DirectoryOverwrite[dir1_,dir2_]:=
(If[FileType[dir2]==Directory,DeleteDirectory[dir2,DeleteContents->True]];
CopyDirectory[dir1,dir2];)
(* ::Section:: *)
(*Configure global preference. *)
Module[{sd},
sd=#->(#1->(Union[#,Capitalize/@#]&@Sort[#2])&@@@OptionValue[Options[$FrontEnd,#],#]&@#)&@SpellingDictionaries;
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","init.m"}],
FileNameJoin[{$UserBaseDirectory, "FrontEnd", "init.m"}]];
Get[FileNameJoin[{$UserBaseDirectory, "FrontEnd", "init.m"}]];
SetOptions[$FrontEnd,sd];];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"Kernel","init.m"}],
FileNameJoin[{$UserBaseDirectory, "Kernel", "init.m"}]];
(* ::Text:: *)
(*Install style sheets*)
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","CMU Article.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "StyleSheets","CMU Article.nb"}]];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","XRef Palette.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "Palettes","XRef Palette.nb"}]];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","Cambria Article.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "StyleSheets","Cambria Article.nb"}]];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","Source Article Serif.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "StyleSheets","Source Article Serif.nb"}]];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","Source Article Sans.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "StyleSheets","Source Article Sans.nb"}]];
FileOverwrite[FileNameJoin[{NotebookDirectory[],"FrontEnd","Default-Modified.nb"}],
FileNameJoin[{$UserBaseDirectory,
"SystemFiles", "FrontEnd", "StyleSheets","Default-Modified.nb"}]];
(* ::Section:: *)
(*Install Packages*)
(* ::Subsection:: *)
(*FeynCalc and FeynArts:*)
Import["https://raw.githubusercontent.com/FeynCalc/feyncalc/master/install.m"];
InstallFeynCalc[]
(* ::Subsection:: *)
(*FeynHelper*)
Import["https://raw.githubusercontent.com/FeynCalc/feynhelpers/master/install.m"]
InstallFeynHelpers[]
(* ::Subsection:: *)
(*Package-X*)
file=URLDownload["https://mule-tools.gitlab.io/package-x/downloads/X-2.1.1-patched-2.zip",FileNameJoin[{$UserBaseDirectory,"Applications","Package-X.zip"}]];
extracted=ExtractArchive[file,FileNameJoin[{$UserBaseDirectory,"Applications"}]];
DeleteFile[file];
(* ::Subsection:: *)
(*GroupMath*)
file=URLDownload["https://renatofonseca.net/groupmath/ProgramVersions/GroupMath-1.1.2.zip",FileNameJoin[{$UserBaseDirectory,"Applications","GroupMath.zip"}]];
ExtractArchive[file,FileNameJoin[{$UserBaseDirectory,"Applications"}]];
DeleteFile[file];
(* ::Subsection:: *)
(*DRalgo*)
(* ::Text:: *)
(*Compute thermal effective potential from dimensional reduction method at 2-loop*)
file=URLDownload["https://github.com/DR-algo/DRalgo/archive/refs/tags/v1.0.1-beta.zip",FileNameJoin[{$UserBaseDirectory,"Applications","DRalgo.zip"}]];
extracted=ExtractArchive[file,FileNameJoin[{$UserBaseDirectory,"Applications"}]];
DeleteFile[file];
RenameDirectory[extracted[[1]],FileNameJoin[{$UserBaseDirectory,"Applications","DRalgo"}]];
(* ::Subsection:: *)
(*Plot Functions*)
FileOverwrite[FileNameJoin[{NotebookDirectory[],"Functions","PlotFunctions.wl"}],
FileNameJoin[{$UserBaseDirectory,
"Applications","PlotFunctions.wl"}]];