Superpotential
Syntax
The definition of the superpotential is done via
SuperPotential = Term1 + Term2 + ...
where each term has the form
Term = [Coefficient]*Parameter*[Contraction] Superfield1.[Superfield2.Superfield3]
where the parts in brackets just have to be defined optionally. In general, one can define

Coefficient
: a numerical coefficient. If absent,1
is used 
Paramter
: a name for the coupling 
Contraction
: one can fix a contraction of charged indices. Usually, this is not necessary because SARAH derives the contraction by its own 
Particles
: each interaction in the superpotential can involve up to three superfields (see exception here: Higher dimensionsal terms in superpotential)
Contraction of indices
The indices of the involved particles are automatically contracted by SARAH as explained here. Sometimes, there are more possibilities to contract all indices. Therefore, it is also possible to fix the contraction of each term. The contraction used by SARAH can be seen by
ShowSuperpotentialContractions;
Properties of couplings and softbreaking terms
If the particles involved in the different interactions have more than one generation, the couplings are in general complex tensors carrying up to three generation indices. Assumptions like diagonality or no CP violation can added by using the parameter file. The corresponding softbreaking term to each superpotential coupling is automatically added to the Lagrangian. The softbreaking couplings carry the same indices as the superpotential coupling. They are named as
 Quartic terms:
Q[“Name of Coupling”]
 Trilinear terms:
T[“Name of Coupling”]
 Bilinear terms:
B[“Name of Coupling”]
 Linear terms:
L[“Name of Coupling”]
Simplifying assumptions for the softbreaking terms can be made independently of the assumptions for the superpotential parameters in parameters.m
Examples

The superpotential of the MSSM is defined via SuperPotential = Yu u.q.Hu  Yd d.q.Hd  Ye e.l.Hd + [Mu] Hu.Hd;

Softbreaking terms:
The following softbreaking terms are automatically added by SARAHT[Yu] Sq.SHu.Su + T[Yd] Sd.Sq.Hd  T[Ye] Se.Sl.SHd + B[\[Mu]] SHu.SHd

Index interpretation:
the term involving the up Yukawa couplingYu q.Hu.u
is interpreted by SARAH as
Y^u_{n_1,n_2} \hat{q}^i_{\alpha,n_1} \epsilon^{ij} \hat{H}_u^j\hat{\overline{u}}_{\beta,n_2} \delta_{\alpha,\beta}
whileT[Yu] Sq.SHu.Su
means
T(Y_u)_{n_1,n_2} \tilde{q}_{\alpha,n_1}^i \epsilon^{ij} H_u^i \tilde{u}_{\beta,n2}\delta_{\alpha \beta}
. 
Explicit contraction:
in particular for the SU(2) it might be necessary to adjust the index contraction: there is some ambiguity because of the relation among the fundamental and antifundamental representation in this group. For instance, in the seesaw 2 model and might want to define the coupling between the triplett
and the leptonsl
as follows:SuperPotential = Yt/Sqrt[2] epsTensor[lef1,lef2] epsTensor[lef2b,lef3] l.t.l
The default contraction of SARAH would have been instead
epsTensor[lef1,lef2] Delta[lef2b,lef3]
(see also automatic index contraction )