OpenMP parallelization of a for loop with function calls
Try to come up with a better function name than func().  You are the one who understands this code the most, so you should know how to give it a relevant name.
Try not to use single-character names, unless they're for a simple for-loop.  It's hard to tell what they're for, especially without comments.  If this ends up making the #pragma line even longer, then you can just split it into separate lines with a \ at the end of each line.
It's a little hard to read lines lacking whitespace:


dx2=(dx&lt;0.5?dx*dx:(1-dx)*(1-dx));



It's difficult to see the entire ternary statement, so add more whitespace:

dx2 = (dx &lt; 0.5 ? dx*dx : (1-dx)*(1-dx));


This concept should be applied everywhere, especially each statement in the loop.

Going back to the ternary, consider using an if/else here instead.  Sure, this is a short ternary, but that doesn't mean it should always be used, especially if it's harder to read carefully.

if (dx &lt; 0.5)
{
    dx2 = dx * dx;
}
else
{
    dx2 = (1-dx) * (1-dx);
}

This formatting is a bit hard to read:


        deltaE += coeff*((dmp+NSPES*part[i].s+part[j].s)-&gt;npot&gt;1?
mpot(r,dmp+NSPES*part[i].s+part[j].s,((REAL)rand())/RAND_MAX):
(dmp+NSPES*part[i].s+part[j].s)-&gt;pot[0](r,(dmp+NSPES*part[i].s+part[j].s)-&gt;dp ) );



At least reformat it to something like this:

deltaE += coeff*((dmp+NSPES*part[i].s+part[j].s)-&gt;npot&gt;1
        ? mpot(r,dmp+NSPES*part[i].s+part[j].s,((REAL)rand())/RAND_MAX)
        : (dmp+NSPES*part[i].s+part[j].s)-&gt;pot[0](r,(dmp+NSPES*part[i].s+part[j].s)-&gt;dp));


However, this may still be too lengthy for a ternary.  You could still use a plain if/else if it would help more with readability.