[gmx-users] Calculating integrals?

Gmx QA gmxquestions at gmail.com
Tue Feb 7 14:58:47 CET 2017


Dear users

I have a question that is not explicitly related to Gromacs, but I hope
someone can answer anyway.

More often than not when you read other people's papers, they are showing
one or two equations with integrals. Often this integral runs in some
direction, or over the entire box from some value to some other value.

If I have some data in an array, and I want to integrate this over a range,
how you do that in general? I mean, using for example the trapezoidal rule
will give me the entire area under the curve, but if I am interested in the
value of the integral as a function of (say) distance?

I am not sure this makes sense, but if someone has a script somewhere were
they are doing something simple, and would be willing to share, that would
be much appreciated…

Best
/PK


More information about the gromacs.org_gmx-users mailing list