Index: molecuilder/src/molecule.hpp
===================================================================
--- molecuilder/src/molecule.hpp	(revision 6e250fbbb8335704fd4804e0558bdbc383a44475)
+++ molecuilder/src/molecule.hpp	(revision 6b937bdc52fc2fbea7d288c718973ad26f2fda1b)
@@ -146,24 +146,24 @@
 
   // templates for allowing global manipulation of all atoms
-  template <typename res> void ActOnAllAtoms( res (atom::*f)() );
-  template <typename res> void ActOnAllAtoms( res (atom::*f)() const );
-  template <typename res> void ActOnAllAtoms( res (atom::*f)() ) const;
-  template <typename res> void ActOnAllAtoms( res (atom::*f)() const) const;
-  template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T), T t );
-  template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T) const, T t );
-  template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T), T t ) const;
-  template <typename res, typename T> void ActOnAllAtoms( res (atom::*f)(T) const, T t ) const;
-  template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U), T t, U u );
-  template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U) const, T t, U u );
-  template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U), T t, U u ) const;
-  template <typename res, typename T, typename U> void ActOnAllAtoms( res (atom::*f)(T, U) const, T t, U u ) const;
-  template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V), T t, U u, V v);
-  template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V) const, T t, U u, V v);
-  template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V), T t, U u, V v) const;
-  template <typename res, typename T, typename U, typename V> void ActOnAllAtoms( res (atom::*f)(T, U, V) const, T t, U u, V v) const;
-  template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W), T t, U u, V v, W w);
-  template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W) const, T t, U u, V v, W w);
-  template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W), T t, U u, V v, W w) const;
-  template <typename res, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (atom::*f)(T, U, V, W) const, T t, U u, V v, W w) const;
+  template <typename res, typename typ> void ActOnAllAtoms( res (typ::*f)() );
+  template <typename res, typename typ> void ActOnAllAtoms( res (typ::*f)() const );
+  template <typename res, typename typ> void ActOnAllAtoms( res (typ::*f)() ) const;
+  template <typename res, typename typ> void ActOnAllAtoms( res (typ::*f)() const) const;
+  template <typename res, typename typ, typename T> void ActOnAllAtoms( res (typ::*f)(T), T t );
+  template <typename res, typename typ, typename T> void ActOnAllAtoms( res (typ::*f)(T) const, T t );
+  template <typename res, typename typ, typename T> void ActOnAllAtoms( res (typ::*f)(T), T t ) const;
+  template <typename res, typename typ, typename T> void ActOnAllAtoms( res (typ::*f)(T) const, T t ) const;
+  template <typename res, typename typ, typename T, typename U> void ActOnAllAtoms( res (typ::*f)(T, U), T t, U u );
+  template <typename res, typename typ, typename T, typename U> void ActOnAllAtoms( res (typ::*f)(T, U) const, T t, U u );
+  template <typename res, typename typ, typename T, typename U> void ActOnAllAtoms( res (typ::*f)(T, U), T t, U u ) const;
+  template <typename res, typename typ, typename T, typename U> void ActOnAllAtoms( res (typ::*f)(T, U) const, T t, U u ) const;
+  template <typename res, typename typ, typename T, typename U, typename V> void ActOnAllAtoms( res (typ::*f)(T, U, V), T t, U u, V v);
+  template <typename res, typename typ, typename T, typename U, typename V> void ActOnAllAtoms( res (typ::*f)(T, U, V) const, T t, U u, V v);
+  template <typename res, typename typ, typename T, typename U, typename V> void ActOnAllAtoms( res (typ::*f)(T, U, V), T t, U u, V v) const;
+  template <typename res, typename typ, typename T, typename U, typename V> void ActOnAllAtoms( res (typ::*f)(T, U, V) const, T t, U u, V v) const;
+  template <typename res, typename typ, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (typ::*f)(T, U, V, W), T t, U u, V v, W w);
+  template <typename res, typename typ, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (typ::*f)(T, U, V, W) const, T t, U u, V v, W w);
+  template <typename res, typename typ, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (typ::*f)(T, U, V, W), T t, U u, V v, W w) const;
+  template <typename res, typename typ, typename T, typename U, typename V, typename W> void ActOnAllAtoms( res (typ::*f)(T, U, V, W) const, T t, U u, V v, W w) const;
 
   // templates for allowing conditional global copying of molecule with each atom as single argument
