use C++11 for loops when available
remove some deprecated functionality
fix formula in brownian dynamics
fix use of deprecated functionality