\documentclass[12pt]{article} \pagestyle{empty} \begin{document} \begin{displaymath} u_{\rm con}\left(\phi_{g_a,f,p,q}\right) = \sum_{c \neq f} u_{\rm bond}(l_{g_a,c}) + \sum_{c \neq f} u_{\rm bend}(\theta_{g_a,c,d}) + \sum u_{\rm bend}(\theta_{c,g_a,d}) + \sum u_{\rm tor}(\phi_{g_a,c,d,e}) \end{displaymath} \begin{displaymath} + \sum u_{\rm tor}(\phi_{c,g_a,d,e}) + \sum u_{\rm imp}(\phi_{g_a,f,c,d}) + \sum_{c \neq f} u_{\rm imp}(\phi_{c,g_a,d,e}) \end{displaymath} \end{document}