diff --git a/doc/Eqs/pair_gran_hooke_eqEpsd5.gif b/doc/Eqs/pair_gran_hooke_eqEpsd5.gif
new file mode 100644
index 0000000000000000000000000000000000000000..edfe71eae029dd99eefd74279bd4746d1bfc51df
Binary files /dev/null and b/doc/Eqs/pair_gran_hooke_eqEpsd5.gif differ
diff --git a/doc/Eqs/pair_gran_hooke_eqEpsd5.tex b/doc/Eqs/pair_gran_hooke_eqEpsd5.tex
new file mode 100644
index 0000000000000000000000000000000000000000..67de6b8fdeb467e9832fa68c16cd619765df2121
--- /dev/null
+++ b/doc/Eqs/pair_gran_hooke_eqEpsd5.tex
@@ -0,0 +1,9 @@
+\documentclass[12pt]{article}
+
+\begin{document}
+
+\begin{equation}
+ k_\mathrm{s} = k_\mathrm{t} \cdot R^{*2}
+\end{equation}
+
+\end{document}
diff --git a/doc/Manual.pdf b/doc/Manual.pdf
index 90338b00caa3593c34c464f57fdf4965bec05529..fb98630f80db648a9d022a589cd1e4c819357a54 100644
Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ
diff --git a/doc/compute_nparticles_tracer_region.html b/doc/compute_nparticles_tracer_region.html
index cb3dd3d3cf65fc7571baa81671a725da13630310..38970c9e321c72e1e3438a7e933e91b29ba953e8 100644
--- a/doc/compute_nparticles_tracer_region.html
+++ b/doc/compute_nparticles_tracer_region.html
@@ -15,8 +15,9 @@
 </P>
 <PRE>compute ID group-ID nparticles/tracer/region 
 </PRE>
-<LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
-nparticles/tracer/region = style name of this compute command 
+<LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command  
+
+<LI>nparticles/tracer/region = style name of this compute command 
 
 <LI>region_count = obligatory keyword 
 
@@ -45,8 +46,9 @@ nparticles/tracer/region = style name of this compute command
 </PRE>
 <P><B>Description:</B>
 </P>
-<P>Define a computation that calculates the number of marked particles
-that are in the region speficied via the <I>region_count</I> keyword.
+<P>Define a computation that calculates the number and mass of marked and un-marked particles
+that are in the region speficied via the <I>region_count</I> keyword. Particles have
+to be in the group "group-ID" to be counted.
 </P>
 <P>Note that only particles marked by a <A HREF = "fix_property_atom_tracer.html">fix property/atom/tracer</A>
 or <A HREF = "fix_property_atom_tracer_stream.html">fix property/atom/tracer/stream</A>
@@ -77,10 +79,18 @@ is used multiple times, the last setting will be applied.
 </P>
 <P><B>Output info:</B>
 </P>
-<P>This compute calculates a global scalar (the number marked particles in 
-the specified region), which can be accessed  by any command that uses global 
-vector values from a compute as input.  See <A HREF = "Section_howto.html#howto_15">this
-section</A> for an overview of LAMMPS output
+<P>This this compute calculates a global vector containing the following information 
+(the number in brackets corresponds to the vector id): 
+</P>
+<LI><B>(1)</B> total number of (marked + un-marked) particles in region 
+
+<LI><B>(2)</B> number of marked particles in region 
+
+<LI><B>(3)</B> total mass of (marked + un-marked) particles in region 
+
+<LI><B>(4)</B> mass of marked particles in region 
+
+<P>See <A HREF = "Section_howto.html#howto_15">this section</A> for an overview of LAMMPS output
 options.
 </P>
 <P><B>Restrictions:</B> 
diff --git a/doc/compute_nparticles_tracer_region.txt b/doc/compute_nparticles_tracer_region.txt
index a424dda0950a0e2f7097af00e754e93bae23b3b0..e6ca17c5f1ae47c2174c040f01931806120cedef 100644
--- a/doc/compute_nparticles_tracer_region.txt
+++ b/doc/compute_nparticles_tracer_region.txt
@@ -12,7 +12,7 @@ compute nparticles/tracer/region command :h3
 
 compute ID group-ID nparticles/tracer/region :pre
 
-ID, group-ID are documented in "compute"_compute.html command
+ID, group-ID are documented in "compute"_compute.html command  :l
 nparticles/tracer/region = style name of this compute command :l
 region_count = obligatory keyword :l
 region-ID = ID of region atoms must be in to be counted :l
@@ -35,8 +35,9 @@ compute nparticles all nparticles/tracer/region region_count count tracer tr per
 
 [Description:]
 
-Define a computation that calculates the number of marked particles
-that are in the region speficied via the {region_count} keyword.
+Define a computation that calculates the number and mass of marked and un-marked particles
+that are in the region speficied via the {region_count} keyword. Particles have
+to be in the group "group-ID" to be counted.
 
 Note that only particles marked by a "fix property/atom/tracer"_fix_property_atom_tracer.html
 or "fix property/atom/tracer/stream"_fix_property_atom_tracer_stream.html
@@ -67,10 +68,15 @@ is used multiple times, the last setting will be applied.
 
 [Output info:]
 
-This compute calculates a global scalar (the number marked particles in 
-the specified region), which can be accessed  by any command that uses global 
-vector values from a compute as input.  See "this
-section"_Section_howto.html#howto_15 for an overview of LAMMPS output
+This this compute calculates a global vector containing the following information 
+(the number in brackets corresponds to the vector id): 
+
+[(1)] total number of (marked + un-marked) particles in region :l
+[(2)] number of marked particles in region :l
+[(3)] total mass of (marked + un-marked) particles in region :l
+[(4)] mass of marked particles in region :l
+
+See "this section"_Section_howto.html#howto_15 for an overview of LAMMPS output
 options.
 
 [Restrictions:] 
diff --git a/doc/fix_insert_pack.html b/doc/fix_insert_pack.html
index 67817b2acf13c02ebe210edce25ef9f28f56c5db..eb50a122792f7cf4b1e2572f58655d611b68eecf 100644
--- a/doc/fix_insert_pack.html
+++ b/doc/fix_insert_pack.html
@@ -31,7 +31,7 @@
 
 <LI>one or more general keyword/value pairs can be appended 
 
-<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or <I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>omega</I> 
+<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or <I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>orientation</I> or <I>omega</I> 
 
 <PRE>  <I>verbose</I> = yes or no
   <I>maxattempt</I> value = ma
@@ -62,6 +62,9 @@
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  <I>orientation</I> values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   <I>omega</I> values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_insert_pack.txt b/doc/fix_insert_pack.txt
index 6aa048dbe071c0ac2258a6825ba4ac56f09d46f0..25fd477bc9ad5d45195ed063d21fb5da358c0193 100644
--- a/doc/fix_insert_pack.txt
+++ b/doc/fix_insert_pack.txt
@@ -20,7 +20,7 @@ seed_value = random # seed (positive integer) :l
 distributiontemplate = obligatory keyword :l
 dist-ID = ID of a "fix_particledistribution_discrete"_fix_particledistribution_discrete.html to be used for particle insertion :l
 one or more general keyword/value pairs can be appended :l
-general_keywords = {verbose} or {maxattampt} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or {vel constant} or {vel uniform} or {vel gaussian} or {omega} :l
+general_keywords = {verbose} or {maxattampt} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or {vel constant} or {vel uniform} or {vel gaussian} or {orientation} or {omega} :l
   {verbose} = yes or no
   {maxattempt} value = ma
     ma = max # of insertion attempts per atom (positive integer)
@@ -50,6 +50,9 @@ general_keywords = {verbose} or {maxattampt} or {insert_every} or {overlapcheck}
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  {orientation} values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   {omega} values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_insert_rate_region.html b/doc/fix_insert_rate_region.html
index 9c82f2212ca7c74c787dc534bcc7466cf20de464..f508ac2e4048ab8ed514c9dba7308dc47f2de82d 100644
--- a/doc/fix_insert_rate_region.html
+++ b/doc/fix_insert_rate_region.html
@@ -31,7 +31,7 @@
 
 <LI>one or more general keyword/value pairs can be appended 
 
-<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>nparticles</I> or <I>mass</I> or <I>particlerate</I> or <I>massrate</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or <I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>omega</I> 
+<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>nparticles</I> or <I>mass</I> or <I>particlerate</I> or <I>massrate</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or <I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>orientation</I> or <I>omega</I> 
 
 <PRE>  <I>verbose</I> = yes or no
   <I>maxattempt</I> value = ma
@@ -72,6 +72,9 @@
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  <I>orientation</I> values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   <I>omega</I> values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_insert_rate_region.txt b/doc/fix_insert_rate_region.txt
index 78e98054b7f918db70a40b5059a7683c0029a055..df95617afe4ccdd2236baddb8363921600370e8e 100644
--- a/doc/fix_insert_rate_region.txt
+++ b/doc/fix_insert_rate_region.txt
@@ -20,7 +20,7 @@ seed_value = random # seed (positive integer) :l
 distributiontemplate = obligatory keyword :l
 dist-ID = ID of a "fix_particledistribution_discrete"_fix_particledistribution_discrete.html to be used for particle insertion :l
 one or more general keyword/value pairs can be appended :l
-general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {particlerate} or {massrate} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or {vel constant} or {vel uniform} or {vel gaussian} or {omega} :l
+general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {particlerate} or {massrate} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or {vel constant} or {vel uniform} or {vel gaussian} or {orientation} or {omega} :l
   {verbose} = yes or no
   {maxattempt} value = ma
     ma = max # of insertion attempts per atom (positive integer)