@@ -174,27 +174,26 @@
 
   // templates for allowing global manipulation of an array with one entry per atom
-  void SetIndexedArrayForEachAtomTo ( atom **array, int TesselPoint::* index);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *));
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *), T t);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, void (*Setor)(T *, T *), T *t);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *));
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *), T t);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::*index, void (*Setor)(T *, T *), T *t);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::* index, T (atom::*Setor)(Vector &), Vector atom::*value);
-  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int TesselPoint::*index, T (atom::*Setor)(Vector &), Vector &vect );
+  void SetIndexedArrayForEachAtomTo ( atom **array, int ParticleInfo::* index);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int ParticleInfo::* index, void (*Setor)(T *, T *));
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int ParticleInfo::* index, void (*Setor)(T *, T *), T t);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int ParticleInfo::* index, void (*Setor)(T *, T *), T *t);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::* index, void (*Setor)(T *, T *));
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::* index, void (*Setor)(T *, T *), T t);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int element::* index, void (*Setor)(T *, T *), T *t);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int ParticleInfo::*index, T (atom::*Setor)(Vector &), Vector atom::*value);
+  template <typename T> void SetIndexedArrayForEachAtomTo ( T *array, int ParticleInfo::*index, T (atom::*Setor)(Vector &), Vector &vect );
 
   // templates for allowing global manipulation of each atom by entries in an array
-  template <typename T> void SetAtomValueToIndexedArray ( T *array, int TesselPoint::*index, T atom::*value );
-  template <typename T> void SetAtomValueToIndexedArray ( T *array, int element::*index, T atom::*value );
-  template <typename T> void SetAtomValueToValue ( T value, T atom::*ptr );
-
-  template <typename res> res SumPerAtom(res (atom::*f)() );
-  template <typename res> res SumPerAtom(res (atom::*f)() const );
-  template <typename res> res SumPerAtom(res (atom::*f)() ) const;
-  template <typename res> res SumPerAtom(res (atom::*f)() const ) const;
-  template <typename T, typename res> res SumPerAtom(res (atom::*f)(T) , T t );
-  template <typename T, typename res> res SumPerAtom(res (atom::*f)(T) const, T t );
-  template <typename T, typename res> res SumPerAtom(res (atom::*f)(T) , T t ) const;
-  template <typename T, typename res> res SumPerAtom(res (atom::*f)(T) const, T t ) const;
+  template <typename T, typename typ, typename typ2> void SetAtomValueToIndexedArray ( T *array, int typ::*index, T typ2::*value );
+  template <typename T, typename typ> void SetAtomValueToValue ( T value, T typ::*ptr );
+
+  template <typename res, typename typ> res SumPerAtom(res (typ::*f)() );
+  template <typename res, typename typ> res SumPerAtom(res (typ::*f)() const );
+  template <typename res, typename typ> res SumPerAtom(res (typ::*f)() ) const;
+  template <typename res, typename typ> res SumPerAtom(res (typ::*f)() const ) const;
+  template <typename res, typename typ, typename T> res SumPerAtom(res (typ::*f)(T) , T t );
+  template <typename res, typename typ, typename T> res SumPerAtom(res (typ::*f)(T) const, T t );
+  template <typename res, typename typ, typename T> res SumPerAtom(res (typ::*f)(T) , T t ) const;
+  template <typename res, typename typ, typename T> res SumPerAtom(res (typ::*f)(T) const, T t ) const;
 
   /// remove atoms from molecule.
