Periodic boundary conditions and PME

Merge of pull requests #34 and #28 

Currently the force computation for electrostatics is missing.
I think the dispersion correction energy needs to be divided by the volume.

> On Nov 18, 2014, at 4:34 PM, Andrea Zonca <notifications@github.com> wrote:
> 
> In openmmapi/src/MBPolDispersionForceImpl.cpp:
> 
> > +    double energy = 0.;
> > +
> > +    c6d6Datatype c6d6Data = force.getDispersionParameters();
> > +
> > +    for (map<string, int>::const_iterator class1 = classCounts.begin(); class1 != classCounts.end(); ++class1)
> > +        for (map<string, int>::const_iterator class2 = class1; class2 != classCounts.end(); ++class2) {
> > +            c6d6Datatype ::iterator entry = c6d6Data.find(make_pair(class1->first, class2->first));
> > +            pair<double, double> c6d6;
> > +            if (entry == c6d6Data.end())
> > +                entry = c6d6Data.find(make_pair(class2->first, class1->first));
> > +            c6d6 = entry->second;
> > +            double count = (double) class1->second;
> > +            count *= (double) class2->second;
> > +            double energy_correction = energy_long_range_correction(cutoff, c6d6.first, c6d6.second);
> > +            energy += 2 * count * M_PI * energy_correction;
> > +        }
> @gmedders DispersionForce long range correction for the 256 molecules case, the energy_correction for O-H is -8.2 Kj/mol, this is multiplied by count which is 256*512 and becomes a very large number. Do you think there might be a problem here?
> 
> —
> Reply to this email directly or view it on GitHub.
>