Feeds:
Posts
Comments

Archive for the ‘Physics’ Category


On a previous post I described how to change the LaTeX options of the Cadabra notebook.

I collaborate with a colleague, who uses the standard cadabra installation. Therefore, If I write a Cadabra notebook, he needs to pullback the personalised notebook to the standard one. The pullback script can be downloaded here!!!

Author: Oscar Castillo-Felisola

Created: 2014-02-18 Tue 20:20

Emacs 24.3.1 (Org mode 8.2.5h)

Validate

Advertisements

Read Full Post »


Just by playing around with CADABRA, I found out the existence of a super-useful LaTeX package, called breqn, which allows to break long equations at the edge of the page… like the wraping feature of most text editors.

However, when one manipulates really long expressions, I’d like to break these long equations through the page. I’m still looking for this feature… in that case I can improve even more the behaviour of cadabra‘s notebook, when compiling it to LaTeX.

Any suggestions???

Cheers!

Read Full Post »


Hello again! If you are looking for a Differential Geometry tool, a Sage package which is under development is SageManifold. Let’s see how to install it.

  1. Download the package using the link (currently v.0.2). I’d assume it is saved on your Downloads folder.
  2. Assuming you have SAGE installed, and you have created an alias to call it (see my previous post), run the following command
    $ sage -f ~/Downloads/manifolds-0.2.spkg
  3. To generate the documentation (in case you don’t want to or cannot download it), use either of the commands
    $ sage -docbuild sagemanifolds pdf
    $ sage -docbuild sagemanifolds html
  4. In order for using the package, start your WorkSheet with the command line
    from manifolds.all import *
Have a nice calculation!

Read Full Post »


After installing CalcHEP (see this post), oen should go to the working directory created by CalcHEP and running the program,

 $ cd ~/Documents/WorkCalcHEP
 $ ./calchep
Calling the program.

Calling the program.

Then the CalcHEP shell will appear, and you can choose your model (in future posts I’ll tell you the easiest way to create and import models)

List of Models included in CalcHEP

List of Models included in CalcHEP

Once you have picked a model, you can enter a process

Possibilities after choosing the model

Possibilities after choosing the model

The list of particles in the model you have chosen is shown, and you can write the process you want to study. Note that diagrams with certain particles can be excluded, but in this example I didn’t.

Entering the process on the shell

Entering the process on the shell

Resulting in,

Result of the entered (sub)process

Result of the entered (sub)process

CalcHEP can draw the Feynman diagrams of a certain (sub)process,

Feynman diagrams of the subprocess

Feynman diagrams of the subprocess

and after squaring the amplitude,

Squaring the (sub)process amplitude

Squaring the (sub)process amplitude

you can see the “squared Feynman diagrams” 🙂 Cool, Isn’t it?

Squared Feynman diagrams of the (sub)process

Squared Feynman diagrams of the (sub)process

In a future post I shall write about the numerical integration, or the possibility of exporting plots and Feynman diagrams to LaTeX 😀

Cheers.

Read Full Post »


In order to install CalcHEP, one needs to download the code and to compile it.

The code can be found at http://theory.sinp.msu.ru/~pukhov/calchep.html, as usual it is recommended to download the current version, unless a major pre-requisite problem is in sight.

Calhep-html

It is useful to install some packages before start compiling CalcHEP

 $ sudo apt-get install cernlib gfortran xlibx11-dev

Then, go to the folder where CalcHEP was downloaded and decompress it,

 $ tar -xzf calchep_3.4.cpc.tgz

Now, move to the calchep_3.4.cpc folder and compile the code

 $ cd calchep.3.4.cpc
 $ make

If the code has compiled without errors, it is enough to start working. However, usually it is recommended to do a couple of extra things.

Creating a Working folder

The default work directory is

 $CALCHEP/work/

, but in general it is a good idea to have an independent “work folder”, in order for doing so, in the CalcHEP directory there is a script to create that folder… it is called mkUsrDir and admits one argument (the path to the folder you want to create)

 $ ./mkUsrDir ~/Documents/WorkCalcHEP

Once created the working directory, you can move there and call the CalcHEP console (assuming the directory created above I would do the following)

 $ cd ~/Documents/WorkCalcHEP
 $ ./calchep

and you get this:calchep-console

Now, you are ready to start working!

Read Full Post »