@@ -60,6 +60,9 @@ general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {parti
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  {orientation} values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   {omega} values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_insert_stream.html b/doc/fix_insert_stream.html
index df08fbdb383f7cc10d713a156ebd1abe14a11a34..d40672238aa593417e9979500882544f2cb8921a 100644
--- a/doc/fix_insert_stream.html
+++ b/doc/fix_insert_stream.html
@@ -31,7 +31,7 @@
 
 <LI>one or more general keyword/value pairs can be appended 
 
-<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>nparticles</I> or <I>mass</I> or <I>particlerate</I> or <I>massrate</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or<I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>omega</I> 
+<LI>general_keywords = <I>verbose</I> or <I>maxattampt</I> or <I>nparticles</I> or <I>mass</I> or <I>particlerate</I> or <I>massrate</I> or <I>insert_every</I> or <I>overlapcheck</I> or <I>all_in</I> or <I>random_distribute</I> or<I>vel constant</I> or <I>vel uniform</I> or <I>vel gaussian</I> or <I>orientation</I> or <I>omega</I> 
 
 <PRE>  <I>verbose</I> = yes or no
   <I>maxattempt</I> value = ma
@@ -70,6 +70,9 @@
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  <I>orientation</I> values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   <I>omega</I> values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_insert_stream.txt b/doc/fix_insert_stream.txt
index 73c51383733b7705cc61f8e4c8c7b57a6f1c4847..949a317fee0bded57199e24212bb08c02d8556fb 100644
--- a/doc/fix_insert_stream.txt
+++ b/doc/fix_insert_stream.txt
@@ -19,7 +19,7 @@ seed_value = random # seed (positive integer) :l
 distributiontemplate = obligatory keyword :l
 dist-ID = ID of a "fix_particledistribution_discrete"_fix_particledistribution_discrete.html to be used for particle insertion :l
 one or more general keyword/value pairs can be appended :l
-general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {particlerate} or {massrate} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or{vel constant} or {vel uniform} or {vel gaussian} or {omega} :l
+general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {particlerate} or {massrate} or {insert_every} or {overlapcheck} or {all_in} or {random_distribute} or{vel constant} or {vel uniform} or {vel gaussian} or {orientation} or {omega} :l
   {verbose} = yes or no
   {maxattempt} value = ma
     ma = max # of insertion attempts per atom (positive integer)
@@ -57,6 +57,9 @@ general_keywords = {verbose} or {maxattampt} or {nparticles} or {mass} or {parti
     vFluctx = standard deviation of Gaussian x-velocity fluctuation at insertion (velocity units)
     vFlucty = standard deviation of Gaussian y-velocity fluctuation at insertion (velocity units)
     vFluctz = standard deviation of Gaussian z-velocity fluctuation at insertion (velocity units)
+  {orientation} values = random or template
+    random = randomize rotational orientation
+    template = use orientation from particle template
   {omega} values = constant omegax omegay omegaz
     constant = obligatory word
     omegax = x-comonent of angular velocity (1/time units)
diff --git a/doc/fix_particletemplate_sphere.html b/doc/fix_particletemplate_sphere.html
index 7f311e677a4d7b06700f88c19cf016b957c7a8ec..a7f11f8b3a8bd1dd8bee9f98191f067ee75f67e2 100644
--- a/doc/fix_particletemplate_sphere.html
+++ b/doc/fix_particletemplate_sphere.html
@@ -27,13 +27,14 @@
 
 <LI>zero or more keyword/value pairs can be appended 
 
-<LI>keyword = <I>atom_type</I> or <I>density</I> or <I>radius</I> 
+<LI>keyword = <I>atom_type</I> or <I>density</I> or <I>volume_limit</I> or <I>radius</I> 
 
 <PRE><I>atom_type</I> value = atom type assigned to this particle template
 <I>density</I> values = random_style param1 (param2)
   random_style = 'constant' or 'uniform' or 'gaussian'
   param1 = density for 'constant', low value of density for 'uniform', expectancy value for 'gaussian'
     param2 = omitted for 'constant', high value of density for 'uniform', sigma value for 'gaussian'
+<I>volume_limit</I> value = lowest particle volume allowed in simulation
 <I>radius</I> values = random_style param1 (param2)
   random_style = 'constant' or 'uniform number' or 'uniform mass' or 'gaussian number'
   param1 = radius for 'constant', low value of radius for 'uniform', mu value for 'gaussian'
@@ -57,6 +58,9 @@
 </P>
 <P>IMPORTANT NOTE: As opposed to the number-based distributions used by <A HREF = "fix_pour.html">fix_pour</A> and <A HREF = "fix_pour_legacy.html">fix_pour_legacy</A>, this fix uses the more common distribution based on mass-% for the radius distribution (as does <A HREF = "fix_particledistribution_discrete.html">fix_particledistribution_discrete</A>).
 </P>
+<P>LIGGGHTS will throw an error if the particle volume is too small compared to machine precision. 
+If you are sure you know what you are doing you can override the default limit of 1e-12.
+</P>
 <P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
 </P>
 <P>Information about the random state in this fix is written to <A HREF = "restart.html">binary restart files</A> so you can restart a simulation with the same particles being chosen for insertion. None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant to this fix. No global scalar or vector or per-atom quantities are stored by this fix for access by various <A HREF = "Section_howto.html#4_15">output commands</A>. No parameter of this fix can be used with the <I>start</I>/<I>stop</I> keywords of the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy minimization</A>. 
@@ -67,6 +71,6 @@
 </P>
 <P><A HREF = "fix_particletemplate_sphere.html">fix_particletemplate_sphere</A>
 </P>
-<P><B>Default:</B> radius = 1.0, density = 1.0, atom_type = 1 
+<P><B>Default:</B> radius = 1.0, density = 1.0, atom_type = 1, volume_limit = 1e-12
 </P>
 </HTML>
diff --git a/doc/fix_particletemplate_sphere.txt b/doc/fix_particletemplate_sphere.txt
index f09b67abc2b97672d9178eae7dcbb599c57c3d3a..aafeec978272e5bfde2984d0760b5230ded807d5 100644
--- a/doc/fix_particletemplate_sphere.txt
+++ b/doc/fix_particletemplate_sphere.txt
@@ -18,12 +18,13 @@ particletemplate/sphere = style name of this fix command  :l
 seed = random number generator seed (integer value) :l
 n_spheres = number of spheres in the template :l
 zero or more keyword/value pairs can be appended :l
-keyword = {atom_type} or {density} or {radius} :l
+keyword = {atom_type} or {density} or {volume_limit} or {radius} :l
 {atom_type} value = atom type assigned to this particle template
 {density} values = random_style param1 (param2)
   random_style = 'constant' or 'uniform' or 'gaussian'
   param1 = density for 'constant', low value of density for 'uniform', expectancy value for 'gaussian'
     param2 = omitted for 'constant', high value of density for 'uniform', sigma value for 'gaussian'
+{volume_limit} value = lowest particle volume allowed in simulation
 {radius} values = random_style param1 (param2)
   random_style = 'constant' or 'uniform number' or 'uniform mass' or 'gaussian number'
   param1 = radius for 'constant', low value of radius for 'uniform', mu value for 'gaussian'
@@ -46,6 +47,9 @@ It is thus possible to define a uniform or gaussian distribution on top of the d
 
 IMPORTANT NOTE: As opposed to the number-based distributions used by "fix_pour"_fix_pour.html and "fix_pour_legacy"_fix_pour_legacy.html, this fix uses the more common distribution based on mass-% for the radius distribution (as does "fix_particledistribution_discrete"_fix_particledistribution_discrete.html).
 
+LIGGGHTS will throw an error if the particle volume is too small compared to machine precision. 
+If you are sure you know what you are doing you can override the default limit of 1e-12.
+
 [Restart, fix_modify, output, run start/stop, minimize info:]
 
 Information about the random state in this fix is written to "binary restart files"_restart.html so you can restart a simulation with the same particles being chosen for insertion. None of the "fix_modify"_fix_modify.html options are relevant to this fix. No global scalar or vector or per-atom quantities are stored by this fix for access by various "output commands"_Section_howto.html#4_15. No parameter of this fix can be used with the {start}/{stop} keywords of the "run"_run.html command. This fix is not invoked during "energy minimization"_minimize.html. 
@@ -56,4 +60,4 @@ Information about the random state in this fix is written to "binary restart fil
 
 "fix_particletemplate_sphere"_fix_particletemplate_sphere.html
 
-[Default:] radius = 1.0, density = 1.0, atom_type = 1 
+[Default:] radius = 1.0, density = 1.0, atom_type = 1, volume_limit = 1e-12
diff --git a/doc/pair_gran.html b/doc/pair_gran.html
index 622c704a3123931e954e644cdced4df6c048c6f2..adeb4df83fbddeb96be169138dd9ecf296910879 100644
--- a/doc/pair_gran.html
+++ b/doc/pair_gran.html
@@ -29,9 +29,10 @@
 
 <LI>zero or more keyword/value pairs may be appended 
 
-<PRE>  <I>rolling_friction</I> values = 'cdt' or 'epsd' or 'off'
+<PRE>  <I>rolling_friction</I> values = 'cdt' or 'epsd' or 'epsd2' or 'off'
     cdt = activates constant directional rolling friction model
     epsd = activates elastic-plastic spring-dashpot model
+    epsd2 = actiavtes an alternative version of the elastic-plastic spring-dashpot model
     off = no rolling friction model
   <I>cohesion</I> values = 'sjkr' or 'sjkr2' or'off'
     sjkr = activates simplified JKR cohesion model
@@ -215,6 +216,12 @@ particles lose contact. In the Hertzian case, a similar analogy holds, though th
 <PRE>fix id all property/global coefficientRollingViscousDamping peratomtypepair n_atomtypes value_11 value_12 .. value_21 value_22 .. .
     (value_ij=value for the coefficient of rolling friction between atom type i and j; n_atomtypes is the number of atom types you want to use in your simulation) 
 </PRE>
+<P>The command <I>rolling_friction</I> = 'epsd2' activates an alternative version of the 'epsd' model (see Iwashita and Oda). In contrast to the original model the rolling stiffness k_r is defined as
+</P>
+<CENTER><IMG SRC = "Eqs/pair_gran_hooke_eqEpsd5.gif">
+</CENTER>
+<P>where k_t is the abovementioned tangential stiffness. Furthermore, the viscous damping torque M_rd is disabled at all.
+</P>
 <P>A simple linear <B>cohesion model</B> can be activated by setting <I>cohesion</I> = 'sjkr' or 'sjkr2'
 (simplified Johnson-Kendall-Roberts model). If two particle are in contact, 
 it adds an additional normal force tending to maintain the contact, which writes 
diff --git a/doc/pair_gran.txt b/doc/pair_gran.txt
index f6961f26f7f0039013be312911c2d5b5c80132c3..3fb3d480c4ec23997a9a83a843bc80d1c54881d8 100644
--- a/doc/pair_gran.txt
+++ b/doc/pair_gran.txt
@@ -19,9 +19,10 @@ pair_style style keyword values :pre
 
 style = {gran/hooke} or {gran/hooke/history} or {gran/hertz/history} or {gran/hooke/history/simple} or {gran/hertz/history/simple} or {absolute_damping} :ulb,l
 zero or more keyword/value pairs may be appended :l
-  {rolling_friction} values = 'cdt' or 'epsd' or 'off'
+  {rolling_friction} values = 'cdt' or 'epsd' or 'epsd2' or 'off'
     cdt = activates constant directional rolling friction model
     epsd = activates elastic-plastic spring-dashpot model
+    epsd2 = actiavtes an alternative version of the elastic-plastic spring-dashpot model
     off = no rolling friction model
   {cohesion} values = 'sjkr' or 'sjkr2' or'off'
     sjkr = activates simplified JKR cohesion model
@@ -193,6 +194,12 @@ Here I_i/j is the moment of inertia and m_i/j is the mass of the particles i and
 fix id all property/global coefficientRollingViscousDamping peratomtypepair n_atomtypes value_11 value_12 .. value_21 value_22 .. .
     (value_ij=value for the coefficient of rolling friction between atom type i and j; n_atomtypes is the number of atom types you want to use in your simulation) :pre
 
+The command {rolling_friction} = 'epsd2' activates an alternative version of the 'epsd' model (see Iwashita and Oda). In contrast to the original model the rolling stiffness k_r is defined as
+
+:c,image(Eqs/pair_gran_hooke_eqEpsd5.gif)
+
+where k_t is the abovementioned tangential stiffness. Furthermore, the viscous damping torque M_rd is disabled at all.
+
 A simple linear [cohesion model] can be activated by setting {cohesion} = 'sjkr' or 'sjkr2'
 (simplified Johnson-Kendall-Roberts model). If two particle are in contact, 
 it adds an additional normal force tending to maintain the contact, which writes 
diff --git a/src/WINDOWS/LIGGGHTS.vcxproj b/src/WINDOWS/LIGGGHTS.vcxproj
new file mode 100644
index 0000000000000000000000000000000000000000..627d3fd51b01b8ee7a876068d83be3da17a67be6
--- /dev/null
+++ b/src/WINDOWS/LIGGGHTS.vcxproj
@@ -0,0 +1,1120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug_STUBS|Win32">
+      <Configuration>Debug_STUBS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug_STUBS|x64">
+      <Configuration>Debug_STUBS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release_STUBS|Win32">
+      <Configuration>Release_STUBS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release_STUBS|x64">
+      <Configuration>Release_STUBS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\abstract_mesh.h" />
+    <ClInclude Include="..\accelerator_cuda.h" />
+    <ClInclude Include="..\accelerator_omp.h" />
+    <ClInclude Include="..\angle.h" />
+    <ClInclude Include="..\associative_pointer_array.h" />
+    <ClInclude Include="..\associative_pointer_array_I.h" />
+    <ClInclude Include="..\atom.h" />
+    <ClInclude Include="..\atom_vec.h" />
+    <ClInclude Include="..\atom_vec_atomic.h" />
+    <ClInclude Include="..\atom_vec_bond_gran.h" />
+    <ClInclude Include="..\atom_vec_charge.h" />
+    <ClInclude Include="..\atom_vec_ellipsoid.h" />
+    <ClInclude Include="..\atom_vec_hybrid.h" />
+    <ClInclude Include="..\atom_vec_line.h" />
+    <ClInclude Include="..\atom_vec_sph.h" />
+    <ClInclude Include="..\atom_vec_sphere.h" />
+    <ClInclude Include="..\atom_vec_sph_var.h" />
+    <ClInclude Include="..\atom_vec_tri.h" />
+    <ClInclude Include="..\balance.h" />
+    <ClInclude Include="..\bond.h" />
+    <ClInclude Include="..\bond_gran.h" />
+    <ClInclude Include="..\bond_hybrid.h" />
+    <ClInclude Include="..\bounding_box.h" />
+    <ClInclude Include="..\cfd_datacoupling.h" />
+    <ClInclude Include="..\cfd_datacoupling_file.h" />
+    <ClInclude Include="..\cfd_datacoupling_mpi.h" />
+    <ClInclude Include="..\cfd_regionmodel.h" />
+    <ClInclude Include="..\cfd_regionmodel_none.h" />
+    <ClInclude Include="..\change_box.h" />
+    <ClInclude Include="..\coarsegraining.h" />
+    <ClInclude Include="..\comm.h" />
+    <ClInclude Include="..\compute.h" />
+    <ClInclude Include="..\compute_angle_local.h" />
+    <ClInclude Include="..\compute_atom_molecule.h" />
+    <ClInclude Include="..\compute_bond_local.h" />
+    <ClInclude Include="..\compute_centro_atom.h" />
+    <ClInclude Include="..\compute_cluster_atom.h" />
+    <ClInclude Include="..\compute_cna_atom.h" />
+    <ClInclude Include="..\compute_com.h" />
+    <ClInclude Include="..\compute_com_molecule.h" />
+    <ClInclude Include="..\compute_contact_atom.h" />
+    <ClInclude Include="..\compute_coord_atom.h" />
+    <ClInclude Include="..\compute_crosssection.h" />
+    <ClInclude Include="..\compute_dihedral_local.h" />
+    <ClInclude Include="..\compute_displace_atom.h" />
+    <ClInclude Include="..\compute_erotate_sphere.h" />
+    <ClInclude Include="..\compute_group_group.h" />
+    <ClInclude Include="..\compute_gyration.h" />
+    <ClInclude Include="..\compute_gyration_molecule.h" />
+    <ClInclude Include="..\compute_heat_flux.h" />
+    <ClInclude Include="..\compute_improper_local.h" />
+    <ClInclude Include="..\compute_ke.h" />
+    <ClInclude Include="..\compute_ke_atom.h" />
+    <ClInclude Include="..\compute_msd.h" />
+    <ClInclude Include="..\compute_msd_molecule.h" />
+    <ClInclude Include="..\compute_nparticles_tracer_region.h" />
+    <ClInclude Include="..\compute_pair.h" />
+    <ClInclude Include="..\compute_pair_gran_local.h" />
+    <ClInclude Include="..\compute_pair_local.h" />
+    <ClInclude Include="..\compute_pe.h" />
+    <ClInclude Include="..\compute_pe_atom.h" />
+    <ClInclude Include="..\compute_pressure.h" />
+    <ClInclude Include="..\compute_property_atom.h" />
+    <ClInclude Include="..\compute_property_local.h" />
+    <ClInclude Include="..\compute_property_molecule.h" />
+    <ClInclude Include="..\compute_rdf.h" />
+    <ClInclude Include="..\compute_reduce.h" />
+    <ClInclude Include="..\compute_reduce_region.h" />
+    <ClInclude Include="..\compute_rigid.h" />
+    <ClInclude Include="..\compute_slice.h" />
+    <ClInclude Include="..\compute_stress_atom.h" />
+    <ClInclude Include="..\compute_temp.h" />
+    <ClInclude Include="..\compute_temp_com.h" />
+    <ClInclude Include="..\compute_temp_deform.h" />
+    <ClInclude Include="..\compute_temp_partial.h" />
+    <ClInclude Include="..\compute_temp_profile.h" />
+    <ClInclude Include="..\compute_temp_ramp.h" />
+    <ClInclude Include="..\compute_temp_region.h" />
+    <ClInclude Include="..\compute_temp_sphere.h" />
+    <ClInclude Include="..\compute_ti.h" />
+    <ClInclude Include="..\container.h" />
+    <ClInclude Include="..\container_base.h" />
+    <ClInclude Include="..\container_base_I.h" />
+    <ClInclude Include="..\create_atoms.h" />
+    <ClInclude Include="..\create_box.h" />
+    <ClInclude Include="..\custom_value_tracker.h" />
+    <ClInclude Include="..\custom_value_tracker_I.h" />
+    <ClInclude Include="..\debug_liggghts.h" />
+    <ClInclude Include="..\delete_atoms.h" />
+    <ClInclude Include="..\delete_bonds.h" />
+    <ClInclude Include="..\dihedral.h" />
+    <ClInclude Include="..\displace_atoms.h" />
+    <ClInclude Include="..\domain.h" />
+    <ClInclude Include="..\domain_wedge.h" />
+    <ClInclude Include="..\domain_wedge_dummy.h" />
+    <ClInclude Include="..\dump.h" />
+    <ClInclude Include="..\dump_atom.h" />
+    <ClInclude Include="..\dump_atom_vtk.h" />
+    <ClInclude Include="..\dump_cfg.h" />
+    <ClInclude Include="..\dump_custom.h" />
+    <ClInclude Include="..\dump_dcd.h" />
+    <ClInclude Include="..\dump_decomposition_vtk.h" />
+    <ClInclude Include="..\dump_euler_vtk.h" />
+    <ClInclude Include="..\dump_image.h" />
+    <ClInclude Include="..\dump_local.h" />
+    <ClInclude Include="..\dump_mesh_stl.h" />
+    <ClInclude Include="..\dump_mesh_vtk.h" />
+    <ClInclude Include="..\dump_xyz.h" />
+    <ClInclude Include="..\error.h" />
+    <ClInclude Include="..\finish.h" />
+    <ClInclude Include="..\fix.h" />
+    <ClInclude Include="..\fix_adapt.h" />
+    <ClInclude Include="..\fix_addforce.h" />
+    <ClInclude Include="..\fix_aveforce.h" />
+    <ClInclude Include="..\fix_ave_atom.h" />
+    <ClInclude Include="..\fix_ave_correlate.h" />
+    <ClInclude Include="..\fix_ave_euler.h" />
+    <ClInclude Include="..\fix_ave_histo.h" />
+    <ClInclude Include="..\fix_ave_spatial.h" />
+    <ClInclude Include="..\fix_ave_time.h" />
+    <ClInclude Include="..\fix_balance.h" />
+    <ClInclude Include="..\fix_bond_create_gran.h" />
+    <ClInclude Include="..\fix_bond_propagate_gran.h" />
+    <ClInclude Include="..\fix_box_relax.h" />
+    <ClInclude Include="..\fix_cfd_coupling.h" />
+    <ClInclude Include="..\fix_cfd_coupling_convection.h" />
+    <ClInclude Include="..\fix_cfd_coupling_force.h" />
+    <ClInclude Include="..\fix_cfd_coupling_force_implicit.h" />
+    <ClInclude Include="..\fix_check_timestep_gran.h" />
+    <ClInclude Include="..\fix_check_timestep_sph.h" />
+    <ClInclude Include="..\fix_contact_history.h" />
+    <ClInclude Include="..\fix_contact_history_I.h" />
+    <ClInclude Include="..\fix_deform.h" />
+    <ClInclude Include="..\fix_deposit.h" />
+    <ClInclude Include="..\fix_diam_max.h" />
+    <ClInclude Include="..\fix_drag.h" />
+    <ClInclude Include="..\fix_dt_reset.h" />
+    <ClInclude Include="..\fix_dummy.h" />
+    <ClInclude Include="..\fix_efield.h" />
+    <ClInclude Include="..\fix_enforce2d.h" />
+    <ClInclude Include="..\fix_evaporate.h" />
+    <ClInclude Include="..\fix_external.h" />
+    <ClInclude Include="..\fix_freeze.h" />
+    <ClInclude Include="..\fix_gravity.h" />
+    <ClInclude Include="..\fix_heat.h" />
+    <ClInclude Include="..\fix_heat_gran.h" />
+    <ClInclude Include="..\fix_heat_gran_conduction.h" />
+    <ClInclude Include="..\fix_heat_gran_radiation.h" />
+    <ClInclude Include="..\fix_indent.h" />
+    <ClInclude Include="..\fix_insert.h" />
+    <ClInclude Include="..\fix_insert_pack.h" />
+    <ClInclude Include="..\fix_insert_rate_region.h" />
+    <ClInclude Include="..\fix_insert_stream.h" />
+    <ClInclude Include="..\fix_insert_stream_moving.h" />
+    <ClInclude Include="..\fix_langevin.h" />
+    <ClInclude Include="..\fix_lineforce.h" />
+    <ClInclude Include="..\fix_massflow_mesh.h" />
+    <ClInclude Include="..\fix_mesh.h" />
+    <ClInclude Include="..\fix_mesh_surface.h" />
+    <ClInclude Include="..\fix_mesh_surface_stress.h" />
+    <ClInclude Include="..\fix_mesh_surface_stress_contact.h" />
+    <ClInclude Include="..\fix_mesh_surface_stress_servo.h" />
+    <ClInclude Include="..\fix_minimize.h" />
+    <ClInclude Include="..\fix_momentum.h" />
+    <ClInclude Include="..\fix_move.h" />
+    <ClInclude Include="..\fix_move_mesh.h" />
+    <ClInclude Include="..\fix_multisphere.h" />
+    <ClInclude Include="..\fix_neighlist_mesh.h" />
+    <ClInclude Include="..\fix_nh.h" />
+    <ClInclude Include="..\fix_nh_sphere.h" />
+    <ClInclude Include="..\fix_nph.h" />
+    <ClInclude Include="..\fix_nph_sphere.h" />
+    <ClInclude Include="..\fix_npt.h" />
+    <ClInclude Include="..\fix_npt_sphere.h" />
+    <ClInclude Include="..\fix_nve.h" />
+    <ClInclude Include="..\fix_nve_limit.h" />
+    <ClInclude Include="..\fix_nve_noforce.h" />
+    <ClInclude Include="..\fix_nve_sph.h" />
+    <ClInclude Include="..\fix_nve_sphere.h" />
+    <ClInclude Include="..\fix_nve_sphere_limit.h" />
+    <ClInclude Include="..\fix_nve_sph_stationary.h" />
+    <ClInclude Include="..\fix_nvt.h" />
+    <ClInclude Include="..\fix_nvt_sllod.h" />
+    <ClInclude Include="..\fix_nvt_sphere.h" />
+    <ClInclude Include="..\fix_orient_fcc.h" />
+    <ClInclude Include="..\fix_particledistribution_discrete.h" />
+    <ClInclude Include="..\fix_planeforce.h" />
+    <ClInclude Include="..\fix_pour.h" />
+    <ClInclude Include="..\fix_press_berendsen.h" />
+    <ClInclude Include="..\fix_print.h" />
+    <ClInclude Include="..\fix_property_atom.h" />
+    <ClInclude Include="..\fix_property_atom_tracer.h" />
+    <ClInclude Include="..\fix_property_atom_tracer_stream.h" />
+    <ClInclude Include="..\fix_property_global.h" />
+    <ClInclude Include="..\fix_read_restart.h" />
+    <ClInclude Include="..\fix_recenter.h" />
+    <ClInclude Include="..\fix_region_variable.h" />
+    <ClInclude Include="..\fix_remove.h" />
+    <ClInclude Include="..\fix_respa.h" />
+    <ClInclude Include="..\fix_restrain.h" />
+    <ClInclude Include="..\fix_rigid.h" />
+    <ClInclude Include="..\fix_rigid_nve.h" />
+    <ClInclude Include="..\fix_rigid_nvt.h" />
+    <ClInclude Include="..\fix_scalar_transport_equation.h" />
+    <ClInclude Include="..\fix_setforce.h" />
+    <ClInclude Include="..\fix_shake.h" />
+    <ClInclude Include="..\fix_shear_history.h" />
+    <ClInclude Include="..\fix_sph.h" />
+    <ClInclude Include="..\fix_sph_density_continuity.h" />
+    <ClInclude Include="..\fix_sph_density_corr.h" />
+    <ClInclude Include="..\fix_sph_density_summation.h" />
+    <ClInclude Include="..\fix_sph_pressure.h" />
+    <ClInclude Include="..\fix_spring.h" />
+    <ClInclude Include="..\fix_spring_rg.h" />
+    <ClInclude Include="..\fix_spring_self.h" />
+    <ClInclude Include="..\fix_store_force.h" />
+    <ClInclude Include="..\fix_store_state.h" />
+    <ClInclude Include="..\fix_template_multiplespheres.h" />
+    <ClInclude Include="..\fix_template_multisphere.h" />
+    <ClInclude Include="..\fix_template_sphere.h" />
+    <ClInclude Include="..\fix_temp_berendsen.h" />
+    <ClInclude Include="..\fix_temp_rescale.h" />
+    <ClInclude Include="..\fix_thermal_conductivity.h" />
+    <ClInclude Include="..\fix_tmd.h" />
+    <ClInclude Include="..\fix_ttm.h" />
+    <ClInclude Include="..\fix_viscosity.h" />
+    <ClInclude Include="..\fix_viscous.h" />
+    <ClInclude Include="..\fix_wall.h" />
+    <ClInclude Include="..\fix_wall_gran.h" />
+    <ClInclude Include="..\fix_wall_gran_hertz_history.h" />
+    <ClInclude Include="..\fix_wall_gran_hertz_history_simple.h" />
+    <ClInclude Include="..\fix_wall_gran_hooke.h" />
+    <ClInclude Include="..\fix_wall_gran_hooke_history.h" />
+    <ClInclude Include="..\fix_wall_gran_hooke_history_simple.h" />
+    <ClInclude Include="..\fix_wall_gran_hooke_simple.h" />
+    <ClInclude Include="..\fix_wall_harmonic.h" />
+    <ClInclude Include="..\fix_wall_lj126.h" />
+    <ClInclude Include="..\fix_wall_lj93.h" />
+    <ClInclude Include="..\fix_wall_reflect.h" />
+    <ClInclude Include="..\fix_wall_region.h" />
+    <ClInclude Include="..\fix_wall_region_sph.h" />
+    <ClInclude Include="..\fix_wall_sph.h" />
+    <ClInclude Include="..\force.h" />
+    <ClInclude Include="..\general_container.h" />
+    <ClInclude Include="..\general_container_I.h" />
+    <ClInclude Include="..\group.h" />
+    <ClInclude Include="..\image.h" />
+    <ClInclude Include="..\improper.h" />
+    <ClInclude Include="..\input.h" />
+    <ClInclude Include="..\input_mesh_tet.h" />
+    <ClInclude Include="..\input_mesh_tri.h" />
+    <ClInclude Include="..\input_multisphere.h" />
+    <ClInclude Include="..\integrate.h" />
+    <ClInclude Include="..\irregular.h" />
+    <ClInclude Include="..\kspace.h" />
+    <ClInclude Include="..\lammps.h" />
+    <ClInclude Include="..\lattice.h" />
+    <ClInclude Include="..\lbalance.h" />
+    <ClInclude Include="..\lbalance_simple.h" />
+    <ClInclude Include="..\library.h" />
+    <ClInclude Include="..\library_cfd_coupling.h" />
+    <ClInclude Include="..\lmptype.h" />
+    <ClInclude Include="..\lmpwindows.h" />
+    <ClInclude Include="..\math_const.h" />
+    <ClInclude Include="..\math_extra.h" />
+    <ClInclude Include="..\math_extra_liggghts.h" />
+    <ClInclude Include="..\mech_param_gran.h" />
+    <ClInclude Include="..\memory.h" />
+    <ClInclude Include="..\memory_ns.h" />
+    <ClInclude Include="..\mesh_mover.h" />
+    <ClInclude Include="..\min.h" />
+    <ClInclude Include="..\minimize.h" />
+    <ClInclude Include="..\min_cg.h" />
+    <ClInclude Include="..\min_fire.h" />
+    <ClInclude Include="..\min_hftn.h" />
+    <ClInclude Include="..\min_linesearch.h" />
+    <ClInclude Include="..\min_quickmin.h" />
+    <ClInclude Include="..\min_sd.h" />
+    <ClInclude Include="..\modified_andrew.h" />
+    <ClInclude Include="..\modify.h" />
+    <ClInclude Include="..\mpi_liggghts.h" />
+    <ClInclude Include="..\multisphere.h" />
+    <ClInclude Include="..\multisphere_I.h" />
+    <ClInclude Include="..\multisphere_parallel.h" />
+    <ClInclude Include="..\multisphere_parallel_I.h" />
+    <ClInclude Include="..\multi_node_mesh.h" />
+    <ClInclude Include="..\multi_node_mesh_I.h" />
+    <ClInclude Include="..\multi_node_mesh_parallel.h" />
+    <ClInclude Include="..\multi_node_mesh_parallel_buffer_I.h" />
+    <ClInclude Include="..\multi_node_mesh_parallel_I.h" />
+    <ClInclude Include="..\multi_vector_container.h" />
+    <ClInclude Include="..\neighbor.h" />
+    <ClInclude Include="..\neigh_bond.h" />
+    <ClInclude Include="..\neigh_derive.h" />
+    <ClInclude Include="..\neigh_dummy.h" />
+    <ClInclude Include="..\neigh_full.h" />
+    <ClInclude Include="..\neigh_gran.h" />
+    <ClInclude Include="..\neigh_half_bin.h" />
+    <ClInclude Include="..\neigh_half_multi.h" />
+    <ClInclude Include="..\neigh_half_nsq.h" />
+    <ClInclude Include="..\neigh_list.h" />
+    <ClInclude Include="..\neigh_mlg_dummy.h" />
+    <ClInclude Include="..\neigh_multi_level_grid.h" />
+    <ClInclude Include="..\neigh_request.h" />
+    <ClInclude Include="..\neigh_respa.h" />
+    <ClInclude Include="..\output.h" />
+    <ClInclude Include="..\pack.h" />
+    <ClInclude Include="..\pair.h" />
+    <ClInclude Include="..\pair_beck.h" />
+    <ClInclude Include="..\pair_born.h" />
+    <ClInclude Include="..\pair_born_coul_wolf.h" />
+    <ClInclude Include="..\pair_buck.h" />
+    <ClInclude Include="..\pair_buck_coul_cut.h" />
+    <ClInclude Include="..\pair_coul_cut.h" />
+    <ClInclude Include="..\pair_coul_debye.h" />
+    <ClInclude Include="..\pair_coul_wolf.h" />
+    <ClInclude Include="..\pair_dpd.h" />
+    <ClInclude Include="..\pair_dpd_tstat.h" />
+    <ClInclude Include="..\pair_gauss.h" />
+    <ClInclude Include="..\pair_gran.h" />
+    <ClInclude Include="..\pair_gran_hertz_history.h" />
+    <ClInclude Include="..\pair_gran_hertz_history_hamaker.h" />
+    <ClInclude Include="..\pair_gran_hertz_history_liquid.h" />
+    <ClInclude Include="..\pair_gran_hertz_history_simple.h" />
+    <ClInclude Include="..\pair_gran_hooke.h" />
+    <ClInclude Include="..\pair_gran_hooke_history.h" />
+    <ClInclude Include="..\pair_gran_hooke_history_hysteresis.h" />
+    <ClInclude Include="..\pair_gran_hooke_history_simple.h" />
+    <ClInclude Include="..\pair_gran_hooke_simple.h" />
+    <ClInclude Include="..\pair_hybrid.h" />
+    <ClInclude Include="..\pair_hybrid_overlay.h" />
+    <ClInclude Include="..\pair_lj96_cut.h" />
+    <ClInclude Include="..\pair_lj_cubic.h" />
+    <ClInclude Include="..\pair_lj_cut.h" />
+    <ClInclude Include="..\pair_lj_cut_coul_cut.h" />
+    <ClInclude Include="..\pair_lj_cut_coul_debye.h" />
+    <ClInclude Include="..\pair_lj_expand.h" />
+    <ClInclude Include="..\pair_lj_gromacs.h" />
+    <ClInclude Include="..\pair_lj_gromacs_coul_gromacs.h" />
+    <ClInclude Include="..\pair_lj_smooth.h" />
+    <ClInclude Include="..\pair_lj_smooth_linear.h" />
+    <ClInclude Include="..\pair_morse.h" />
+    <ClInclude Include="..\pair_soft.h" />
+    <ClInclude Include="..\pair_sph.h" />
+    <ClInclude Include="..\pair_sph_artvisc_tenscorr.h" />
+    <ClInclude Include="..\pair_table.h" />
+    <ClInclude Include="..\pair_yukawa.h" />
+    <ClInclude Include="..\particleToInsert.h" />
+    <ClInclude Include="..\particleToInsert_multisphere.h" />
+    <ClInclude Include="..\pointers.h" />
+    <ClInclude Include="..\primitive_wall.h" />
+    <ClInclude Include="..\primitive_wall_definitions.h" />
+    <ClInclude Include="..\probability_distribution.h" />
+    <ClInclude Include="..\procmap.h" />
+    <ClInclude Include="..\random_mars.h" />
+    <ClInclude Include="..\random_park.h" />
+    <ClInclude Include="..\read_data.h" />
+    <ClInclude Include="..\read_restart.h" />
+    <ClInclude Include="..\region.h" />
+    <ClInclude Include="..\region_block.h" />
+    <ClInclude Include="..\region_cone.h" />
+    <ClInclude Include="..\region_cylinder.h" />
+    <ClInclude Include="..\region_intersect.h" />
+    <ClInclude Include="..\region_mesh_tet.h" />
+    <ClInclude Include="..\region_plane.h" />
+    <ClInclude Include="..\region_prism.h" />
+    <ClInclude Include="..\region_sphere.h" />
+    <ClInclude Include="..\region_union.h" />
+    <ClInclude Include="..\region_wedge.h" />
+    <ClInclude Include="..\replicate.h" />
+    <ClInclude Include="..\respa.h" />
+    <ClInclude Include="..\run.h" />
+    <ClInclude Include="..\scalar_container.h" />
+    <ClInclude Include="..\set.h" />
+    <ClInclude Include="..\special.h" />
+    <ClInclude Include="..\sph_kernels.h" />
+    <ClInclude Include="..\sph_kernel_cubicspline.h" />
+    <ClInclude Include="..\sph_kernel_cubicspline2D.h" />
+    <ClInclude Include="..\sph_kernel_spiky.h" />
+    <ClInclude Include="..\sph_kernel_spiky2D.h" />
+    <ClInclude Include="..\sph_kernel_wendland.h" />
+    <ClInclude Include="..\sph_kernel_wendland2D.h" />
+    <ClInclude Include="..\style_angle.h" />
+    <ClInclude Include="..\style_atom.h" />
+    <ClInclude Include="..\style_bond.h" />
+    <ClInclude Include="..\style_cfd_datacoupling.h" />
+    <ClInclude Include="..\style_cfd_regionmodel.h" />
+    <ClInclude Include="..\style_command.h" />
+    <ClInclude Include="..\style_compute.h" />
+    <ClInclude Include="..\style_dihedral.h" />
+    <ClInclude Include="..\style_dump.h" />
+    <ClInclude Include="..\style_fix.h" />
+    <ClInclude Include="..\style_improper.h" />
+    <ClInclude Include="..\style_integrate.h" />
+    <ClInclude Include="..\style_kspace.h" />
+    <ClInclude Include="..\style_lb.h" />
+    <ClInclude Include="..\style_minimize.h" />
+    <ClInclude Include="..\style_pair.h" />
+    <ClInclude Include="..\style_region.h" />
+    <ClInclude Include="..\style_sph_kernel.h" />
+    <ClInclude Include="..\suffix.h" />
+    <ClInclude Include="..\surface_mesh.h" />
+    <ClInclude Include="..\surface_mesh_I.h" />
+    <ClInclude Include="..\thermo.h" />
+    <ClInclude Include="..\timer.h" />
+    <ClInclude Include="..\tracking_mesh.h" />
+    <ClInclude Include="..\tracking_mesh_I.h" />
+    <ClInclude Include="..\tri_mesh.h" />
+    <ClInclude Include="..\tri_mesh_deform.h" />
+    <ClInclude Include="..\tri_mesh_I.h" />
+    <ClInclude Include="..\tri_mesh_planar.h" />
+    <ClInclude Include="..\tri_mesh_planar_I.h" />
+    <ClInclude Include="..\universe.h" />
+    <ClInclude Include="..\update.h" />
+    <ClInclude Include="..\variable.h" />
+    <ClInclude Include="..\vector_container.h" />
+    <ClInclude Include="..\vector_liggghts.h" />
+    <ClInclude Include="..\velocity.h" />
+    <ClInclude Include="..\verlet.h" />
+    <ClInclude Include="..\verlet_implicit.h" />
+    <ClInclude Include="..\version.h" />
+    <ClInclude Include="..\version_liggghts.h" />
+    <ClInclude Include="..\volume_mesh.h" />
+    <ClInclude Include="..\volume_mesh_I.h" />
+    <ClInclude Include="..\write_restart.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\angle.cpp" />
+    <ClCompile Include="..\atom.cpp" />
+    <ClCompile Include="..\atom_vec.cpp" />
+    <ClCompile Include="..\atom_vec_atomic.cpp" />
+    <ClCompile Include="..\atom_vec_bond_gran.cpp" />
+    <ClCompile Include="..\atom_vec_charge.cpp" />
+    <ClCompile Include="..\atom_vec_ellipsoid.cpp" />
+    <ClCompile Include="..\atom_vec_hybrid.cpp" />
+    <ClCompile Include="..\atom_vec_line.cpp" />
+    <ClCompile Include="..\atom_vec_sph.cpp" />
+    <ClCompile Include="..\atom_vec_sphere.cpp" />
+    <ClCompile Include="..\atom_vec_sph_var.cpp" />
+    <ClCompile Include="..\atom_vec_tri.cpp" />
+    <ClCompile Include="..\balance.cpp" />
+    <ClCompile Include="..\bond.cpp" />
+    <ClCompile Include="..\bond_gran.cpp" />
+    <ClCompile Include="..\bond_hybrid.cpp" />
+    <ClCompile Include="..\bounding_box.cpp" />
+    <ClCompile Include="..\cfd_datacoupling.cpp" />
+    <ClCompile Include="..\cfd_datacoupling_file.cpp" />
+    <ClCompile Include="..\cfd_datacoupling_mpi.cpp" />
+    <ClCompile Include="..\cfd_regionmodel_none.cpp" />
+    <ClCompile Include="..\change_box.cpp" />
+    <ClCompile Include="..\coarsegraining.cpp" />
+    <ClCompile Include="..\comm.cpp" />
+    <ClCompile Include="..\compute.cpp" />
+    <ClCompile Include="..\compute_angle_local.cpp" />
+    <ClCompile Include="..\compute_atom_molecule.cpp" />
+    <ClCompile Include="..\compute_bond_local.cpp" />
+    <ClCompile Include="..\compute_centro_atom.cpp" />
+    <ClCompile Include="..\compute_cluster_atom.cpp" />
+    <ClCompile Include="..\compute_cna_atom.cpp" />
+    <ClCompile Include="..\compute_com.cpp" />
+    <ClCompile Include="..\compute_com_molecule.cpp" />
+    <ClCompile Include="..\compute_contact_atom.cpp" />
+    <ClCompile Include="..\compute_coord_atom.cpp" />
+    <ClCompile Include="..\compute_crosssection.cpp" />
+    <ClCompile Include="..\compute_dihedral_local.cpp" />
+    <ClCompile Include="..\compute_displace_atom.cpp" />
+    <ClCompile Include="..\compute_erotate_sphere.cpp" />
+    <ClCompile Include="..\compute_group_group.cpp" />
+    <ClCompile Include="..\compute_gyration.cpp" />
+    <ClCompile Include="..\compute_gyration_molecule.cpp" />
+    <ClCompile Include="..\compute_heat_flux.cpp" />
+    <ClCompile Include="..\compute_improper_local.cpp" />
+    <ClCompile Include="..\compute_ke.cpp" />
+    <ClCompile Include="..\compute_ke_atom.cpp" />
+    <ClCompile Include="..\compute_msd.cpp" />
+    <ClCompile Include="..\compute_msd_molecule.cpp" />
+    <ClCompile Include="..\compute_nparticles_tracer_region.cpp" />
+    <ClCompile Include="..\compute_pair.cpp" />
+    <ClCompile Include="..\compute_pair_gran_local.cpp" />
+    <ClCompile Include="..\compute_pair_local.cpp" />
+    <ClCompile Include="..\compute_pe.cpp" />
+    <ClCompile Include="..\compute_pe_atom.cpp" />
+    <ClCompile Include="..\compute_pressure.cpp" />
+    <ClCompile Include="..\compute_property_atom.cpp" />
+    <ClCompile Include="..\compute_property_local.cpp" />
+    <ClCompile Include="..\compute_property_molecule.cpp" />
+    <ClCompile Include="..\compute_rdf.cpp" />
+    <ClCompile Include="..\compute_reduce.cpp" />
+    <ClCompile Include="..\compute_reduce_region.cpp" />
+    <ClCompile Include="..\compute_rigid.cpp" />
+    <ClCompile Include="..\compute_slice.cpp" />
+    <ClCompile Include="..\compute_stress_atom.cpp" />
+    <ClCompile Include="..\compute_temp.cpp" />
+    <ClCompile Include="..\compute_temp_com.cpp" />
+    <ClCompile Include="..\compute_temp_deform.cpp" />
+    <ClCompile Include="..\compute_temp_partial.cpp" />
+    <ClCompile Include="..\compute_temp_profile.cpp" />
+    <ClCompile Include="..\compute_temp_ramp.cpp" />
+    <ClCompile Include="..\compute_temp_region.cpp" />
+    <ClCompile Include="..\compute_temp_sphere.cpp" />
+    <ClCompile Include="..\compute_ti.cpp" />
+    <ClCompile Include="..\container_base.cpp" />
+    <ClCompile Include="..\create_atoms.cpp" />
+    <ClCompile Include="..\create_box.cpp" />
+    <ClCompile Include="..\custom_value_tracker.cpp" />
+    <ClCompile Include="..\delete_atoms.cpp" />
+    <ClCompile Include="..\delete_bonds.cpp" />
+    <ClCompile Include="..\dihedral.cpp" />
+    <ClCompile Include="..\displace_atoms.cpp" />
+    <ClCompile Include="..\domain.cpp" />
+    <ClCompile Include="..\dump.cpp" />
+    <ClCompile Include="..\dump_atom.cpp" />
+    <ClCompile Include="..\dump_atom_vtk.cpp" />
+    <ClCompile Include="..\dump_cfg.cpp" />
+    <ClCompile Include="..\dump_custom.cpp" />
+    <ClCompile Include="..\dump_dcd.cpp" />
+    <ClCompile Include="..\dump_decomposition_vtk.cpp" />
+    <ClCompile Include="..\dump_euler_vtk.cpp" />
+    <ClCompile Include="..\dump_image.cpp" />
+    <ClCompile Include="..\dump_local.cpp" />
+    <ClCompile Include="..\dump_mesh_stl.cpp" />
+    <ClCompile Include="..\dump_mesh_vtk.cpp" />
+    <ClCompile Include="..\dump_xyz.cpp" />
+    <ClCompile Include="..\error.cpp" />
+    <ClCompile Include="..\finish.cpp" />
+    <ClCompile Include="..\fix.cpp" />
+    <ClCompile Include="..\fix_adapt.cpp" />
+    <ClCompile Include="..\fix_addforce.cpp" />
+    <ClCompile Include="..\fix_aveforce.cpp" />
+    <ClCompile Include="..\fix_ave_atom.cpp" />
+    <ClCompile Include="..\fix_ave_correlate.cpp" />
+    <ClCompile Include="..\fix_ave_euler.cpp" />
+    <ClCompile Include="..\fix_ave_histo.cpp" />
+    <ClCompile Include="..\fix_ave_spatial.cpp" />
+    <ClCompile Include="..\fix_ave_time.cpp" />
+    <ClCompile Include="..\fix_balance.cpp" />
+    <ClCompile Include="..\fix_bond_create_gran.cpp" />
+    <ClCompile Include="..\fix_bond_propagate_gran.cpp" />
+    <ClCompile Include="..\fix_box_relax.cpp" />
+    <ClCompile Include="..\fix_cfd_coupling.cpp" />
+    <ClCompile Include="..\fix_cfd_coupling_convection.cpp" />
+    <ClCompile Include="..\fix_cfd_coupling_force.cpp" />
+    <ClCompile Include="..\fix_cfd_coupling_force_implicit.cpp" />
+    <ClCompile Include="..\fix_check_timestep_gran.cpp" />
+    <ClCompile Include="..\fix_check_timestep_sph.cpp" />
+    <ClCompile Include="..\fix_contact_history.cpp" />
+    <ClCompile Include="..\fix_deform.cpp" />
+    <ClCompile Include="..\fix_deposit.cpp" />
+    <ClCompile Include="..\fix_diam_max.cpp" />
+    <ClCompile Include="..\fix_drag.cpp" />
+    <ClCompile Include="..\fix_dt_reset.cpp" />
+    <ClCompile Include="..\fix_efield.cpp" />
+    <ClCompile Include="..\fix_enforce2d.cpp" />
+    <ClCompile Include="..\fix_evaporate.cpp" />
+    <ClCompile Include="..\fix_external.cpp" />
+    <ClCompile Include="..\fix_freeze.cpp" />
+    <ClCompile Include="..\fix_gravity.cpp" />
+    <ClCompile Include="..\fix_heat.cpp" />
+    <ClCompile Include="..\fix_heat_gran.cpp" />
+    <ClCompile Include="..\fix_heat_gran_conduction.cpp" />
+    <ClCompile Include="..\fix_heat_gran_radiation.cpp" />
+    <ClCompile Include="..\fix_indent.cpp" />
+    <ClCompile Include="..\fix_insert.cpp" />
+    <ClCompile Include="..\fix_insert_pack.cpp" />
+    <ClCompile Include="..\fix_insert_rate_region.cpp" />
+    <ClCompile Include="..\fix_insert_stream.cpp" />
+    <ClCompile Include="..\fix_insert_stream_moving.cpp" />
+    <ClCompile Include="..\fix_langevin.cpp" />
+    <ClCompile Include="..\fix_lineforce.cpp" />
+    <ClCompile Include="..\fix_massflow_mesh.cpp" />
+    <ClCompile Include="..\fix_mesh.cpp" />
+    <ClCompile Include="..\fix_mesh_surface.cpp" />
+    <ClCompile Include="..\fix_mesh_surface_stress.cpp" />
+    <ClCompile Include="..\fix_mesh_surface_stress_contact.cpp" />
+    <ClCompile Include="..\fix_mesh_surface_stress_servo.cpp" />
+    <ClCompile Include="..\fix_minimize.cpp" />
+    <ClCompile Include="..\fix_momentum.cpp" />
+    <ClCompile Include="..\fix_move.cpp" />
+    <ClCompile Include="..\fix_move_mesh.cpp" />
+    <ClCompile Include="..\fix_multisphere.cpp" />
+    <ClCompile Include="..\fix_multisphere_comm.cpp" />
+    <ClCompile Include="..\fix_neighlist_mesh.cpp" />
+    <ClCompile Include="..\fix_nh.cpp" />
+    <ClCompile Include="..\fix_nh_sphere.cpp" />
+    <ClCompile Include="..\fix_nph.cpp" />
+    <ClCompile Include="..\fix_nph_sphere.cpp" />
+    <ClCompile Include="..\fix_npt.cpp" />
+    <ClCompile Include="..\fix_npt_sphere.cpp" />
+    <ClCompile Include="..\fix_nve.cpp" />
+    <ClCompile Include="..\fix_nve_limit.cpp" />
+    <ClCompile Include="..\fix_nve_noforce.cpp" />
+    <ClCompile Include="..\fix_nve_sph.cpp" />
+    <ClCompile Include="..\fix_nve_sphere.cpp" />
+    <ClCompile Include="..\fix_nve_sphere_limit.cpp" />
+    <ClCompile Include="..\fix_nve_sph_stationary.cpp" />
+    <ClCompile Include="..\fix_nvt.cpp" />
+    <ClCompile Include="..\fix_nvt_sllod.cpp" />
+    <ClCompile Include="..\fix_nvt_sphere.cpp" />
+    <ClCompile Include="..\fix_orient_fcc.cpp" />
+    <ClCompile Include="..\fix_particledistribution_discrete.cpp" />
+    <ClCompile Include="..\fix_planeforce.cpp" />
+    <ClCompile Include="..\fix_pour.cpp" />
+    <ClCompile Include="..\fix_press_berendsen.cpp" />
+    <ClCompile Include="..\fix_print.cpp" />
+    <ClCompile Include="..\fix_property_atom.cpp" />
+    <ClCompile Include="..\fix_property_atom_tracer.cpp" />
+    <ClCompile Include="..\fix_property_atom_tracer_stream.cpp" />
+    <ClCompile Include="..\fix_property_global.cpp" />
+    <ClCompile Include="..\fix_read_restart.cpp" />
+    <ClCompile Include="..\fix_recenter.cpp" />
+    <ClCompile Include="..\fix_region_variable.cpp" />
+    <ClCompile Include="..\fix_remove.cpp" />
+    <ClCompile Include="..\fix_respa.cpp" />
+    <ClCompile Include="..\fix_restrain.cpp" />
+    <ClCompile Include="..\fix_rigid.cpp" />
+    <ClCompile Include="..\fix_rigid_nve.cpp" />
+    <ClCompile Include="..\fix_rigid_nvt.cpp" />
+    <ClCompile Include="..\fix_scalar_transport_equation.cpp" />
+    <ClCompile Include="..\fix_setforce.cpp" />
+    <ClCompile Include="..\fix_shake.cpp" />
+    <ClCompile Include="..\fix_shear_history.cpp" />
+    <ClCompile Include="..\fix_sph.cpp" />
+    <ClCompile Include="..\fix_sph_density_continuity.cpp" />
+    <ClCompile Include="..\fix_sph_density_corr.cpp" />
+    <ClCompile Include="..\fix_sph_density_summation.cpp" />
+    <ClCompile Include="..\fix_sph_pressure.cpp" />
+    <ClCompile Include="..\fix_spring.cpp" />
+    <ClCompile Include="..\fix_spring_rg.cpp" />
+    <ClCompile Include="..\fix_spring_self.cpp" />
+    <ClCompile Include="..\fix_store_force.cpp" />
+    <ClCompile Include="..\fix_store_state.cpp" />
+    <ClCompile Include="..\fix_template_multiplespheres.cpp" />
+    <ClCompile Include="..\fix_template_multisphere.cpp" />
+    <ClCompile Include="..\fix_template_sphere.cpp" />
+    <ClCompile Include="..\fix_temp_berendsen.cpp" />
+    <ClCompile Include="..\fix_temp_rescale.cpp" />
+    <ClCompile Include="..\fix_thermal_conductivity.cpp" />
+    <ClCompile Include="..\fix_tmd.cpp" />
+    <ClCompile Include="..\fix_ttm.cpp" />
+    <ClCompile Include="..\fix_viscosity.cpp" />
+    <ClCompile Include="..\fix_viscous.cpp" />
+    <ClCompile Include="..\fix_wall.cpp" />
+    <ClCompile Include="..\fix_wall_gran.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hertz_history.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hertz_history_simple.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hooke.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hooke_history.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hooke_history_simple.cpp" />
+    <ClCompile Include="..\fix_wall_gran_hooke_simple.cpp" />
+    <ClCompile Include="..\fix_wall_harmonic.cpp" />
+    <ClCompile Include="..\fix_wall_lj126.cpp" />
+    <ClCompile Include="..\fix_wall_lj93.cpp" />
+    <ClCompile Include="..\fix_wall_reflect.cpp" />
+    <ClCompile Include="..\fix_wall_region.cpp" />
+    <ClCompile Include="..\fix_wall_region_sph.cpp" />
+    <ClCompile Include="..\fix_wall_sph.cpp" />
+    <ClCompile Include="..\force.cpp" />
+    <ClCompile Include="..\group.cpp" />
+    <ClCompile Include="..\image.cpp" />
+    <ClCompile Include="..\improper.cpp" />
+    <ClCompile Include="..\input.cpp" />
+    <ClCompile Include="..\input_mesh_tet.cpp" />
+    <ClCompile Include="..\input_mesh_tri.cpp" />
+    <ClCompile Include="..\input_multisphere.cpp" />
+    <ClCompile Include="..\integrate.cpp" />
+    <ClCompile Include="..\irregular.cpp" />
+    <ClCompile Include="..\kspace.cpp" />
+    <ClCompile Include="..\lammps.cpp" />
+    <ClCompile Include="..\lattice.cpp" />
+    <ClCompile Include="..\lbalance_simple.cpp" />
+    <ClCompile Include="..\library.cpp" />
+    <ClCompile Include="..\library_cfd_coupling.cpp" />
+    <ClCompile Include="..\main.cpp" />
+    <ClCompile Include="..\math_extra.cpp" />
+    <ClCompile Include="..\mech_param_gran.cpp" />
+    <ClCompile Include="..\memory.cpp" />
+    <ClCompile Include="..\mesh_mover.cpp" />
+    <ClCompile Include="..\min.cpp" />
+    <ClCompile Include="..\minimize.cpp" />
+    <ClCompile Include="..\min_cg.cpp" />
+    <ClCompile Include="..\min_fire.cpp" />
+    <ClCompile Include="..\min_hftn.cpp" />
+    <ClCompile Include="..\min_linesearch.cpp" />
+    <ClCompile Include="..\min_quickmin.cpp" />
+    <ClCompile Include="..\min_sd.cpp" />
+    <ClCompile Include="..\modified_andrew.cpp" />
+    <ClCompile Include="..\modify.cpp" />
+    <ClCompile Include="..\modify_liggghts.cpp" />
+    <ClCompile Include="..\multisphere.cpp" />
+    <ClCompile Include="..\multisphere_parallel.cpp" />
+    <ClCompile Include="..\neighbor.cpp" />
+    <ClCompile Include="..\neighbor_bin_hopping.cpp" />
+    <ClCompile Include="..\neigh_bond.cpp" />
+    <ClCompile Include="..\neigh_derive.cpp" />
+    <ClCompile Include="..\neigh_dummy.cpp" />
+    <ClCompile Include="..\neigh_full.cpp" />
+    <ClCompile Include="..\neigh_gran.cpp" />
+    <ClCompile Include="..\neigh_half_bin.cpp" />
+    <ClCompile Include="..\neigh_half_multi.cpp" />
+    <ClCompile Include="..\neigh_half_nsq.cpp" />
+    <ClCompile Include="..\neigh_list.cpp" />
+    <ClCompile Include="..\neigh_request.cpp" />
+    <ClCompile Include="..\neigh_respa.cpp" />
+    <ClCompile Include="..\neigh_stencil.cpp" />
+    <ClCompile Include="..\output.cpp" />
+    <ClCompile Include="..\pair.cpp" />
+    <ClCompile Include="..\pair_beck.cpp" />
+    <ClCompile Include="..\pair_born.cpp" />
+    <ClCompile Include="..\pair_born_coul_wolf.cpp" />
+    <ClCompile Include="..\pair_buck.cpp" />
+    <ClCompile Include="..\pair_buck_coul_cut.cpp" />
+    <ClCompile Include="..\pair_coul_cut.cpp" />
+    <ClCompile Include="..\pair_coul_debye.cpp" />
+    <ClCompile Include="..\pair_coul_wolf.cpp" />
+    <ClCompile Include="..\pair_dpd.cpp" />
+    <ClCompile Include="..\pair_dpd_tstat.cpp" />
+    <ClCompile Include="..\pair_gauss.cpp" />
+    <ClCompile Include="..\pair_gran.cpp" />
+    <ClCompile Include="..\pair_gran_hertz_history.cpp" />
+    <ClCompile Include="..\pair_gran_hertz_history_hamaker.cpp" />
+    <ClCompile Include="..\pair_gran_hertz_history_liquid.cpp" />
+    <ClCompile Include="..\pair_gran_hertz_history_simple.cpp" />
+    <ClCompile Include="..\pair_gran_hooke.cpp" />
+    <ClCompile Include="..\pair_gran_hooke_history.cpp" />
+    <ClCompile Include="..\pair_gran_hooke_history_hysteresis.cpp" />
+    <ClCompile Include="..\pair_gran_hooke_history_simple.cpp" />
+    <ClCompile Include="..\pair_gran_hooke_simple.cpp" />
+    <ClCompile Include="..\pair_hybrid.cpp" />
+    <ClCompile Include="..\pair_hybrid_overlay.cpp" />
+    <ClCompile Include="..\pair_lj96_cut.cpp" />
+    <ClCompile Include="..\pair_lj_cubic.cpp" />
+    <ClCompile Include="..\pair_lj_cut.cpp" />
+    <ClCompile Include="..\pair_lj_cut_coul_cut.cpp" />
+    <ClCompile Include="..\pair_lj_cut_coul_debye.cpp" />
+    <ClCompile Include="..\pair_lj_expand.cpp" />
+    <ClCompile Include="..\pair_lj_gromacs.cpp" />
+    <ClCompile Include="..\pair_lj_gromacs_coul_gromacs.cpp" />
+    <ClCompile Include="..\pair_lj_smooth.cpp" />
+    <ClCompile Include="..\pair_lj_smooth_linear.cpp" />
+    <ClCompile Include="..\pair_morse.cpp" />
+    <ClCompile Include="..\pair_soft.cpp" />
+    <ClCompile Include="..\pair_sph.cpp" />
+    <ClCompile Include="..\pair_sph_artvisc_tenscorr.cpp" />
+    <ClCompile Include="..\pair_table.cpp" />
+    <ClCompile Include="..\pair_yukawa.cpp" />
+    <ClCompile Include="..\particleToInsert.cpp" />
+    <ClCompile Include="..\particleToInsert_multisphere.cpp" />
+    <ClCompile Include="..\procmap.cpp" />
+    <ClCompile Include="..\random_mars.cpp" />
+    <ClCompile Include="..\random_park.cpp" />
+    <ClCompile Include="..\read_data.cpp" />
+    <ClCompile Include="..\read_restart.cpp" />
+    <ClCompile Include="..\region.cpp" />
+    <ClCompile Include="..\region_block.cpp" />
+    <ClCompile Include="..\region_cone.cpp" />
+    <ClCompile Include="..\region_cylinder.cpp" />
+    <ClCompile Include="..\region_intersect.cpp" />
+    <ClCompile Include="..\region_mesh_tet.cpp" />
+    <ClCompile Include="..\region_plane.cpp" />
+    <ClCompile Include="..\region_prism.cpp" />
+    <ClCompile Include="..\region_sphere.cpp" />
+    <ClCompile Include="..\region_union.cpp" />
+    <ClCompile Include="..\region_wedge.cpp" />
+    <ClCompile Include="..\replicate.cpp" />
+    <ClCompile Include="..\respa.cpp" />
+    <ClCompile Include="..\run.cpp" />
+    <ClCompile Include="..\set.cpp" />
+    <ClCompile Include="..\special.cpp" />
+    <ClCompile Include="..\thermo.cpp" />
+    <ClCompile Include="..\timer.cpp" />
+    <ClCompile Include="..\tri_mesh.cpp" />
+    <ClCompile Include="..\tri_mesh_planar.cpp" />
+    <ClCompile Include="..\universe.cpp" />
+    <ClCompile Include="..\update.cpp" />
+    <ClCompile Include="..\variable.cpp" />
+    <ClCompile Include="..\velocity.cpp" />
+    <ClCompile Include="..\verlet.cpp" />
+    <ClCompile Include="..\verlet_implicit.cpp" />
+    <ClCompile Include="..\write_restart.cpp" />
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{74AC9767-A52F-47BD-BB26-07C739DA3EA5}</ProjectGuid>
+    <RootNamespace>testmacro</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">true</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">true</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">$(SolutionDir)$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">false</LinkIncremental>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Program Files\MPICH2\include;$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">C:\Program Files\MPICH2\lib;$(LibraryPath)</LibraryPath>
+    <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Program Files\MPICH2\include;$(IncludePath)</IncludePath>
+    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">C:\Program Files\MPICH2\lib;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <IncludePath>C:\Program Files (x86)\MPICH2\include;$(IncludePath)</IncludePath>
+    <LibraryPath>C:\Program Files (x86)\MPICH2\lib;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <IncludePath>C:\Program Files (x86)\MPICH2\include;$(IncludePath)</IncludePath>
+    <LibraryPath>C:\Program Files (x86)\MPICH2\lib;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>mpi.lib;cxx.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>mpi.lib;cxx.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>mpi.lib;cxx.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>mpi.lib;cxx.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;extra;settings;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..;extra;settings;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..;extra;settings;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>..;extra;settings;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <DisableSpecificWarnings>4267;4244;4101;4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>$(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Console</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+    </Link>
+  </ItemDefinitionGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/src/WINDOWS/LIGGGHTS_VS2012.sln b/src/WINDOWS/LIGGGHTS_VS2012.sln
new file mode 100644
index 0000000000000000000000000000000000000000..aa93a55da620684caccfb53c9d9b6b9dc29eeec3
--- /dev/null
+++ b/src/WINDOWS/LIGGGHTS_VS2012.sln
@@ -0,0 +1,56 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2012 for Windows Desktop
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "STUBS", "STUBS.vcxproj", "{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LIGGGHTS", "LIGGGHTS.vcxproj", "{74AC9767-A52F-47BD-BB26-07C739DA3EA5}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug_STUBS|Win32 = Debug_STUBS|Win32
+		Debug_STUBS|x64 = Debug_STUBS|x64
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release_STUBS|Win32 = Release_STUBS|Win32
+		Release_STUBS|x64 = Release_STUBS|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|Win32.ActiveCfg = Debug_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|Win32.Build.0 = Debug_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|x64.ActiveCfg = Debug_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|x64.Build.0 = Debug_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|Win32.ActiveCfg = Debug_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|Win32.Build.0 = Debug_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|x64.ActiveCfg = Debug_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|x64.Build.0 = Debug_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|Win32.ActiveCfg = Release_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|Win32.Build.0 = Release_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|x64.ActiveCfg = Release_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|x64.Build.0 = Release_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|Win32.ActiveCfg = Release_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|Win32.Build.0 = Release_STUBS|Win32
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|x64.ActiveCfg = Release_STUBS|x64
+		{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|x64.Build.0 = Release_STUBS|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|Win32.ActiveCfg = Debug_STUBS|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|Win32.Build.0 = Debug_STUBS|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|x64.ActiveCfg = Debug_STUBS|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|x64.Build.0 = Debug_STUBS|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|Win32.Build.0 = Debug|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|x64.ActiveCfg = Debug|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|x64.Build.0 = Debug|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|Win32.ActiveCfg = Release_STUBS|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|Win32.Build.0 = Release_STUBS|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|x64.ActiveCfg = Release_STUBS|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|x64.Build.0 = Release_STUBS|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|Win32.ActiveCfg = Release|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|Win32.Build.0 = Release|Win32
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|x64.ActiveCfg = Release|x64
+		{74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/WINDOWS/README_VS2012.txt b/src/WINDOWS/README_VS2012.txt
new file mode 100644
index 0000000000000000000000000000000000000000..cb74cf6797698e891578dfafbb5f705c67248bdf
--- /dev/null
+++ b/src/WINDOWS/README_VS2012.txt
@@ -0,0 +1,33 @@
+INSTRUCTIONS FOR COMPILING LIGGGHTS WITH VISUAL STUDIO 2010/2012 
+(Ultimate, Professional or Express Versions)
+
+To compile LIGGGHTS open the LIGGGHTS_VS2012 Solution
+
+The LIGGGHTS project has configurations to compile either with MPI 
+support or with MPI stubs. *
+
+To compile with MPI:
+
+1.  Install MPICH for Windows (http://www.mpich.org/), validate the 
+    corresponding include and lib directories in the project properties 
+    of LIGGGHTS: LIGGGHTS/Properties/Configuration Properties/VC++ Directories **
+
+2.  Compile LIGGGHTS using Debug or Release configurations from the
+    provided projects (use x64 for 64bit binary)
+
+To compile with MPI STUBS
+   
+1.  Compile STUBS.vcproj 
+
+2.  Compile LIGGGHTS using Debug_STUBS or Release_STUBS configurations
+from the provided project (use x64 for 64bit binary)
+
+
+* For Visual Studio versions prior to 2012  the Platform Toolset setting has to
+be adjusted for each project. This setting can be changed under:
+Properties/Configuration Properties/General/General/Platform Toolset
+
+** Note: Depending on your MPICH Installation (32bit, 64bit) and your Windows 
+Installation (32bit, 64bit) you might have to change the 32bit paths from
+c:\Program Files (x86)\ to C:\Program Files\. The supplied solution was created
+on a 64bit system.
\ No newline at end of file
diff --git a/src/WINDOWS/STUBS.vcxproj b/src/WINDOWS/STUBS.vcxproj
new file mode 100644
index 0000000000000000000000000000000000000000..084f698ae0fef2bebb20c9207f13bd065f6c69d4
--- /dev/null
+++ b/src/WINDOWS/STUBS.vcxproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug_STUBS|Win32">
+      <Configuration>Debug_STUBS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug_STUBS|x64">
+      <Configuration>Debug_STUBS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release_STUBS|Win32">
+      <Configuration>Release_STUBS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release_STUBS|x64">
+      <Configuration>Release_STUBS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}</ProjectGuid>
+    <RootNamespace>stubs</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">$(Configuration)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">$(Configuration)\</OutDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">$(Configuration)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">$(Configuration)\</IntDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">$(Configuration)\</IntDir>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'" />
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" />
+    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'" />
+    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>extra;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Lib />
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_STUBS|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>extra;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>extra;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Lib />
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_STUBS|x64'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>extra;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <ProgramDataBaseFileName>$(IntDir)$(ProjectName).pdb</ProgramDataBaseFileName>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\STUBS\mpi.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\STUBS\mpi.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/src/WINDOWS/extra/fftw2/x64/FFTW2dll.dll b/src/WINDOWS/extra/fftw2/x64/FFTW2dll.dll
new file mode 100644
index 0000000000000000000000000000000000000000..bd72a42d32ef7d45ffbd56784cba61bf3f3fe510
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/FFTW2dll.dll differ
diff --git a/src/WINDOWS/extra/fftw2/x64/FFTW2dll.lib b/src/WINDOWS/extra/fftw2/x64/FFTW2dll.lib
new file mode 100644
index 0000000000000000000000000000000000000000..da56f982fe9fff5317886db02f71b717e86bbd79
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/FFTW2dll.lib differ
diff --git a/src/WINDOWS/extra/fftw2/x64/FFTW2st.lib b/src/WINDOWS/extra/fftw2/x64/FFTW2st.lib
new file mode 100644
index 0000000000000000000000000000000000000000..d4cc460d93039e871426b8900cc6c1b0c0669813
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/FFTW2st.lib differ
diff --git a/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.dll b/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.dll
new file mode 100644
index 0000000000000000000000000000000000000000..094fcad93d43bc5e2711c3d3887b2b653b492fbf
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.dll differ
diff --git a/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.lib b/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.lib
new file mode 100644
index 0000000000000000000000000000000000000000..675cc0974f58939ff76cd0b579abecf226912889
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/RFFTW2dll.lib differ
diff --git a/src/WINDOWS/extra/fftw2/x64/RFFTW2st.lib b/src/WINDOWS/extra/fftw2/x64/RFFTW2st.lib
new file mode 100644
index 0000000000000000000000000000000000000000..e14be043fcbf314a6d06049a53da12066c1c1c36
Binary files /dev/null and b/src/WINDOWS/extra/fftw2/x64/RFFTW2st.lib differ
diff --git a/src/WINDOWS/settings/style_atom.h b/src/WINDOWS/settings/style_atom.h
index f7885ac016d30ed92e5923ebcea1b5c4b0d0f6bd..673da8cd23dc3db63d437a5678c7cb7970fbc2c8 100644
--- a/src/WINDOWS/settings/style_atom.h
+++ b/src/WINDOWS/settings/style_atom.h
@@ -1,10 +1,13 @@
 // File is generaged by ListModules() macro
 #include "..\..\atom_vec_atomic.h"
+#include "..\..\atom_vec_bond_gran.h"
 #include "..\..\atom_vec_charge.h"
 #include "..\..\atom_vec_ellipsoid.h"
 #include "..\..\atom_vec_hybrid.h"
 #include "..\..\atom_vec_line.h"
+#include "..\..\atom_vec_sph.h"
 #include "..\..\atom_vec_sphere.h"
+#include "..\..\atom_vec_sph_var.h"
 #include "..\..\atom_vec_tri.h"
 #include "..\..\MOLECULE\atom_vec_angle.h"
 #include "..\..\MOLECULE\atom_vec_bond.h"
diff --git a/src/WINDOWS/settings/style_bond.h b/src/WINDOWS/settings/style_bond.h
index f10824054e86ddd3f62aaed38d5ad971af910032..f50b0095189ce51534caf1d1e5094b6e03485df7 100644
--- a/src/WINDOWS/settings/style_bond.h
+++ b/src/WINDOWS/settings/style_bond.h
@@ -1,4 +1,5 @@
 // File is generaged by ListModules() macro
+#include "..\..\bond_gran.h"
 #include "..\..\bond_hybrid.h"
 #include "..\..\MOLECULE\bond_fene.h"
 #include "..\..\MOLECULE\bond_fene_expand.h"
diff --git a/src/WINDOWS/settings/style_compute.h b/src/WINDOWS/settings/style_compute.h
index 43aa7fccc1e4715f87409a05d5c8417b594df5dd..1aa2e14e4b763cbd5dbbea1d166989d95359a6d1 100644
--- a/src/WINDOWS/settings/style_compute.h
+++ b/src/WINDOWS/settings/style_compute.h
@@ -7,6 +7,7 @@
 #include "..\..\compute_cna_atom.h"
 #include "..\..\compute_com.h"
 #include "..\..\compute_com_molecule.h"
+#include "..\..\compute_contact_atom.h"
 #include "..\..\compute_coord_atom.h"
 #include "..\..\compute_dihedral_local.h"
 #include "..\..\compute_displace_atom.h"
@@ -21,6 +22,7 @@
 #include "..\..\compute_msd.h"
 #include "..\..\compute_msd_molecule.h"
 #include "..\..\compute_pair.h"
+#include "..\..\compute_pair_gran_local.h"
 #include "..\..\compute_pair_local.h"
 #include "..\..\compute_pe.h"
 #include "..\..\compute_pe_atom.h"
diff --git a/src/WINDOWS/settings/style_dump.h b/src/WINDOWS/settings/style_dump.h
index 6b14f2b48404d0563e1e67835d17a2fe9a69d8ba..2f1678bc93c4b119118066d4d920c7bde41d7298 100644
--- a/src/WINDOWS/settings/style_dump.h
+++ b/src/WINDOWS/settings/style_dump.h
@@ -1,8 +1,13 @@
 // File is generaged by ListModules() macro
 #include "..\..\dump_atom.h"
+#include "..\..\dump_atom_vtk.h"
 #include "..\..\dump_cfg.h"
 #include "..\..\dump_custom.h"
 #include "..\..\dump_dcd.h"
+#include "..\..\dump_decomposition_vtk.h"
+#include "..\..\dump_euler_vtk.h"
 #include "..\..\dump_image.h"
 #include "..\..\dump_local.h"
+#include "..\..\dump_mesh_stl.h"
+#include "..\..\dump_mesh_vtk.h"
 #include "..\..\dump_xyz.h"
diff --git a/src/WINDOWS/settings/style_fix.h b/src/WINDOWS/settings/style_fix.h
index 403f605d0cfac5aef62b2ec73c7adf9c11c0d096..7ca7c8cf6d73365e0865fce7c309fe40d365c7c5 100644
--- a/src/WINDOWS/settings/style_fix.h
+++ b/src/WINDOWS/settings/style_fix.h
@@ -4,10 +4,20 @@
 #include "..\..\fix_aveforce.h"
 #include "..\..\fix_ave_atom.h"
 #include "..\..\fix_ave_correlate.h"
+#include "..\..\fix_ave_euler.h"
 #include "..\..\fix_ave_histo.h"
 #include "..\..\fix_ave_spatial.h"
 #include "..\..\fix_ave_time.h"
+#include "..\..\fix_balance.h"
+#include "..\..\fix_bond_create_gran.h"
+#include "..\..\fix_bond_propagate_gran.h"
 #include "..\..\fix_box_relax.h"
+#include "..\..\fix_cfd_coupling.h"
+#include "..\..\fix_cfd_coupling_convection.h"
+#include "..\..\fix_cfd_coupling_force.h"
+#include "..\..\fix_check_timestep_gran.h"
+#include "..\..\fix_check_timestep_sph.h"
+#include "..\..\fix_contact_history.h"
 #include "..\..\fix_deform.h"
 #include "..\..\fix_deposit.h"
 #include "..\..\fix_drag.h"
@@ -16,14 +26,28 @@
 #include "..\..\fix_enforce2d.h"
 #include "..\..\fix_evaporate.h"
 #include "..\..\fix_external.h"
+#include "..\..\fix_freeze.h"
 #include "..\..\fix_gravity.h"
 #include "..\..\fix_heat.h"
+#include "..\..\fix_heat_gran_conduction.h"
+#include "..\..\fix_heat_gran_radiation.h"
 #include "..\..\fix_indent.h"
+#include "..\..\fix_insert.h"
+#include "..\..\fix_insert_pack.h"
+#include "..\..\fix_insert_rate_region.h"
+#include "..\..\fix_insert_stream.h"
 #include "..\..\fix_langevin.h"
 #include "..\..\fix_lineforce.h"
+#include "..\..\fix_mesh.h"
+#include "..\..\fix_mesh_surface.h"
+#include "..\..\fix_mesh_surface_stress.h"
+#include "..\..\fix_mesh_surface_stress_servo.h"
 #include "..\..\fix_minimize.h"
 #include "..\..\fix_momentum.h"
 #include "..\..\fix_move.h"
+#include "..\..\fix_move_mesh.h"
+#include "..\..\fix_multisphere.h"
+#include "..\..\fix_neighlist_mesh.h"
 #include "..\..\fix_nph.h"
 #include "..\..\fix_nph_sphere.h"
 #include "..\..\fix_npt.h"
@@ -31,29 +55,46 @@
 #include "..\..\fix_nve.h"
 #include "..\..\fix_nve_limit.h"
 #include "..\..\fix_nve_noforce.h"
+#include "..\..\fix_nve_sph.h"
 #include "..\..\fix_nve_sphere.h"
+#include "..\..\fix_nve_sphere_limit.h"
+#include "..\..\fix_nve_sph_stationary.h"
 #include "..\..\fix_nvt.h"
 #include "..\..\fix_nvt_sllod.h"
 #include "..\..\fix_nvt_sphere.h"
 #include "..\..\fix_orient_fcc.h"
+#include "..\..\fix_particledistribution_discrete.h"
 #include "..\..\fix_planeforce.h"
+#include "..\..\fix_pour.h"
 #include "..\..\fix_press_berendsen.h"
 #include "..\..\fix_print.h"
+#include "..\..\fix_property_atom.h"
+#include "..\..\fix_property_global.h"
 #include "..\..\fix_read_restart.h"
 #include "..\..\fix_recenter.h"
+#include "..\..\fix_region_variable.h"
+#include "..\..\fix_remove.h"
 #include "..\..\fix_respa.h"
 #include "..\..\fix_restrain.h"
 #include "..\..\fix_rigid.h"
 #include "..\..\fix_rigid_nve.h"
 #include "..\..\fix_rigid_nvt.h"
+#include "..\..\fix_scalar_transport_equation.h"
 #include "..\..\fix_setforce.h"
 #include "..\..\fix_shake.h"
 #include "..\..\fix_shear_history.h"
+#include "..\..\fix_sph_density_continuity.h"
+#include "..\..\fix_sph_density_corr.h"
+#include "..\..\fix_sph_density_summation.h"
+#include "..\..\fix_sph_pressure.h"
 #include "..\..\fix_spring.h"
 #include "..\..\fix_spring_rg.h"
 #include "..\..\fix_spring_self.h"
 #include "..\..\fix_store_force.h"
 #include "..\..\fix_store_state.h"
+#include "..\..\fix_template_multiplespheres.h"
+#include "..\..\fix_template_multisphere.h"
+#include "..\..\fix_template_sphere.h"
 #include "..\..\fix_temp_berendsen.h"
 #include "..\..\fix_temp_rescale.h"
 #include "..\..\fix_thermal_conductivity.h"
@@ -61,9 +102,17 @@
 #include "..\..\fix_ttm.h"
 #include "..\..\fix_viscosity.h"
 #include "..\..\fix_viscous.h"
+#include "..\..\fix_wall_gran.h"
+#include "..\..\fix_wall_gran_hertz_history.h"
+#include "..\..\fix_wall_gran_hertz_history_simple.h"
+#include "..\..\fix_wall_gran_hooke.h"
+#include "..\..\fix_wall_gran_hooke_history.h"
+#include "..\..\fix_wall_gran_hooke_history_simple.h"
 #include "..\..\fix_wall_harmonic.h"
 #include "..\..\fix_wall_lj126.h"
 #include "..\..\fix_wall_lj93.h"
 #include "..\..\fix_wall_reflect.h"
 #include "..\..\fix_wall_region.h"
+#include "..\..\fix_wall_region_sph.h"
+#include "..\..\fix_wall_sph.h"
 #include "..\..\MANYBODY\fix_qeq_comb.h"
diff --git a/src/WINDOWS/settings/style_integrate.h b/src/WINDOWS/settings/style_integrate.h
index fa3760c571a47c53e47e13d8e35b61c65659b1fd..7d65e7bb888f84af812581e4b04f81fbf6e443c7 100644
--- a/src/WINDOWS/settings/style_integrate.h
+++ b/src/WINDOWS/settings/style_integrate.h
@@ -1,3 +1,4 @@
 // File is generaged by ListModules() macro
 #include "..\..\respa.h"
 #include "..\..\verlet.h"
+#include "..\..\verlet_implicit.h"
diff --git a/src/WINDOWS/settings/style_pair.h b/src/WINDOWS/settings/style_pair.h
index 875a966e7ad54ab700cb747bde122dcaa28a46d8..34cd74732939d11c63576c905af3a4be4c569db2 100644
--- a/src/WINDOWS/settings/style_pair.h
+++ b/src/WINDOWS/settings/style_pair.h
@@ -10,6 +10,15 @@
 #include "..\..\pair_dpd.h"
 #include "..\..\pair_dpd_tstat.h"
 #include "..\..\pair_gauss.h"
+#include "..\..\pair_gran.h"
+#include "..\..\pair_gran_hertz_history.h"
+#include "..\..\pair_gran_hertz_history_hamaker.h"
+#include "..\..\pair_gran_hertz_history_simple.h"
+#include "..\..\pair_gran_hooke.h"
+#include "..\..\pair_gran_hooke_history.h"
+#include "..\..\pair_gran_hooke_history_hysteresis.h"
+#include "..\..\pair_gran_hooke_history_simple.h"
+#include "..\..\pair_gran_hooke_simple.h"
 #include "..\..\pair_hybrid.h"
 #include "..\..\pair_hybrid_overlay.h"
 #include "..\..\pair_lj96_cut.h"
@@ -24,6 +33,8 @@
 #include "..\..\pair_lj_smooth_linear.h"
 #include "..\..\pair_morse.h"
 #include "..\..\pair_soft.h"
+#include "..\..\pair_sph.h"
+#include "..\..\pair_sph_artvisc_tenscorr.h"
 #include "..\..\pair_table.h"
 #include "..\..\pair_yukawa.h"
 #include "..\..\MANYBODY\pair_adp.h"
diff --git a/src/WINDOWS/settings/style_region.h b/src/WINDOWS/settings/style_region.h
index 2815c440aa04be3e5c581cbdb7b8945be4b8bfd9..3bb72ccfa22df9f9f8ea3a63cbe19c4dcd1b5bbf 100644
--- a/src/WINDOWS/settings/style_region.h
+++ b/src/WINDOWS/settings/style_region.h
@@ -3,7 +3,9 @@
 #include "..\..\region_cone.h"
 #include "..\..\region_cylinder.h"
 #include "..\..\region_intersect.h"
+#include "..\..\region_mesh_tet.h"
 #include "..\..\region_plane.h"
 #include "..\..\region_prism.h"
 #include "..\..\region_sphere.h"
 #include "..\..\region_union.h"
+#include "..\..\region_wedge.h"
diff --git a/src/associative_pointer_array_I.h b/src/associative_pointer_array_I.h
index 1bb527f5395fc8a508d1524032565af00d8bf716..9a233b6b4b8b1818a7e5ddaa77645bb49d3fcf95 100644
--- a/src/associative_pointer_array_I.h
+++ b/src/associative_pointer_array_I.h
@@ -23,6 +23,7 @@
    Contributing authors:
    Christoph Kloss (JKU Linz, DCS Computing GmbH, Linz)
    Philippe Seil (JKU Linz)
+   Richard Berger (JKU Linz)
 ------------------------------------------------------------------------- */
 
 #ifndef LMP_ASSOCIATIVE_POINTER_ARRAY_I_H
@@ -132,7 +133,7 @@
     // for(int i=0;i<numElem_+1;i++)
     //  printf("%d %s %d\n",i,id_[i], strcmp(id_[i],"v"));
 
-    T *tmp[maxElem_];
+    T ** tmp = new T*[maxElem_];
 
     for(int i = 0; i < maxElem_; i++)
         tmp[i] = content_[i];
@@ -145,6 +146,8 @@
     for(int i = 0; i < numElem_; i++)
         content_[i] = tmp[i];
 
+    delete[] tmp;
+
     //for(int i=0;i<numElem_+1;i++)
     //  printf("%d %s %d\n",i,id_[i], strcmp(id_[i],"v"));
   }
diff --git a/src/cfd_datacoupling.cpp b/src/cfd_datacoupling.cpp
index f3f4a91dcd1d490854dc0773474b170d56c54c57..f7ce236d797490c6865efeebb188a72406bf4329 100644
--- a/src/cfd_datacoupling.cpp
+++ b/src/cfd_datacoupling.cpp
@@ -165,7 +165,7 @@ void CfdDatacoupling::push(char *name,char *type,void *&ptr,char *datatype)
             error->all(FLERR,"This error is fatal");
         }
     }
-    if(!found)
+    if(!found && error_push())
     {
         if(comm->me == 0 && screen)
             fprintf(screen,"LIGGGHTS could not find property %s requested by calling program. Check your model settings in LIGGGHTS.\n",name);
@@ -192,7 +192,7 @@ void CfdDatacoupling::check_datatransfer()
 
     for(int i = 0; i < npush_; i++)
     {
-       if(!pushinvoked_[i])
+       if(!pushinvoked_[i] && error_push())
        {
             if(comm->me == 0 && screen)
                 fprintf(screen,"Communication of property %s from LIGGGHTS to OF was not invoked, but needed by "
diff --git a/src/cfd_datacoupling.h b/src/cfd_datacoupling.h
index 7a816abd04e4d8c8649466292471f2fc3f4bb3fc..9048768e43b83150ad26415d6ede6264396d3b0c 100644
--- a/src/cfd_datacoupling.h
+++ b/src/cfd_datacoupling.h
@@ -48,6 +48,9 @@ class CfdDatacoupling : protected Pointers {
   void init();
   virtual void post_create() {}
 
+  virtual bool error_push()
+  { return true;}
+
   // exchange data with OF
   // does nothing in case of MPI coupling
   // for the MPI case, this is done withing the OF solver
diff --git a/src/cfd_datacoupling_mpi.h b/src/cfd_datacoupling_mpi.h
index 9f733e3ddecc3faaed5a27840d93848e0ae0ad49..a270baf15a2bde6f93ae068629bfb5e413c68b17 100644
--- a/src/cfd_datacoupling_mpi.h
+++ b/src/cfd_datacoupling_mpi.h
@@ -48,6 +48,9 @@ class CfdDatacouplingMPI : public CfdDatacoupling {
   template <typename T> void pull_mpi(char *,char *,void *&);
   template <typename T> void push_mpi(char *,char *,void *&);
 
+  virtual bool error_push()
+  { return false;}
+
   void allocate_external(int    **&data, int len2,int len1,     int initvalue);
   void allocate_external(int    **&data, int len2,char *keyword,int initvalue);
   void allocate_external(double **&data, int len2,int len1,     double initvalue);
@@ -114,7 +117,7 @@ void CfdDatacouplingMPI::pull_mpi(char *name,char *type,void *&from)
     {
         T *to_t = (T*) to;
         if(!ms_data_)
-            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix rigid/multisphere");
+            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix multisphere");
         for (int i = 0; i < len1; i++)
             if ((m = ms_data_->map(i+1)) >= 0)
                 to_t[m] = allred[i];
@@ -123,7 +126,7 @@ void CfdDatacouplingMPI::pull_mpi(char *name,char *type,void *&from)
     {
         T **to_t = (T**) to;
         if(!ms_data_)
-            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix rigid/multisphere");
+            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix multisphere");
         for (int i = 0; i < len1; i++)
             if ((m = ms_data_->map(i+1)) >= 0)
                 for (int j = 0; j < len2; j++)
@@ -194,7 +197,7 @@ void CfdDatacouplingMPI::push_mpi(char *name,char *type,void *&to)
     {
         T *from_t = (T*) from;
         if(!ms_data_)
-            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix rigid/multisphere");
+            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix multisphere");
         for (int i = 0; i < nbodies; i++) // loops over # local bodies
         {
             id = ms_data_->tag(i);
@@ -205,7 +208,7 @@ void CfdDatacouplingMPI::push_mpi(char *name,char *type,void *&to)
     {
         T **from_t = (T**) from;
         if(!ms_data_)
-            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix rigid/multisphere");
+            error->one(FLERR,"Transferring a multisphere property from/to LIGGGHTS requires a fix multisphere");
         for (int i = 0; i < nbodies; i++) // loops over # local bodies
         {
             id = ms_data_->tag(i);
diff --git a/src/compute_nparticles_tracer_region.cpp b/src/compute_nparticles_tracer_region.cpp
index 1a11af1e078a54b03f5a93bc00801a86e29145e3..0e6ae5760bbf4ac685a430abd7e1744b31ef2062 100644
--- a/src/compute_nparticles_tracer_region.cpp
+++ b/src/compute_nparticles_tracer_region.cpp
@@ -117,7 +117,14 @@ ComputeNparticlesTracerRegion::ComputeNparticlesTracerRegion(LAMMPS *lmp, int na
     if(iregion_count_ < 0)
         error->compute_error(FLERR,this,"have to define 'region_count'");
 
-    scalar_flag = 1;
+    vector_flag = 1;
+    size_vector = 4;
+    extscalar = 0;
+    extvector = 1;
+    tempflag = 1;
+
+    vector = new double[size_vector];
+
 }
 
 /* ---------------------------------------------------------------------- */
@@ -126,6 +133,8 @@ ComputeNparticlesTracerRegion::~ComputeNparticlesTracerRegion()
 {
     delete []idregion_count_;
     delete []fix_tracer_name_;
+
+    delete [] vector;
 }
 
 /* ---------------------------------------------------------------------- */
@@ -137,7 +146,7 @@ void ComputeNparticlesTracerRegion::init()
         error->compute_error(FLERR,this,"Region ID (region_count) does not exist");
 
     FixPropertyAtom *fix_ppa;
-    
+
     fix_ppa = static_cast<FixPropertyAtom*>(modify->find_fix_property(fix_tracer_name_,"property/atom","scalar",0,0,style));
 
     fix_tracer_ = dynamic_cast<FixPropertyAtomTracer*>(fix_ppa);
@@ -146,36 +155,49 @@ void ComputeNparticlesTracerRegion::init()
 }
 
 /* ---------------------------------------------------------------------- */
-
-double ComputeNparticlesTracerRegion::compute_scalar()
+void ComputeNparticlesTracerRegion::compute_vector()
 {
-    invoked_scalar = update->ntimestep;
+    invoked_vector = update->ntimestep;
+
+    double resultTot, resultMarked;
 
     if(image_dim_ == -1)
-        scalar = compute_scalar_eval<false>();
+        compute_vector_eval<false>(false, resultTot, resultMarked);
     else
-        scalar = compute_scalar_eval<true>();
+        compute_vector_eval<true>(false, resultTot, resultMarked);
+    vector[0] = resultTot; //all particle count
+    vector[1] = resultMarked; //marked particle count
 
-    return scalar;
+    if(image_dim_ == -1)
+        compute_vector_eval<false>(true, resultTot, resultMarked);
+    else
+        compute_vector_eval<true>(true, resultTot, resultMarked);
+    vector[2] = resultTot; //total mass
+    vector[3] =  resultMarked; //marked total mass
 }
 
 /* ---------------------------------------------------------------------- */
 
 template<bool IMAGE>
-double ComputeNparticlesTracerRegion::compute_scalar_eval()
+void ComputeNparticlesTracerRegion::compute_vector_eval(bool countMass, double& resultTot, double& resultMarked)
 {
-    int ncount;
     int nlocal = atom->nlocal;
     int *image = atom->image;
-    double **x = atom->x;
+    double **x     = atom->x;
+    double *mass = atom->mass;  //mass per type
+    double *rmass = atom->rmass;    //mass per particle
+    int *type = atom->type;
+    int *mask = atom->mask;
     double *marker = fix_tracer_->vector_atom;
     Region *region = domain->regions[iregion_count_];
 
     // count all particles in region, taking image flag into account
-    ncount = 0;
+    resultTot = 0.0; resultMarked = 0.0;
+
     for(int i = 0; i < nlocal; i++)
     {
-        
+        if (!(mask[i] & groupbit)) continue; //check if on current processor and in group
+
         if(IMAGE && image_dim_ == 0 && ( ((image[i] & 1023) - 512      ) != image_no_) )
             continue;
         if(IMAGE && image_dim_ == 1 && ( ((image[i] >> 10 & 1023) - 512) != image_no_) )
@@ -183,16 +205,38 @@ double ComputeNparticlesTracerRegion::compute_scalar_eval()
         if(IMAGE && image_dim_ == 2 && ( ((image[i] >> 20) - 512) != image_no_) )
             continue;
 
-        if(MathExtraLiggghts::compDouble(marker[i]  ,1.0,1e-5) &&
-           region->match(x[i][0],x[i][1],x[i][2]))
+        if( region->match(x[i][0],x[i][1],x[i][2]) )
         {
-            ncount++;
-            
-            if(reset_marker_)
-                marker[i] = 0.0;
+
+            if(countMass)
+            {
+                if (rmass)
+                   resultTot+= rmass[i];
+                else
+                   resultTot+= mass[type[i]];
+             }
+             else
+                   resultTot += 1.0;
+            //Check if particle is marked, and add counter
+            if( MathExtraLiggghts::compDouble(marker[i]  ,1.0,1e-5) )
+            {
+              if(countMass)
+              {
+                if (rmass)
+                   resultMarked+= rmass[i];
+                else
+                   resultMarked+= mass[type[i]];
+               }
+               else
+                    resultMarked += 1.0;
+
+               if(reset_marker_)
+                    marker[i] = 0.0;
+            }
         }
     }
 
-    MPI_Sum_Scalar(ncount,world);
-    return static_cast<double>(ncount);
+   MPI_Sum_Scalar(resultTot,world);
+   MPI_Sum_Scalar(resultMarked,world);
+   return;
 }
diff --git a/src/compute_nparticles_tracer_region.h b/src/compute_nparticles_tracer_region.h
index a04933b28d0e6e114aa400a92d2443b6b0818f26..d42050f2bf98733f48ab33f1a760dc4f741c970c 100644
--- a/src/compute_nparticles_tracer_region.h
+++ b/src/compute_nparticles_tracer_region.h
@@ -40,12 +40,12 @@ class ComputeNparticlesTracerRegion : public Compute {
   ~ComputeNparticlesTracerRegion();
 
   void init();
-  double compute_scalar();
+  void compute_vector();
 
  private:
 
   template<bool IMAGE>
-  double compute_scalar_eval();
+  void compute_vector_eval(bool, double&, double&);
 
   // image stuff
   int image_dim_, image_no_;
diff --git a/src/container_base.h b/src/container_base.h
index 93a0721d7a7dcad39e3aa9ec1cff89f4f894c3f3..3bddf24a3b6aec2f70ab12cbcb58bb941c0f94d7 100644
--- a/src/container_base.h
+++ b/src/container_base.h
@@ -54,6 +54,7 @@ namespace LAMMPS_NS
           inline bool matches_id(char *_id);
 
           virtual bool isDoubleData() = 0;
+          virtual bool isIntData() = 0;
 
           virtual void addZero() = 0;
           virtual void addUninitialized(int n) = 0;
diff --git a/src/domain.h b/src/domain.h
index 4b48e69873a56c0f9b00ebea32416c8da102db29..8c5abea2a95ee82634d64d647c0d661d10551727 100644
--- a/src/domain.h
+++ b/src/domain.h
@@ -124,7 +124,7 @@ class Domain : protected Pointers {
   void delete_region(int, char **);
   int find_region(char *);
   void set_boundary(int, char **, int);
-  void print_box(const char *);
+  virtual void print_box(const char *); 
 
   virtual void lamda2x(int);
   virtual void x2lamda(int);
diff --git a/src/fix_check_timestep_gran.cpp b/src/fix_check_timestep_gran.cpp
index fa3d9b5de5463803aff0b0e1b699a1337a67d809..ade81f29df7c8eca9f6b15c4b925eb83750f312c 100644
--- a/src/fix_check_timestep_gran.cpp
+++ b/src/fix_check_timestep_gran.cpp
@@ -37,6 +37,12 @@
 #include "neighbor.h"
 #include "mpi_liggghts.h"
 
+#if defined(_WIN32) || defined(_WIN64)
+#include <algorithm>
+#define fmax std::max
+#define fmin std::min
+#endif
+
 using namespace LAMMPS_NS;
 using namespace FixConst;
 
diff --git a/src/fix_contact_history.cpp b/src/fix_contact_history.cpp
index 719547efc871c4454f358cfe7b437b63d4caa2ae..911adb6e2d412c8108cedd80a94636111791f970 100644
--- a/src/fix_contact_history.cpp
+++ b/src/fix_contact_history.cpp
@@ -361,6 +361,29 @@ void FixContactHistory::grow_arrays(int nmax)
   memory->grow(delflag,nmax,maxtouch,"contact_history:delflag");
 }
 
+/* ----------------------------------------------------------------------
+   allocate local atom-based arrays
+------------------------------------------------------------------------- */
+
+void FixContactHistory::reset_history(int dnum_wall)
+{
+  
+  if(dnum_wall > dnum)
+  {
+      contacthistory = 0;
+      memory->grow(contacthistory,atom->nmax,maxtouch,dnum_wall,"contact_history:contacthistory");
+
+      // initialize npartner to 0 so neighbor list creation is OK the 1st time
+      if(atom->nmax > 0)
+      {
+          int nlocal = atom->nlocal;
+          for (int i = 0; i < nlocal; i++) npartner[i] = 0;
+      }
+
+      dnum = dnum_wall;
+  }
+}
+
 /* ----------------------------------------------------------------------
    grow local atom-based arrays in case maxtouch is too small
 ------------------------------------------------------------------------- */
diff --git a/src/fix_contact_history.h b/src/fix_contact_history.h
index 334742bf9e9eb61a36d42086a22778704c658408..a3140ed8ebf477612cf95a82c5e813abf0110235 100644
--- a/src/fix_contact_history.h
+++ b/src/fix_contact_history.h
@@ -75,10 +75,15 @@ class FixContactHistory : public Fix {
   void markAllContacts();
   void cleanUpContacts();
 
+  void reset_history(int dnum_wall);
+
   // return # of contacts
   int n_contacts();
   int n_contacts(int contact_groupbit);
 
+  int get_dnum()
+  { return dnum; }
+
  private:
 
   // functions specific for pair
diff --git a/src/fix_contact_history_I.h b/src/fix_contact_history_I.h
index 38c8df74a2eedf7b35c78662e90d857cffbf64ed..442901aa08f43cede88aa7962d3186f6721e69e2 100644
--- a/src/fix_contact_history_I.h
+++ b/src/fix_contact_history_I.h
@@ -119,7 +119,7 @@
       {
           
           // copy contact history
-          vectorCopyN(contacthistory[iP][i],history,dnum);
+          if(dnum > 0) vectorCopyN(contacthistory[iP][i],history,dnum);
           
       }
     }
diff --git a/src/fix_insert.cpp b/src/fix_insert.cpp
index ed8128ddcb1a8a2137a2196ed1682a3cdbfb4336..5d7475b913198933f9085d8d040297768ab89a10 100644
--- a/src/fix_insert.cpp
+++ b/src/fix_insert.cpp
@@ -40,6 +40,10 @@
 #include "mpi_liggghts.h"
 #include "vector_liggghts.h"
 
+#if defined(_WIN32) || defined(_WIN64)
+double inline round(double d) {  return floor(d + 0.5); }
+#endif
+
 using namespace LAMMPS_NS;
 using namespace FixConst;
 
@@ -204,16 +208,29 @@ FixInsert::FixInsert(LAMMPS *lmp, int narg, char **arg) :
       } else error->fix_error(FLERR,this,"expecting keyword 'constant' after keyword 'omega'");
       iarg += 5;
       hasargs = true;
-    } else if (strcmp(arg[iarg],"quat") == 0) {
-      if (iarg+5 > narg) error->fix_error(FLERR,this,"");
-      if (strcmp(arg[iarg+1],"constant") == 0)
+    } else if (strcmp(arg[iarg],"orientation") == 0) {
+      if (iarg+2 > narg)
+        error->fix_error(FLERR,this,"not enough arguments for 'orientation'");
+      iarg++;
+      if(strcmp(arg[iarg],"random") == 0)
+      {
+          quat_random_ = true;
+          iarg++;
+      }
+      else if(strcmp(arg[iarg],"template") == 0)
       {
-          quat_insert[0] = atof(arg[iarg+2]);
-          quat_insert[1] = atof(arg[iarg+3]);
-          quat_insert[2] = atof(arg[iarg+4]);
-          quat_insert[3] = atof(arg[iarg+5]);
-      } else error->fix_error(FLERR,this,"expecting keyword 'constant' after keyword 'quat'");
-      iarg += 6;
+          quat_random_ = false;
+          iarg++;
+      }
+      else if (strcmp(arg[iarg],"constant") == 0)
+      {
+          iarg++;
+          if (iarg+4 > narg) error->fix_error(FLERR,this,"");
+          quat_insert[0] = atof(arg[iarg++]);
+          quat_insert[1] = atof(arg[iarg++]);
+          quat_insert[2] = atof(arg[iarg++]);
+          quat_insert[3] = atof(arg[iarg++]);
+      } else error->fix_error(FLERR,this,"expecting 'random', template' or 'constant' after keyword 'quat'");
       hasargs = true;
     }
     
@@ -332,6 +349,7 @@ void FixInsert::init_defaults()
   vectorZeroize3D(omega_insert);
 
   quatUnitize4D(quat_insert);
+  quat_random_ = false;
 
   print_stats_during_flag = 1;
 }
@@ -519,9 +537,11 @@ void FixInsert::pre_exchange()
   // limit to max number of particles that shall be inserted
   // to avoid that max # may be slightly exceeded by random processes
   // in fix_distribution->randomize_list, set exact_number to 1
-  if (ninsert_exists && ninserted + ninsert_this > ninsert)
+  if (ninsert_exists && ninserted + ninsert_this >= ninsert)
   {
       ninsert_this = ninsert - ninserted;
+      if(ninsert_this < 0)
+        ninsert_this = 0;
       exact_number = 1;
   }
 
@@ -809,19 +829,20 @@ void FixInsert::restart(char *buf)
 {
   int n = 0;
   double *list = (double *) buf;
-  double next_reneighbor_re;
+  bigint next_reneighbor_re;
 
   seed = static_cast<int> (list[n++]) + comm->me;
   ninserted = static_cast<int> (list[n++]);
   first_ins_step = static_cast<int> (list[n++]);
-  next_reneighbor_re = static_cast<int> (list[n++]);
+  next_reneighbor_re = static_cast<bigint> (list[n++]);
   massinserted = list[n++];
 
   random->reset(seed);
 
   // in order to be able to continue pouring with increased number of particles
   // if insert was already finished in run to be restarted
-  if(next_reneighbor_re != 0 && ninserted < ninsert) next_reneighbor = next_reneighbor_re;
+  if(next_reneighbor_re != 0) next_reneighbor = next_reneighbor_re;
+
 }
 
 /* ----------------------------------------------------------------------
diff --git a/src/fix_insert.h b/src/fix_insert.h
index 3df2ee8af430fbe60e7185ad506edeaf09f7ed1e..729d9b1be0e0c004dd4bc8c287d3bbfea6276408 100644
--- a/src/fix_insert.h
+++ b/src/fix_insert.h
@@ -129,6 +129,7 @@ class FixInsert : public Fix {
   double v_insertFluct[3];
   double omega_insert[3];
   double quat_insert[4];
+  bool quat_random_;
 
   /*---FURTHER THINGS THAT WE NEED---*/
 
diff --git a/src/fix_insert_pack.cpp b/src/fix_insert_pack.cpp
index 362ff897f06ae498b738e6af30b0299eb4c49af2..897a3a9c8dce838fdf86178273a2b3b8e97ffb66 100644
--- a/src/fix_insert_pack.cpp
+++ b/src/fix_insert_pack.cpp
@@ -40,6 +40,7 @@
 #include "mpi_liggghts.h"
 #include "particleToInsert.h"
 #include "fix_multisphere.h"
+#include "math_extra_liggghts.h"
 
 #define SEED_OFFSET 12
 
@@ -386,6 +387,9 @@ void FixInsertPack::x_v_omega(int ninsert_this_local,int &ninserted_this_local,
                 v_toInsert[2] = v_insert[2] + v_insertFluct[2] * random->gaussian();
             }
 
+            if(quat_random_)
+                MathExtraLiggghts::random_unit_quat(random,quat_insert);
+
             if(pos[0] == 0. && pos[1] == 0. && pos[2] == 0.)
                 error->one(FLERR,"FixInsertPack::x_v_omega() illegal position");
             ninserted_spheres_this_local += pti->set_x_v_omega(pos,v_toInsert,omega_insert,quat_insert);
@@ -435,6 +439,9 @@ void FixInsertPack::x_v_omega(int ninsert_this_local,int &ninserted_this_local,
                     v_toInsert[2] = v_insert[2] + v_insertFluct[2] * random->gaussian();
                 }
 
+                if(quat_random_)
+                    MathExtraLiggghts::random_unit_quat(random,quat_insert);
+
                 nins = pti->check_near_set_x_v_omega(pos,v_toInsert,omega_insert,quat_insert,xnear,nspheres_near);
 
             }
diff --git a/src/fix_insert_stream.cpp b/src/fix_insert_stream.cpp
index 0bd3715b6de6df73cb5d9ed76044fd692f44c5fa..3a8b6e369ebaa4585638b6b4bc19717cf5e7c305 100644
--- a/src/fix_insert_stream.cpp
+++ b/src/fix_insert_stream.cpp
@@ -577,6 +577,9 @@ void FixInsertStream::x_v_omega(int ninsert_this_local,int &ninserted_this_local
 
             // could randomize vel, omega, quat here
 
+            if(quat_random_)
+                    MathExtraLiggghts::random_unit_quat(random,quat_insert);
+
             if(ntry < maxtry)
             {
                 nins = pti->set_x_v_omega(pos,v_normal,omega_tmp,quat_insert);
@@ -610,6 +613,9 @@ void FixInsertStream::x_v_omega(int ninsert_this_local,int &ninserted_this_local
 
                 // could randomize vel, omega, quat here
 
+                if(quat_random_)
+                    MathExtraLiggghts::random_unit_quat(random,quat_insert);
+                
                 if(ntry < maxtry)
                 {
                     
diff --git a/src/fix_mesh.cpp b/src/fix_mesh.cpp
index b7d6af28aec86a108c2311d947c4524967a52d43..cb64b3fc8a6f7869dc54d595c9f67c1d2a07dc9e 100644
--- a/src/fix_mesh.cpp
+++ b/src/fix_mesh.cpp
@@ -391,6 +391,9 @@ void FixMesh::rotateMesh(double const axisX, double const axisY, double const ax
 {
     double axis[3] = {axisX,axisY,axisZ}, p[3] = {0.,0.,0.};
 
+    if(vectorMag3D(axis) < 1e-5)
+        error->fix_error(FLERR,this,"illegal magnitude of rotation axis");
+
     if (comm->me == 0)
     {
       //fprintf(screen,"rotate ");
diff --git a/src/fix_mesh_surface.cpp b/src/fix_mesh_surface.cpp
index 1eca4cb68bfef1a584a73e65aed112d9089ac2bf..f70a7838452ec16c925a0b4ed7c65da88ccd7557 100644
--- a/src/fix_mesh_surface.cpp
+++ b/src/fix_mesh_surface.cpp
@@ -144,10 +144,8 @@ void FixMeshSurface::pre_delete(bool unfixflag)
     FixMesh::pre_delete(unfixflag);
 
     // contact tracker and neighlist are created via fix wall/gran
-    if(fix_contact_history_)
-      modify->delete_fix(fix_contact_history_->id);
-    if(fix_mesh_neighlist_)
-      modify->delete_fix(fix_mesh_neighlist_->id);
+    deleteWallNeighList();
+    deleteContactHistory();
 }
 
 /* ---------------------------------------------------------------------- */
@@ -221,6 +219,12 @@ void FixMeshSurface::createWallNeighList(int igrp)
     */
 }
 
+void FixMeshSurface::deleteWallNeighList()
+{
+    if(fix_mesh_neighlist_)
+      modify->delete_fix(fix_mesh_neighlist_->id);
+}
+
 /* ----------------------------------------------------------------------
    called from fix messflow/mesh out of post_create()
 ------------------------------------------------------------------------- */
@@ -286,6 +290,13 @@ void FixMeshSurface::createContactHistory(int dnum)
     delete []my_id;
 }
 
+void FixMeshSurface::deleteContactHistory()
+{
+    // contact tracker and neighlist are created via fix wall/gran
+    if(fix_contact_history_)
+      modify->delete_fix(fix_contact_history_->id);
+}
+
 /* ----------------------------------------------------------------------
    sets mesh velocity for conveyor model
 ------------------------------------------------------------------------- */
diff --git a/src/fix_mesh_surface.h b/src/fix_mesh_surface.h
index 172e63ce1e18d689abf5d27eb074d44bd629125c..6d2f38ea61ec1259d6b3316dd65cdd9d5a5dfe61 100644
--- a/src/fix_mesh_surface.h
+++ b/src/fix_mesh_surface.h
@@ -65,6 +65,9 @@ namespace LAMMPS_NS
         class FixNeighlistMesh* createOtherNeighList(int igrp,const char *nId);
         void createContactHistory(int dnum);
 
+        void deleteWallNeighList();
+        void deleteContactHistory();
+
         inline bool trackStress()
         {return stress_flag_;}
 
diff --git a/src/fix_move_mesh.cpp b/src/fix_move_mesh.cpp
index f42a2082ae90d4611f5050b8d749f058747955e5..49db1785d86dbe970179a3a2270f2385663ff97f 100644
--- a/src/fix_move_mesh.cpp
+++ b/src/fix_move_mesh.cpp
@@ -23,6 +23,7 @@
    Contributing authors:
    Christoph Kloss (JKU Linz, DCS Computing GmbH, Linz)
    Philippe Seil (JKU Linz)
+   Richard Berger (JKU Linz)
 ------------------------------------------------------------------------- */
 
 #include "fix_move_mesh.h"
@@ -192,7 +193,7 @@ void FixMoveMesh::final_integrate()
 void FixMoveMesh::write_restart(FILE *fp)
 {
   int n = 0;
-  double list[1 + move_->n_restart()];
+  double * list = new double[1 + move_->n_restart()];
   list[n++] = time_;
   
   move_->write_restart(&(list[n]));
@@ -203,6 +204,8 @@ void FixMoveMesh::write_restart(FILE *fp)
     fwrite(&size,sizeof(int),1,fp);
     fwrite(list,sizeof(double),n,fp);
   }
+
+  delete[] list;
 }
 
 /* ----------------------------------------------------------------------
diff --git a/src/fix_template_sphere.cpp b/src/fix_template_sphere.cpp
index c11eadf0085be6c6e7962ea951c24fe799218a6d..ee89a6dc538ff2ffc5b5faa4496ece587a1765c1 100644
--- a/src/fix_template_sphere.cpp
+++ b/src/fix_template_sphere.cpp
@@ -63,6 +63,7 @@ FixTemplateSphere::FixTemplateSphere(LAMMPS *lmp, int narg, char **arg) :
 
   // set default values
   atom_type = 1;
+  vol_limit = 1e-12;
 
   pdf_radius = NULL;
   pdf_density = NULL;
@@ -106,6 +107,15 @@ FixTemplateSphere::FixTemplateSphere(LAMMPS *lmp, int narg, char **arg) :
       hasargs = true;
       iarg += 2;
     }
+    else if (strcmp(arg[iarg],"volume_limit") == 0)
+    {
+      if (iarg+2 > narg) error->fix_error(FLERR,this,"not enough arguments for 'volume_limit'");
+      vol_limit = atof(arg[iarg+1]);
+      if(vol_limit <= 0)
+        error->fix_error(FLERR,this,"volume_limit > 0 required");
+      hasargs = true;
+      iarg += 2;
+    }
     else if (strcmp(arg[iarg],"radius") == 0) {
       hasargs = true;
       if(strcmp(this->style,"particletemplate/sphere"))
@@ -375,8 +385,9 @@ double FixTemplateSphere::max_r_bound()
 
 double FixTemplateSphere::volexpect()
 {
-    if(volume_expect < 1e-12)
-        error->fix_error(FLERR,this,"Volume expectancy too small");
+    if(volume_expect < vol_limit)
+        error->fix_error(FLERR,this,"Volume expectancy too small. Change 'volume_limit' "
+        "if you are sure you know what you're doing");
     return volume_expect;
 }
 
diff --git a/src/fix_template_sphere.h b/src/fix_template_sphere.h
index 8200a66f75cc0f93e8b9cc46f620c136083e8680..911277d01f99c359f6a91b8c37a0ace98a5d15c8 100644
--- a/src/fix_template_sphere.h
+++ b/src/fix_template_sphere.h
@@ -85,6 +85,7 @@ class FixTemplateSphere : public Fix {
   class LMP_PROBABILITY_NS::PDF *pdf_density;
   double volume_expect;
   double mass_expect;
+  double vol_limit;
 };
 
 }
diff --git a/src/fix_wall_gran.cpp b/src/fix_wall_gran.cpp
index 2956eff235bad4408ddbb538e0c6eb01a56b0db8..dcc28d65223d01b1ec0af03d4f844935f4ef5b0f 100644
--- a/src/fix_wall_gran.cpp
+++ b/src/fix_wall_gran.cpp
@@ -21,6 +21,13 @@
    See the README file in the top-level directory.
 ------------------------------------------------------------------------- */
 
+/* ----------------------------------------------------------------------
+   Contributing authors:
+   Christoph Kloss (JKU Linz, DCS Computing GmbH, Linz)
+   Philippe Seil (JKU Linz)
+   Richard Berger (JKU Linz)
+------------------------------------------------------------------------- */
+
 #include <math.h>
 #include <stdlib.h>
 #include <string.h>
@@ -128,7 +135,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
            if(narg-iarg_ < nPrimitiveArgs)
             error->fix_error(FLERR,this,"not enough arguments for primitive wall");
 
-           double argVec[nPrimitiveArgs];
+           double * argVec = new double[nPrimitiveArgs];
            for(int i=0;i<nPrimitiveArgs;i++)
            {
              
@@ -148,6 +155,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
            }
            if(!setflag) error->fix_error(FLERR,this,"unknown primitive wall style");
            hasargs = true;
+           delete[] argVec;
         } else if (strcmp(arg[iarg_],"mesh") == 0) {
            hasargs = true;
            meshwall_ = 1;
@@ -381,14 +389,17 @@ void FixWallGran::init()
 
         delete []pairstyle;
 
-        // re-initialize history if pair style has changed
+        // prohibit changing pair style with wall active
         if(pair_changed)
         {
             if(dnum_ != pairgran_->dnum_pair())
                 error->fix_error(FLERR,this,"Can not change to this pair style with fix wall/gran being active");
-        //    fix_contact_tracker_->reset_history();
         }
 
+        // re-initialize history if contact history was registered by fix with different # hist values
+        for(int i=0;i<n_FixMesh_;i++)
+            FixMesh_list_[i]->contactHistory()->reset_history(dnum_);
+
         // check if a fix rigid is registered - important for damp
         fix_rigid_ = pairgran_->fr_pair();
 
diff --git a/src/fix_wall_gran_hooke_history.cpp b/src/fix_wall_gran_hooke_history.cpp
index 1dce1b083c9d213e9b33923a15d3fa964878a25b..5e0365a80dd665cb163e47b561d91a934840ca6c 100644
--- a/src/fix_wall_gran_hooke_history.cpp
+++ b/src/fix_wall_gran_hooke_history.cpp
@@ -91,10 +91,12 @@ FixWallGranHookeHistory::FixWallGranHookeHistory(LAMMPS *lmp, int narg, char **a
                 rollingflag = 1;
             else if(strcmp(arg[iarg_],"epsd") == 0)
                 rollingflag = 2;
+            else if(strcmp(arg[iarg_],"epsd2") == 0)
+                rollingflag = 3;
             else if(strcmp(arg[iarg_],"off") == 0)
                 rollingflag = 0;
             else
-                error->fix_error(FLERR,this,"expecting 'cdt' or 'off' after keyword 'rolling_friction'");
+                error->fix_error(FLERR,this,"expecting 'cdt', 'epsd', 'epsd2' or 'off' after keyword 'rolling_friction'");
             iarg_++;
             hasargs = true;
         } else if (strcmp(arg[iarg_],"viscous") == 0) {
@@ -380,8 +382,16 @@ void FixWallGranHookeHistory::compute_force(int ip, double deltan, double rsq,do
 
   // add rolling friction torque
   vectorZeroize3D(r_torque);
-  if(rollingflag)
-    addRollingFrictionTorque(ip,wr1,wr2,wr3,cr,ccel,r,mass,rmu,kn,dx,dy,dz,rsqinv,c_history,r_torque);
+  switch (rollingflag)
+  {
+  case 0: break;
+  case 1: addRollingFrictionTorque<1>(ip,wr1,wr2,wr3,cr,ccel,r,mass,rmu,kn,kt,dx,dy,dz,rsqinv,c_history,r_torque);
+          break;
+  case 2: addRollingFrictionTorque<2>(ip,wr1,wr2,wr3,cr,ccel,r,mass,rmu,kn,kt,dx,dy,dz,rsqinv,c_history,r_torque);
+          break;
+  case 3: addRollingFrictionTorque<3>(ip,wr1,wr2,wr3,cr,ccel,r,mass,rmu,kn,kt,dx,dy,dz,rsqinv,c_history,r_torque);
+          break;
+  }
 
   if(computeflag_)
   {
@@ -448,13 +458,14 @@ inline void FixWallGranHookeHistory::addCohesionForce(int &ip, double &r, double
 
 /* ---------------------------------------------------------------------- */
 
+template <int ROLLINGFRICTION>
 void FixWallGranHookeHistory::addRollingFrictionTorque(int ip, double wr1,double wr2,double wr3,double cr,double ccel,
-            double r,double mi,double rmu,double kn,double dx, double dy, double dz,double rsqinv,double *c_history,double *r_torque)
+            double r,double mi,double rmu,double kn,double kt,double dx, double dy, double dz,double rsqinv,double *c_history,double *r_torque)
 {
     double wrmag,r_torque_n[3];
     double radius = atom->radius[ip];
 
-    if (rollingflag == 1)
+    if (ROLLINGFRICTION == 1)
     {
             wrmag = sqrt(wr1*wr1+wr2*wr2+wr3*wr3);
             if (wrmag > 0.)
@@ -471,7 +482,7 @@ void FixWallGranHookeHistory::addRollingFrictionTorque(int ip, double wr1,double
                 vectorSubtract3D(r_torque,r_torque_n,r_torque);
             }
     }
-    else
+    else 
     {
       double kr,r_inertia,r_coef,r_torque_mag,r_torque_max,factor;
       double dr_torque[3],wr_n[3],wr_t[3];
@@ -490,7 +501,10 @@ void FixWallGranHookeHistory::addRollingFrictionTorque(int ip, double wr1,double
       wr_t[2] = wr3 - wr_n[2];
 
       // spring
-      kr = 2.25*kn*rmu*rmu*radius*radius; 
+      if (ROLLINGFRICTION == 2)
+        kr = 2.25*kn*rmu*rmu*radius*radius; 
+      else
+        kr = kt*radius*radius;
 
       dr_torque[0] = kr * wr_t[0] * dt;
       dr_torque[1] = kr * wr_t[1] * dt;
@@ -500,12 +514,6 @@ void FixWallGranHookeHistory::addRollingFrictionTorque(int ip, double wr1,double
       r_torque[1] = c_history[4] + dr_torque[1];
       r_torque[2] = c_history[5] + dr_torque[2];
 
-      // dashpot
-      if (domain->dimension == 2) r_inertia = 1.5*mi*radius*radius;
-      else  r_inertia = 1.4*mi*radius*radius;
-
-      r_coef = coeffRollVisc[itype][atom_type_wall_] * 2 * sqrt(r_inertia*kr);
-
       // limit max. torque
       r_torque_mag = vectorMag3D(r_torque);
       r_torque_max = fabs(ccel*r)*radius*rmu;
@@ -517,21 +525,38 @@ void FixWallGranHookeHistory::addRollingFrictionTorque(int ip, double wr1,double
         r_torque[1] *= factor;
         r_torque[2] *= factor;
 
-        r_coef = 0.0; // no damping in case of full mobilisation rolling angle
+        // save rolling torque due to spring
+        c_history[3] = r_torque[0];
+        c_history[4] = r_torque[1];
+        c_history[5] = r_torque[2];
 
-      }
+        // no damping / no dashpot in case of full mobilisation rolling angle
+        // r_coef = 0.0;
 
-      // save rolling torque due to spring
-      c_history[3] = r_torque[0];
-      c_history[4] = r_torque[1];
-      c_history[5] = r_torque[2];
+      } else {
 
-      // add damping torque
-      r_torque[0] += r_coef*wr_t[0];
-      r_torque[1] += r_coef*wr_t[1];
-      r_torque[2] += r_coef*wr_t[2];
+        // save rolling torque due to spring before adding damping torque
+        c_history[3] = r_torque[0];
+        c_history[4] = r_torque[1];
+        c_history[5] = r_torque[2];
 
+        // dashpot only for the original epsd model
+        if(ROLLINGFRICTION == 2)
+        {
+          // dashpot
+          if (domain->dimension == 2) r_inertia = 1.5*mi*radius*radius;
+          else  r_inertia = 1.4*mi*radius*radius;
+
+          r_coef = coeffRollVisc[itype][atom_type_wall_] * 2 * sqrt(r_inertia*kr);
+
+          // add damping torque
+          r_torque[0] += r_coef*wr_t[0];
+          r_torque[1] += r_coef*wr_t[1];
+          r_torque[2] += r_coef*wr_t[2];
+        }
+      }
     }
+
 }
 
 /* ---------------------------------------------------------------------- */
diff --git a/src/fix_wall_gran_hooke_history.h b/src/fix_wall_gran_hooke_history.h
index 7ad4b3c71619bcaf452a458b7679694e1b4c1bc8..2979fae0fe7b768e658fa16fb96f3e17b263b781 100644
--- a/src/fix_wall_gran_hooke_history.h
+++ b/src/fix_wall_gran_hooke_history.h
@@ -53,8 +53,9 @@ class FixWallGranHookeHistory : public FixWallGran {
                               double dx, double dy, double dz,double *vwall,
                              double *c_history,double area_ratio);
   virtual void addCohesionForce(int &ip, double &r, double &Fn_coh,double area_ratio);
+  template <int ROLLINGFRICTION>
   void addRollingFrictionTorque(int ip, double wr1,double wr2,double wr3,double cr,double ccel,
-            double r,double mi,double rmu,double kn,double dx, double dy, double dz,double rsqinv,double *c_history,double *r_torque);
+            double r,double mi,double rmu,double kn,double kt,double dx, double dy, double dz,double rsqinv,double *c_history,double *r_torque);
 
   virtual void deriveContactModelParams(int ip, double deltan,double meff_wall,
                             double &kn, double &kt, double &gamman, double &gammat,
diff --git a/src/general_container.h b/src/general_container.h
index 6fc954d295c6616a983078a853dc934e3b333089..ad1794001a9a356de9c25cf6707f746cb26ce74d 100644
--- a/src/general_container.h
+++ b/src/general_container.h
@@ -46,6 +46,7 @@ namespace LAMMPS_NS
       public:
 
           bool isDoubleData();
+          bool isIntData();
 
           void add(T** elem);
           void addZero();
diff --git a/src/general_container_I.h b/src/general_container_I.h
index 2aa32854faea9cbfe7c106024c14156c478cf936..4562bef5ffc7035b8c28d396c69251d2e01baabb 100644
--- a/src/general_container_I.h
+++ b/src/general_container_I.h
@@ -90,6 +90,19 @@
         return false;
   }
 
+  template<typename T, int NUM_VEC, int LEN_VEC>
+  bool GeneralContainer<T,NUM_VEC,LEN_VEC>::isIntData()
+  {
+      // partial templatization does not work
+      // std::is_same<T,double>::value is from C++11
+      // this is work-around
+
+      if(sizeof(T) == sizeof(int))
+        return true;
+      else
+        return false;
+  }
+
   /* ----------------------------------------------------------------------
    add element(s)
   ------------------------------------------------------------------------- */
diff --git a/src/math_extra_liggghts.h b/src/math_extra_liggghts.h
index b22fd4596407d116302b567410939cd8963cefe0..3104dbea4b86884e6dd12ada58ab63daf5cf0cb9 100644
--- a/src/math_extra_liggghts.h
+++ b/src/math_extra_liggghts.h
@@ -28,6 +28,7 @@
 #include "error.h"
 #include "vector_liggghts.h"
 #include "math_extra.h"
+#include "random_park.h"
 
 #define TOLERANCE_ORTHO 1e-10
 
@@ -82,6 +83,8 @@ namespace MathExtraLiggghts {
   // calculate barycentrc coordinates of p w.r.t node, added by P.S.
   inline void calcBaryTriCoords(double *p, double **edgeVec, double *edgeLen, double *bary);
   inline void calcBaryTriCoords(double *p, double *edgeVec0, double *edgeVec1, double *edgeVec2, double *edgeLen, double *bary);
+
+  inline void random_unit_quat(LAMMPS_NS::RanPark *random,double *quat);
 };
 
 /* ----------------------------------------------------------------------
@@ -520,4 +523,24 @@ void MathExtraLiggghts::calcBaryTriCoords(double *ap, double *edgeVec0, double *
   bary[0] = 1. - bary[1] - bary[2];
 }
 
+/* ----------------------------------------------------------------------
+   generate random unit quaternion
+   from http://planning.cs.uiuc.edu/node198.html
+------------------------------------------------------------------------- */
+
+void MathExtraLiggghts::random_unit_quat(LAMMPS_NS::RanPark *random,double *quat)
+{
+    double u1 = random->uniform();
+    double u2 = random->uniform();
+    double u3 = random->uniform();
+
+    double h1 = sqrt(1.-u1);
+    double h2 = sqrt(u1);
+
+    quat[0] = h1 * sin(2.*M_PI*u2);
+    quat[1] = h1 * cos(2.*M_PI*u2);
+    quat[2] = h2 * sin(2.*M_PI*u3);
+    quat[3] = h2 * cos(2.*M_PI*u3);
+}
+
 #endif
diff --git a/src/modify.cpp b/src/modify.cpp
index 104c64f5f5ab4ea02af829d4c549d48e6d64b48b..a63619df15e779cfba845a9e023fb4af5679da9c 100644
--- a/src/modify.cpp
+++ b/src/modify.cpp
@@ -21,6 +21,11 @@
    See the README file in the top-level directory.
 ------------------------------------------------------------------------- */
 
+/* ----------------------------------------------------------------------
+   Contributing authors:
+   Richard Berger (JKU Linz)
+------------------------------------------------------------------------- */
+
 #include "stdio.h"
 #include "string.h"
 #include "modify.h"
@@ -35,6 +40,8 @@
 #include "domain.h"
 #include "memory.h"
 #include "error.h"
+#include <map>
+#include <string>
 
 using namespace LAMMPS_NS;
 using namespace FixConst;
@@ -634,6 +641,9 @@ int Modify::min_reset_ref()
 /* ----------------------------------------------------------------------
    add a new fix or replace one with same ID
 ------------------------------------------------------------------------- */
+template<typename T> Fix * create_fix_instance(LAMMPS* lmp, int nargs, char** arg) {
+	return new T(lmp, nargs, arg);
+}
 
 void Modify::add_fix(int narg, char **arg, char *suffix)
 {
@@ -686,34 +696,32 @@ void Modify::add_fix(int narg, char **arg, char *suffix)
 
   int success = 0;
 
-  if (suffix && lmp->suffix_enable) {
-    char estyle[256];
-    sprintf(estyle,"%s/%s",arg[2],suffix);
-    success = 1;
-
-    if (0) return;
+  std::map<std::string, Fix*(*)(LAMMPS*,int,char**)> fix_creators;
 
 #define FIX_CLASS
 #define FixStyle(key,Class) \
-    else if (strcmp(estyle,#key) == 0) fix[ifix] = new Class(lmp,narg,arg);
+  fix_creators[#key] = &create_fix_instance<Class>;
 #include "style_fix.h"
 #undef FixStyle
 #undef FIX_CLASS
 
-    else success = 0;
+  if (suffix && lmp->suffix_enable) {
+    char estyle[256];
+    sprintf(estyle,"%s/%s",arg[2],suffix);
+    
+    success = 0;
+
+    if(fix_creators.find(estyle) != fix_creators.end()) {
+      fix[ifix] = fix_creators[estyle](lmp,narg,arg);
+      success = 1;
+    }
   }
 
   if (!success) {
-    if (0) return;
-
-#define FIX_CLASS
-#define FixStyle(key,Class) \
-    else if (strcmp(arg[2],#key) == 0) fix[ifix] = new Class(lmp,narg,arg);
-#include "style_fix.h"
-#undef FixStyle
-#undef FIX_CLASS
-
-    else {fprintf(screen,"adding fix %s\n",arg[2]);error->all(FLERR,"Invalid fix style");}
+    if(fix_creators.find(arg[2]) != fix_creators.end()) {
+      fix[ifix] = fix_creators[arg[2]](lmp,narg,arg);
+    }
+    else {fprintf(screen,"adding %s\n",arg[2]);error->all(FLERR,"Invalid fix style");}
   }
 
   // set fix mask values and increment nfix (if new)
diff --git a/src/multi_node_mesh_I.h b/src/multi_node_mesh_I.h
index c65faf6fa8ba3c70ce0defeb439610309820ae29..e12d15207fedb82a574f573afce8e985a5b9862d 100644
--- a/src/multi_node_mesh_I.h
+++ b/src/multi_node_mesh_I.h
@@ -317,7 +317,7 @@
             node_orig_->add(tmp);
           }
 
-          this->memory->destroy<double>(tmp);
+          this->memory->template destroy<double>(tmp);
       }
 
       return isFirst;
diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp
index 7acb117b73124f8f48bc640cdda7768bb6b649ef..f168324baa6bdff8f131bc7a0f2d56794173bb48 100644
--- a/src/pair_born_coul_wolf.cpp
+++ b/src/pair_born_coul_wolf.cpp
@@ -11,6 +11,10 @@
    See the README file in the top-level LAMMPS directory.
 ------------------------------------------------------------------------- */
 
+#if defined(_WIN32) || defined(_WIN64)
+// must be disabled, because of missing error function erfc
+#else
+
 /* ----------------------------------------------------------------------
    Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov
 ------------------------------------------------------------------------- */
@@ -464,3 +468,5 @@ double PairBornCoulWolf::single(int i, int j, int itype, int jtype,
   }
   return eng;
 }
+
+#endif
\ No newline at end of file
diff --git a/src/pair_born_coul_wolf.h b/src/pair_born_coul_wolf.h
index 3428432542474fe4c30582c655037bfbcd46e739..4aaf3ced41414e56f6edd7d252fb710efdfdf407 100644
--- a/src/pair_born_coul_wolf.h
+++ b/src/pair_born_coul_wolf.h
@@ -10,7 +10,9 @@
 
    See the README file in the top-level LAMMPS directory.
 ------------------------------------------------------------------------- */
-
+#if defined(_WIN32) || defined(_WIN64)
+// must be disabled, because of missing error function erfc
+#else
 #ifdef PAIR_CLASS
 
 PairStyle(born/coul/wolf,PairBornCoulWolf)
@@ -76,3 +78,4 @@ All pair coefficients must be set in the data file or by the
 pair_coeff command before running a simulation.
 
 */
+#endif
\ No newline at end of file
diff --git a/src/pair_coul_wolf.cpp b/src/pair_coul_wolf.cpp
index af9751fa11cdaf173c9554d09a4ca558462a48ad..0e55d52f3cfd1f809cdaa935f3672a384f4ad0b7 100644
--- a/src/pair_coul_wolf.cpp
+++ b/src/pair_coul_wolf.cpp
@@ -11,6 +11,10 @@
    See the README file in the top-level LAMMPS directory.
 ------------------------------------------------------------------------- */
 
+#if defined(_WIN32) || defined(_WIN64)
+// must be disabled, because of missing error function erfc
+#else
+
 /* ----------------------------------------------------------------------
    Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov
 ------------------------------------------------------------------------- */
@@ -322,3 +326,4 @@ double PairCoulWolf::single(int i, int j, int itype, int jtype, double rsq,
   }
   return eng;
 }
+#endif
\ No newline at end of file
diff --git a/src/pair_coul_wolf.h b/src/pair_coul_wolf.h
index 89391ffc776868f1274fcdd2a9776a889f816c47..1aa980956a4138e2a1c0627cdeff08ab99f474b2 100644
--- a/src/pair_coul_wolf.h
+++ b/src/pair_coul_wolf.h
@@ -10,7 +10,9 @@
 
    See the README file in the top-level LAMMPS directory.
 ------------------------------------------------------------------------- */
-
+#if defined(_WIN32) || defined(_WIN64)
+// must be disabled, because of missing error function erfc
+#else
 #ifdef PAIR_CLASS
 
 PairStyle(coul/wolf,PairCoulWolf)
@@ -67,3 +69,4 @@ E: Pair coul/wolf requires atom attribute q
 The atom style defined does not have this attribute.
 
 */
+#endif
\ No newline at end of file
diff --git a/src/pair_gran_hooke_history.cpp b/src/pair_gran_hooke_history.cpp
index bfa601bc723ce5abd180999664b4772dd5abbe64..8cfc5b14926f3e9a8e1001db2aaa107e0cb73982 100644
--- a/src/pair_gran_hooke_history.cpp
+++ b/src/pair_gran_hooke_history.cpp
@@ -112,7 +112,7 @@ void PairGranHookeHistory::history_args(char** args)
     args[3] = (char *) "1";
     args[4] = (char *) "shearz";
     args[5] = (char *) "1";
-    if (rollingflag == 2)
+    if (rollingflag == 2 || rollingflag == 3)
     {
       args[6] = (char *) "r_torquex_old"; 
       args[7] = (char *) "1";
@@ -180,6 +180,7 @@ void PairGranHookeHistory::compute_force(int eflag, int vflag,int addflag)
     if     (rollingflag == 0) compute_force_eval<0>(eflag,vflag,addflag);
     else if(rollingflag == 1) compute_force_eval<1>(eflag,vflag,addflag);
     else if(rollingflag == 2) compute_force_eval<2>(eflag,vflag,addflag);
+    else if(rollingflag == 3) compute_force_eval<3>(eflag,vflag,addflag);
 }
 
 /* ---------------------------------------------------------------------- */
@@ -261,7 +262,7 @@ void PairGranHookeHistory::compute_force_eval(int eflag, int vflag,int addflag)
         shear[0] = 0.0;
         shear[1] = 0.0;
         shear[2] = 0.0;
-        if (ROLLINGFRICTION == 2) {
+        if (ROLLINGFRICTION == 2 || ROLLINGFRICTION == 3) {
           shear[3] = 0.0; // this is the r_torque_old
           shear[4] = 0.0; // this is the r_torque_old
           shear[5] = 0.0; // this is the r_torque_old
@@ -431,7 +432,7 @@ void PairGranHookeHistory::compute_force_eval(int eflag, int vflag,int addflag)
                 vectorSubtract3D(r_torque,r_torque_n,r_torque);
             }
           }
-          else
+          else // ROLLINGFRICTION == 2 || 3
           {
             double wr_roll_n[3],wr_roll_t[3];
             double r_inertia_red_i,r_inertia_red_j;
@@ -452,7 +453,10 @@ void PairGranHookeHistory::compute_force_eval(int eflag, int vflag,int addflag)
 
             // spring
             reff=radi*radj/(radi+radj);
-            kr = 2.25*kn*rmu*rmu*reff*reff; 
+            if(ROLLINGFRICTION == 2)
+              kr = 2.25*kn*rmu*rmu*reff*reff; 
+            else
+              kr = kt*reff*reff; 
 
             vectorScalarMult3D(wr_roll_t,update->dt*kr,dr_torque); 
 
@@ -460,14 +464,6 @@ void PairGranHookeHistory::compute_force_eval(int eflag, int vflag,int addflag)
             r_torque[1] = shear[4] + dr_torque[1];
             r_torque[2] = shear[5] + dr_torque[2];
 
-            // dashpot
-            r_inertia_red_i = mi*radi*radi;
-            r_inertia_red_j = mj*radj*radj;
-            if (domain->dimension == 2) r_inertia = 1.5 * r_inertia_red_i * r_inertia_red_j/(r_inertia_red_i + r_inertia_red_j);
-            else  r_inertia = 1.4 * r_inertia_red_i * r_inertia_red_j/(r_inertia_red_i + r_inertia_red_j);
-
-            r_coef = coeffRollVisc[itype][jtype] * 2 * sqrt(r_inertia*kr);
-
             // limit max. torque
             r_torque_mag = vectorMag3D(r_torque);
             r_torque_max = fabs(ccel*r)*reff*rmu;
@@ -479,19 +475,39 @@ void PairGranHookeHistory::compute_force_eval(int eflag, int vflag,int addflag)
               r_torque[1] *= factor;
               r_torque[2] *= factor;
 
-              r_coef = 0.0; // no damping in case of full mobilisation rolling angle
+              // save rolling torque due to spring
+              shear[3] = r_torque[0];
+              shear[4] = r_torque[1];
+              shear[5] = r_torque[2];
+
+              // no damping / no dashpot in case of full mobilisation rolling angle
+              // r_coef = 0.0;
+
+            } else {
+
+              // save rolling torque due to spring before adding damping torque
+              shear[3] = r_torque[0];
+              shear[4] = r_torque[1];
+              shear[5] = r_torque[2];
+
+              // dashpot only for the original epsd model
+              if(ROLLINGFRICTION == 2)
+              {
+                // dashpot
+                r_inertia_red_i = mi*radi*radi;
+                r_inertia_red_j = mj*radj*radj;
+                if (domain->dimension == 2) r_inertia = 1.5 * r_inertia_red_i * r_inertia_red_j/(r_inertia_red_i + r_inertia_red_j);
+                else  r_inertia = 1.4 * r_inertia_red_i * r_inertia_red_j/(r_inertia_red_i + r_inertia_red_j);
+
+                r_coef = coeffRollVisc[itype][jtype] * 2 * sqrt(r_inertia*kr);
+
+                // add damping torque
+                r_torque[0] += r_coef*wr_roll_t[0];
+                r_torque[1] += r_coef*wr_roll_t[1];
+                r_torque[2] += r_coef*wr_roll_t[2];
+              }
             }
 
-            // save rolling torque due to spring
-            shear[3] = r_torque[0];
-            shear[4] = r_torque[1];
-            shear[5] = r_torque[2];
-
-            // add damping torque
-            r_torque[0] += r_coef*wr_roll_t[0];
-            r_torque[1] += r_coef*wr_roll_t[1];
-            r_torque[2] += r_coef*wr_roll_t[2];
-
           }
 
         }
@@ -588,10 +604,13 @@ void PairGranHookeHistory::settings(int narg, char **arg)
             else if(strcmp(arg[iarg_],"epsd") == 0) {
                 rollingflag = 2;
                 dnum_pairgran = 6; 
+            } else if(strcmp(arg[iarg_],"epsd2") == 0) {
+                rollingflag = 3;
+                dnum_pairgran = 6;
             } else if(strcmp(arg[iarg_],"off") == 0)
                 rollingflag = 0;
             else
-                error->all(FLERR,"Illegal pair_style gran command, expecting 'cdt', 'epsd' or 'off' after keyword 'rolling_friction'");
+                error->all(FLERR,"Illegal pair_style gran command, expecting 'cdt', 'epsd', 'epsd2' or 'off' after keyword 'rolling_friction'");
             iarg_++;
             hasargs = true;
         } else if (strcmp(arg[iarg_],"tangential_damping") == 0) {
@@ -644,7 +663,7 @@ void PairGranHookeHistory::init_granular()
 
   if(rollingflag)
     coeffRollFrict1=static_cast<FixPropertyGlobal*>(modify->find_fix_property("coefficientRollingFriction","property/global","peratomtypepair",max_type,max_type,force->pair_style));
-  if(rollingflag == 2) // epsd model
+  if(rollingflag == 2 || rollingflag == 3) // epsd model
     coeffRollVisc1=static_cast<FixPropertyGlobal*>(modify->find_fix_property("coefficientRollingViscousDamping","property/global","peratomtypepair",max_type,max_type,force->pair_style));
   if(viscousflag)
   {
@@ -712,8 +731,8 @@ void PairGranHookeHistory::init_granular()
 
           coeffFrict[i][j] = coeffFrict1->compute_array(i-1,j-1);
           if(rollingflag) coeffRollFrict[i][j] = coeffRollFrict1->compute_array(i-1,j-1);
-      if(rollingflag == 2) coeffRollVisc[i][j] = coeffRollVisc1->compute_array(i-1,j-1);
-      
+          if(rollingflag == 2 || rollingflag == 3) coeffRollVisc[i][j] = coeffRollVisc1->compute_array(i-1,j-1);
+          
           if(cohesionflag) cohEnergyDens[i][j] = cohEnergyDens1->compute_array(i-1,j-1);
           //omitting veff here
 
diff --git a/src/pair_sph.cpp b/src/pair_sph.cpp
index f6eae278dbe432ff155481bf811295cf9b50e9bb..cba9a7cf42ef3c7fb73242633995b1c6122b8a7c 100644
--- a/src/pair_sph.cpp
+++ b/src/pair_sph.cpp
@@ -58,7 +58,8 @@ PairSph::PairSph(LAMMPS *lmp) : Pair(lmp)
     single_enable = 0;
  //   no_virial_compute = 1;
 
-    calcMode_ = 0;
+    pairStyle_ = 0;
+    viscosity_ = 0;
 
     kernel_style = NULL;
 
diff --git a/src/pair_sph.h b/src/pair_sph.h
index c76eeaf4260d8fd16a96e0b98818b18d29bacb07..3a7a60dc9e871e538fc18cd9748528ea3357ea26 100644
--- a/src/pair_sph.h
+++ b/src/pair_sph.h
@@ -63,7 +63,8 @@ class PairSph : public Pair {
   /* PUBLIC ACCESS FUNCTIONS */
 
   int sph_kernel_id(){return kernel_id;}
-  int returnCalcMode(){return calcMode_; };
+  int returnPairStyle(){return pairStyle_; };
+  double returnViscosity() {return viscosity_; };
 
  protected:
 
@@ -87,7 +88,8 @@ class PairSph : public Pair {
 
   int mass_type; // flag defined in atom_vec*
 
-  int calcMode_;
+  int pairStyle_;
+  double viscosity_;
 
 };
 
diff --git a/src/pair_sph_artvisc_tenscorr.cpp b/src/pair_sph_artvisc_tenscorr.cpp
index 74b768c33ad2796b10cb9aad9a7b7c1112ceaefd..3d245c4beab1014999ba3f3eabe757f1eaaa8a2e 100644
--- a/src/pair_sph_artvisc_tenscorr.cpp
+++ b/src/pair_sph_artvisc_tenscorr.cpp
@@ -56,7 +56,7 @@ PairSphArtviscTenscorr::PairSphArtviscTenscorr(LAMMPS *lmp) : PairSph(lmp)
 {
   respa_enable = 0;
   single_enable = 0;
-  calcMode_ = 1;
+  pairStyle_ = 1;
 
   csmean = NULL;
   wDeltaPTypeinv = NULL;
@@ -132,6 +132,7 @@ void PairSphArtviscTenscorr::settings(int narg, char **arg)
       if (iarg+4 > narg) error->all(FLERR, "Illegal pair_style sph command");
       artVisc_flag = 1;
       alpha = force->numeric(arg[iarg+1]);
+      viscosity_ = alpha;
       beta = force->numeric(arg[iarg+2]);
       eta = force->numeric(arg[iarg+3]);
       iarg += 4;
diff --git a/src/region.cpp b/src/region.cpp
index d2b4cc96d1e5d29185c61a315fbabba5dbe0cc31..59a6de4d259f8831378e97b99e4e0cfdf2a8bc61 100644
--- a/src/region.cpp
+++ b/src/region.cpp
@@ -597,7 +597,10 @@ void Region::volume_mc(int n_test,bool cutflag,double cut,double &vol_global,dou
 
     MPI_Sum_Scalar(n_in_global,n_in_global_all,world);
     if(n_in_global_all == 0)
-        error->all(FLERR,"Unable to calculate region volume - are you operating on a 2d region?");
+        error->all(FLERR,"Unable to calculate region volume. Possible sources of error: \n"
+                         "   (a) region volume is too small\n"
+                         "   (b) particles for insertion are too large when using all_in yes\n"
+                         "   (c) region is 2d, but should be 3d");
 
     vol_bbox = (extent_xhi - extent_xlo) * (extent_yhi - extent_ylo) * (extent_zhi - extent_zlo);
 
diff --git a/src/variable.cpp b/src/variable.cpp
index 5c4630f94ee4fe461d70cade0e2843036e66de28..0c9b659d50b2ec1c4b9c070591a7e52837c95030 100644
--- a/src/variable.cpp
+++ b/src/variable.cpp
@@ -33,6 +33,12 @@
 #include "memory.h"
 #include "error.h"
 
+#if defined(_WIN32) || defined(_WIN64)
+#include <windows.h>
+#define sleep Sleep
+#define ATOM AATOM
+#endif
+
 using namespace LAMMPS_NS;
 using namespace MathConst;
 
@@ -395,7 +401,7 @@ int Variable::next(int narg, char **arg)
       while (1) {
 
         if (!rename(filename_1,filename_2)) break;
-        usleep(100000);
+        sleep(100);
       }
       FILE *fp = fopen(filename_2,"r");
       fscanf(fp,"%d",&nextindex);
diff --git a/src/vector_liggghts.h b/src/vector_liggghts.h
index 22d536e56c494beff322d22671fed21350935f81..a8f17b54fc5d6013207ce298f0ba6745ee771e96 100644
--- a/src/vector_liggghts.h
+++ b/src/vector_liggghts.h
@@ -22,7 +22,7 @@
 #ifndef LMP_VECTOR_LIGGGHTS_H
 #define LMP_VECTOR_LIGGGHTS_H
 
-#include<cmath>
+#include "math.h"
 #include "lammps.h"
 
 namespace LAMMPS_NS {
@@ -47,7 +47,7 @@ inline void vectorConstruct3D(int *v,int x, int y, int z)
 
 inline void vectorNormalize3D(double *v)
 {
-    double norm = std::sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
+    double norm = sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);
     double invnorm = (norm == 0) ? 0. : 1./norm;
     v[0] *= invnorm;
     v[1] *= invnorm;
@@ -56,7 +56,7 @@ inline void vectorNormalize3D(double *v)
 
 inline double vectorMag3D(double *v)
 {
-  return (  std::sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2])  );
+  return (  sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2])  );
 }
 
 inline double vectorMag3DSquared(double *v)
@@ -66,14 +66,14 @@ inline double vectorMag3DSquared(double *v)
 
 inline double vectorMag4D(double *v)
 {
-  return (  std::sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]+v[3]*v[3])  );
+  return (  sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]+v[3]*v[3])  );
 }
 
 inline double pointDistance(double *point1, double *point2)
 {
   return
   (
-     std::sqrt
+     sqrt
      (
           (point1[0]-point2[0]) * (point1[0]-point2[0]) +
           (point1[1]-point2[1]) * (point1[1]-point2[1]) +
@@ -335,6 +335,14 @@ inline void vectorInitializeN(int *v,int n,int init)
      v[i]=init;
 }
 
+inline double vectorSumN(double *v,int n)
+{
+  double sum = 0.;
+  for(int i = 0; i < n; i++)
+     sum+=v[i];
+  return sum;
+}
+
 inline void quatUnitize4D(double *q)
 {
   q[0]=1.;
@@ -392,22 +400,22 @@ inline void bufToVector4D(double *vec,double *buf,int &m)
   vec[3] = buf[m++];
 }
 
-inline void printVec3D(FILE *out,char *name, double *vec)
+inline void printVec3D(FILE *out, const char *name, double *vec)
 {
     fprintf(out," vector %s: %e %e %e\n",name,vec[0],vec[1],vec[2]);
 }
 
-inline void printVec3D(FILE *out,char *name, int *vec)
+inline void printVec3D(FILE *out, const char *name, int *vec)
 {
     fprintf(out," vector %s: %d %d %d\n",name,vec[0],vec[1],vec[2]);
 }
 
-inline void printVec4D(FILE *out,char *name, double *vec)
+inline void printVec4D(FILE *out, const char *name, double *vec)
 {
     fprintf(out," vector %s: %e %e %e %e\n",name,vec[0],vec[1],vec[2],vec[3]);
 }
 
-inline void printVecN(FILE *out,char *name, double *vec, int n)
+inline void printVecN(FILE *out, const char *name, double *vec, int n)
 {
     fprintf(out," vector %s:\n",name);
     for(int i = 0; i < n; i++)
@@ -415,7 +423,7 @@ inline void printVecN(FILE *out,char *name, double *vec, int n)
     fprintf(out,"\n");
 }
 
-inline void printVecN(FILE *out,char *name, int *vec, int n)
+inline void printVecN(FILE *out, const char *name, int *vec, int n)
 {
     fprintf(out," vector %s:\n",name);
     for(int i = 0; i < n; i++)
@@ -423,7 +431,7 @@ inline void printVecN(FILE *out,char *name, int *vec, int n)
     fprintf(out,"\n");
 }
 
-inline void printMat33(FILE *out,char *name, double **mat)
+inline void printMat33(FILE *out, const char *name, double **mat)
 {
     fprintf(out," matrix %s: %f %f %f\n",name,mat[0][0],mat[0][1],mat[0][2]);
     fprintf(out,"        %s: %f %f %f\n",name,mat[1][0],mat[1][1],mat[1][2]);
diff --git a/src/version_liggghts.h b/src/version_liggghts.h
index 674a68281b85b6d242fb169773857ad35da508aa..b5c7be2c5a427a3da800b5ea10559f952cc19696 100644
--- a/src/version_liggghts.h
+++ b/src/version_liggghts.h
@@ -1 +1 @@
-#define LIGGGHTS_VERSION "LIGGGHTS-PUBLIC 2.3.4, compiled 2013-05-17-13:42:52 by ckloss"
+#define LIGGGHTS_VERSION "LIGGGHTS-PUBLIC 2.3.5, compiled 2013-06-06-20:25:10 by ckloss"
diff --git a/src/version_liggghts.txt b/src/version_liggghts.txt
index 3f684d2d9054bb637e241b07a9b7ab154d892640..cc6c9a491e0be7fc30975eca1071ed288cc21a03 100644
--- a/src/version_liggghts.txt
+++ b/src/version_liggghts.txt
@@ -1 +1 @@
-2.3.4
+2.3.5