Inverse power potential

Implemented an inverse power potential to simulate systems of (polydisperse) soft spheres. This includes for example Hookean interactions (pow=2) and Hertzian interaction (pow=2.5).

This implementation is using STL pow for all exponents. Performance wise this may not be the fastest possible implementation, for instance using exp(pow*log) could be faster (twice as fast according to some blogs). Another possibility is to make the power a template parameter and then write template specialisations for the most common exponents, this however makes the interface with python ugly because cython does not deal well with template integer/double parameter yet. 

So in the interest of simplicity I would keep the implementation as is for now, maybe we should consider a function that calls exp(pow*log) though, this should be carefully benchmarked though as my guess is that the improvement is going to be marginal and will depend on the architecture (how well pow, exp and log can be optimized on a given architecture).

If you have any experience with pow please suggest any better solution.    
no, sorry I forgot to change a bunch of names, I started from the wca file
when writing this


On Fri, Aug 8, 2014 at 11:20 AM, Jacob Stevenson <notifications@github.com>
wrote:

> In source/pele/inversepower.h:
>
> > @@ -0,0 +1,118 @@
> > +#ifndef _PELE_INVERSEPOWER_H
> > +#define _PELE_INVERSEPOWER_H
> > +
> > +#include "simple_pairwise_potential.h"
> > +#include "simple_pairwise_ilist.h"
> > +#include "atomlist_potential.h"
> > +#include "distance.h"
> > +#include <memory>
> > +
> > +namespace pele {
> > +
> > +/**
> > + * Pairwise interaction for Weeks-Chandler-Andersen (WCA) potential
>
> is this comment still correct?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/pele-python/pele/pull/59/files#r15986219>.
>