1

I'm getting started with FeynCalc and FeynArts, so I tried to run some of the examples they give you. Everything works fine, except for the ones which require to generate a model using the scripts in FeynRules. They all give me the following error message: SetDirectory::cdir: Cannot set current directory to C:\Users\151461\AppData\Roaming\Mathematica/Applications/FeynRules. I've tried to unistall Mathematica and FeynCalc and install them again, but nothing has changed. For clarity, I add a screenshot of the code I'm running.enter image description here

  • if you copy pasted the path then it seems a bit strange as it starts with back slashes and ends with forward slashes. Did you manually add /Applications/FeynRules ? If not it would seem that the package assumed you use Linux as /path/to/file is a Linux path. Is there an option for Windows or Linux when installing? I am not sure If I installed FeynCalc in the past and I do not know what could have caused that. – userrandrand Apr 05 '23 at 12:54
  • I didn't manually add it and there isn't an option for windows or linux when installing that I am aware of. – Andrea Filippo Beretta Apr 05 '23 at 13:43
  • Your screenshot shows you added the path manually. The "/Applications/FeynRules" is how you would add a Linux path. Your Windows path uses \ so you should maybe use <>"\Applications\FeynRules". If you want code that would work for any operating system you can use FileNameJoin so the code would be $FeynRulesPath = SetDirectory[FileNameJoin[{$UserBaseDirectory, "Applications", "FeynRules"}]] – userrandrand Apr 05 '23 at 20:27
  • I've tried this but it doesn't work either, the code you see in the screenshot is the one you get when you download the FeynCalc package from the official FeynCalc site, I didn't touch it. – Andrea Filippo Beretta Apr 06 '23 at 08:48
  • Then they used Linux but for a tutorial that they share online they should have used FileNameJoin. Did you get the same error message after using $FeynRulesPath = SetDirectory[FileNameJoin[{$UserBaseDirectory, "Applications", "FeynRules"}]]? – userrandrand Apr 06 '23 at 08:52
  • Did you actually install FeynRules? It's a separate Mathematica package unrelated to FeynCalc and FeynArts that has to be downloaded from the authors' homepage: https://feynrules.irmp.ucl.ac.be/ – vsht Apr 06 '23 at 09:04
  • Sorry, I didn't install FeynRules. Seeing the names of the directories in FeynCalc I thought it was included in the automatic installation package and I didn't know you need to install it as a separate package. Now it works, thank you all very much! – Andrea Filippo Beretta Apr 06 '23 at 09:51

0 Answers0