Hi everyone, I’ve include the code for drawing Dynkin diagrams using Tikz package in LaTeX

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,0) node[anchor=east]  {$A_n$};
    \foreach \x in {0,...,5}
    \draw[xshift=\x cm,thick] (\x cm,0) circle (.3cm);
    \draw[dotted,thick] (0.3 cm,0) -- +(1.4 cm,0);
    \foreach \y in {1.15,...,4.15}
    \draw[xshift=\y cm,thick] (\y cm,0) -- +(1.4 cm,0);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,0) node[anchor=east]  {$B_n$};
    \foreach \x in {0,...,4}
    \draw[xshift=\x cm,thick] (\x cm,0) circle (.3cm);
    \draw[xshift=5 cm,thick,fill=black] (5 cm, 0) circle (.3 cm);
    \draw[dotted,thick] (0.3 cm,0) -- +(1.4 cm,0);
    \foreach \y in {1.15,...,3.15}
    \draw[xshift=\y cm,thick] (\y cm,0) -- +(1.4 cm,0);
    \draw[thick] (8.3 cm, .1 cm) -- +(1.4 cm,0);
    \draw[thick] (8.3 cm, -.1 cm) -- +(1.4 cm,0);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,0) node[anchor=east]  {$C_n$};
    \foreach \x in {0,...,4}
    \draw[xshift=\x cm,thick,fill=black] (\x cm,0) circle (.3cm);
    \draw[xshift=5 cm,thick] (5 cm, 0) circle (.3 cm);
    \draw[dotted,thick] (0.3 cm,0) -- +(1.4 cm,0);
    \foreach \y in {1.15,...,3.15}
    \draw[xshift=\y cm,thick] (\y cm,0) -- +(1.4 cm,0);
    \draw[thick] (8.3 cm, .1 cm) -- +(1.4 cm,0);
    \draw[thick] (8.3 cm, -.1 cm) -- +(1.4 cm,0);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,0) node[anchor=east]  {$D_n$};
    \foreach \x in {0,...,4}
    \draw[xshift=\x cm,thick] (\x cm,0) circle (.3cm);
    \draw[xshift=8 cm,thick] (30: 17 mm) circle (.3cm);
    \draw[xshift=8 cm,thick] (-30: 17 mm) circle (.3cm);
    \draw[dotted,thick] (0.3 cm,0) -- +(1.4 cm,0);
    \foreach \y in {1.15,...,3.15}
    \draw[xshift=\y cm,thick] (\y cm,0) -- +(1.4 cm,0);
    \draw[xshift=8 cm,thick] (30: 3 mm) -- (30: 14 mm);
    \draw[xshift=8 cm,thick] (-30: 3 mm) -- (-30: 14 mm);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,0) node[anchor=east]  {$G_2$};
    \draw[thick] (0 ,0) circle (.3 cm);
    \draw[thick,fill=black] (2 cm,0) circle (.3 cm);
    \draw[thick] (30: 3mm) -- +(1.5 cm, 0);
    \draw[thick] (0: 3 mm) -- +(1.4 cm, 0);
    \draw[thick] (-30: 3 mm) -- +(1.5 cm, 0);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-3,0) node[anchor=east]  {$F_4$};
    \draw[thick] (-2 cm ,0) circle (.3 cm);
    \draw[thick] (0 ,0) circle (.3 cm);
    \draw[thick,fill=black] (2 cm,0) circle (.3 cm);
    \draw[thick,fill=black] (4 cm,0) circle (.3 cm);
    \draw[thick] (15: 3mm) -- +(1.5 cm, 0);
    \draw[xshift=-2 cm,thick] (0: 3 mm) -- +(1.4 cm, 0);
    \draw[thick] (-15: 3 mm) -- +(1.5 cm, 0);
    \draw[xshift=2 cm,thick] (0: 3 mm) -- +(1.4 cm, 0);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,1) node[anchor=east]  {$E_6$};
    \foreach \x in {0,...,4}
    \draw[thick,xshift=\x cm] (\x cm,0) circle (3 mm);
    \foreach \y in {0,...,3}
    \draw[thick,xshift=\y cm] (\y cm,0) ++(.3 cm, 0) -- +(14 mm,0);
    \draw[thick] (4 cm,2 cm) circle (3 mm);
    \draw[thick] (4 cm, 3mm) -- +(0, 1.4 cm);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,1) node[anchor=east]  {$E_7$};
    \foreach \x in {0,...,5}
    \draw[thick,xshift=\x cm] (\x cm,0) circle (3 mm);
    \foreach \y in {0,...,4}
    \draw[thick,xshift=\y cm] (\y cm,0) ++(.3 cm, 0) -- +(14 mm,0);
    \draw[thick] (4 cm,2 cm) circle (3 mm);
    \draw[thick] (4 cm, 3mm) -- +(0, 1.4 cm);
  \end{tikzpicture}
\end{center}

\begin{center}
  \begin{tikzpicture}[scale=.4]
    \draw (-1,1) node[anchor=east]  {$E_8$};
    \foreach \x in {0,...,6}
    \draw[thick,xshift=\x cm] (\x cm,0) circle (3 mm);
    \foreach \y in {0,...,5}
    \draw[thick,xshift=\y cm] (\y cm,0) ++(.3 cm, 0) -- +(14 mm,0);
    \draw[thick] (4 cm,2 cm) circle (3 mm);
    \draw[thick] (4 cm, 3mm) -- +(0, 1.4 cm);
  \end{tikzpicture}
\end{center}

Bye

DOX

Read Full Post »


Hi people.

If you write in LaTeX as much as I do, you could find this tip useful.

Since I’m a physicist, I work a lot with Fourier Transformations, which could carry an annoying factor of 2\pi in the denominator.

\phi(x) = \int \frac{d^n x}{(2\pi)^n} e^{\imath p\cdot x}\tilde{\phi}(p).

A notation that might be useful for reducing the typing is the use of the bar notion as in “hbar”, \hbar = \frac{h}{2\pi}.

Thus, I search for it, and finally got the following,

\newcommand{\dbar}{\ensuremath{\mathchar'26\mkern-12mu d}}

will define a command \dbar which allows us to write

\phi(x) = \int {\mathchar'26\mkern-12mu d}^n x e^{\imath p\cdot x}\tilde{\phi}(p).

Enjoy,

Dox

Read Full Post »

Older Posts »