Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SD #1094

Merged
merged 1 commit into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions doc/sphinx/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,6 @@ integrator or thermostat:
- Enables the implicit calculation of electro-hydrodynamics for charged
particles and salt ions in an electric field.

- enable Stokesian Dynamics.

- disable periodic boundary conditions in Stokesian Dynamics.

- use float instead of double in Stokesian Dynamics.

- disable nearfield of Stokesian Dynamics.

- enable debug Stokesian Dynamics.

Interactions
------------

Expand Down Expand Up @@ -279,6 +269,3 @@ looking directly at the code.
- Causes to try to provoke a core dump when exiting unexpectedly.

- Causes to try this even with MPI errors.

- Causes to check more things in the Stokesian Dynamics code. If is
larger 1, SD prints more informations.
2 changes: 0 additions & 2 deletions doc/sphinx/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ report so to the developers.
+--------------------------------+------------------------+------------------+
| Tunable Slip Boundary | Single | Single |
+--------------------------------+------------------------+------------------+
| Stokesian Dynamics | Single | Single |
+--------------------------------+------------------------+------------------+
| **Analysis** |
+--------------------------------+------------------------+------------------+
| uwerr | None | Good |
Expand Down
24 changes: 0 additions & 24 deletions doc/sphinx/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,6 @@ re-used.
(int) if non-zero (default), some warnings are printed out. Set this to
zero if you get annoyed by them.

(double) viscosity of the fluid for the Stokesian Dynamics simulation.

(double) hydrodynamic radius of the particles used in Stokesian
Dynamics.

(int[2]) seed of the Stokes Dynamics random number generator.

(int[2]) offset of the random number generator. Together with the seed,
the state of the random number generator is well defined.

(double) precision used for the approximation of the square root of the
mobility. Sometimes higher accuracy can speedup the simulation.

Setting global variables in Python
----------------------------------

Expand Down Expand Up @@ -508,17 +495,6 @@ unit operating at a constant temperature.

Be aware that this thermostat requires to be given in Kelvin.

Stokesian Dynamics thermostat
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. todo::
This is not implemented yet for the python interface

This thermostat should be used together with the Stokesian Dynamics
implementation. No other thermostat is able to thermalize SD correctly.
The precision of the farfield contribution of the thermostat can be
tuned with

.. _nemd:

``nemd``: Setting up non-equilibrium MD
Expand Down
9 changes: 0 additions & 9 deletions doc/ug/features.tex
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ \section{General features}
\item \newfeature{LB_ELECTROHYDRODYNAMICS} Enables the implicit
calculation of electro-hydrodynamics for charged particles and salt
ions in an electric field.
\item \newfeature{SD} enable Stokesian Dynamics.
\item \newfeature{SD_NOT_PERIODIC} disable periodic boundary conditions in
Stokesian Dynamics.
\item \newfeature{SD_USE_FLOAT} use float instead of double in Stokesian
Dynamics.
\item \newfeature{SD_FF_ONLY} disable nearfield of Stokesian Dynamics.
\item \newfeature{SD_DEBUG} enable debug Stokesian Dynamics.

\end{itemize}

Expand Down Expand Up @@ -264,8 +257,6 @@ \section{Debug messages}
\item \newfeature{FORCE\_CORE} Causes \es{} to try to provoke a core dump
when exiting unexpectedly.
\item \newfeature{MPI\_CORE} Causes \es{} to try this even with MPI errors.
\item \newfeature{SD_DEBUG} Causes \es{} to check more things in the Stokesian
Dynamics code. If \var{warnings} is larger 1, SD prints more information.
\end{itemize}

%%% Local Variables:
Expand Down
1 change: 0 additions & 1 deletion doc/ug/introduction.tex
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ \section{Available simulation methods}
DPD & None & Good \\
Shan-Chen Multicomponent Fluid & Group & Group \\
Tunable Slip Boundary & Single & Single \\
Stokesian Dynamics & Single & Single \\
\multicolumn{3}{|c|}{\textbf{Analysis}} \\
uwerr & None & Good \\
\multicolumn{3}{|c|}{\textbf{Input/Output}} \\
Expand Down
72 changes: 0 additions & 72 deletions doc/ug/run.tex
Original file line number Diff line number Diff line change
Expand Up @@ -588,78 +588,6 @@ \subsubsection{Details on implementation}
codes) but so-called Lucy functions. See \cite{marsili09} for more
details. These avoid the calculation of exponentials.

\section{\texttt{integrate_sd}: Running a stokesian dynamics simulation}
\newescommand[integrate-sd]{integrate_sd}

\begin{essyntax}
\variant{1} integrate_sd \var{steps}
\end{essyntax}

\es uses in the stokesian dynamics algorithm the euler integrater for the
equations of motion. The motion are overdamped. The velocities of the
particles are related to the displacement in the last timestep. This are, at
least if the system is thermalized, however not usefull, as the displacements
don't scale linear with the timestep. The command \texttt{integrate_sd} with
an integer \var{steps} as parameter integrates the system for
\var{steps} time steps. This is implemented using CUDA, so \required{CUDA}
has to be available in the system.

Currently there is no parallel implementation of this integrator, so all
particles have to be in a single process.

\subsection{Setting up the system}
Before running a stokesian dynamics simulation, you have to set a view
constants:
\begin{globvar}
\item[sd_radius] The hydrodynamic particle radius of the (sperical)
particles. Only one particle size is supported.
\item[sd_viscosity] The viscisity of the fluid. Remember this is only a
scaling of the timestep, so you can set it without problems to one.
\item[sd_seed] (int[2]) seed of the Stokes Dynamics random number generator.
As the generator used for the SD runes on the GPU (cuRAND) it has its own
seed and own state.
\item[sd_random_state] (int[2]) offset of the random number
generator. Together with the seed, the state of the random number generator
is well defined.
\item[sd_precision_random] (double) precision used for the approximation of
the square root of the mobility. Sometimes higher accuracy can speedup the
simulation.
\end{globvar}

Make sure to only use the stokesian dynamics thermostat. If you made a warmup
integration without SD, set it with:
\begin{tclcode}
thermostat off
thermostat sd \$temp
\end{tclcode}

\subsection{Periodicity}
The Code uses the ewald-summation (as derived in \cite{beenakker86a}) of the
Rotne-Prager tensor to be usefull in periodic boundary conditions. To disable
the peridoicity of the hydrodynamic, use the feature
\feature{SD_NOT_PERIODIC}.

The ewald summation is required if the system is periodic, as otherwise an
cutoff is introduced, which can lead to negative eigenvalues of the
mobility. This leads to a break down of the code, as it is not possible to
thermalize such a system.

\subsection{Floatingpoint precision}
It is possible to switch between double and float as datatype in Stokesian
Dynamics. As GPUs have more single than double precision floating point
units, the single precision is faster. However this can lead to problems, if
the eigenvalues are not precise enough and get negative. Therfore the default
is double precision. If you want to use single precision, use the feature
\feature{SD_USE_FLOAT}.

\subsection{Farfield only}
The mobility matrix consists of two contribution, the farfield and the
nearfield lubrication correction.
If the nearfield is neglegible, than the feature \feature{SD_FF_ONLY} can be
used.
This should speedup the simulation, as the nearfield doesn't need to be
inverted. Additional the thermal displacements can be directly calculated.

\section{Multi-timestepping}
\newescommand[multitimestepping]{multitimestepping}

Expand Down
26 changes: 0 additions & 26 deletions doc/ug/setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,6 @@ \section{\texttt{setmd}: Setting global variables in TCL}
verlet list has been re-used.
\item[warnings] (int) if non-zero (default), some warnings are printed
out. Set this to zero if you get annoyed by them.
\item[sd_viscosity] (double) viscosity of the fluid for the Stokesian Dynamics
simulation.
\item[sd_radius] (double) hydrodynamic radius of the particles used in
Stokesian Dynamics.
\item[sd_seed] (int[2]) seed of the Stokes Dynamics random number generator.
\item[sd_random_state] (int[2]) offset of the random number
generator. Together with the seed, the state of the random number generator
is well defined.
\item[sd_precision_random] (double) precision used for the approximation of
the square root of the mobility. Sometimes higher accuracy can speedup the
simulation.
\end{globvar}


Expand Down Expand Up @@ -602,21 +591,6 @@ \subsection{CPU thermostat}
Be aware that this thermostat requires \var{temperature} to be given
in Kelvin.

\subsection{Stokesian Dynamics thermostat}
\label{ssec:SDthermostat}
\begin{essyntax}
thermostat sd \var{temperature}
\begin{features}
\required{CUDA} and \required{SD}
\end{features}
\end{essyntax}

This thermostat should be used together with the Stokesian Dynamics
implementation.
No other thermostat is able to thermalize SD correctly.
The precision of the farfield contribution of the thermostat can be tuned
with

\section{\texttt{nemd}: Setting up non-equilibrium MD}
\newescommand{nemd}
\label{sec:NEMD}
Expand Down
18 changes: 6 additions & 12 deletions src/core/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "imd.hpp"
#include "ghmc.hpp"
#include "lb.hpp"
#include "integrate_sd.hpp"

/** This array contains the description of all global variables.

Expand Down Expand Up @@ -99,19 +98,14 @@ const Datafield fields[] = {
{&lb_components, TYPE_INT, 1, "lb_components", 2, false }, /* 51 from ghmc.cpp */
{&warnings, TYPE_INT, 1, "warnings", 1, false }, /* 52 from global.cpp */
{&dpd_ignore_fixed_particles, TYPE_INT, 1, "dpd_ignore_fixed_particles", 1, false }, /* 53 from global.cpp */
{&sd_viscosity, TYPE_DOUBLE, 1, "sd_viscosoity", 4, false }, /* 54 from integrate_sd.cpp */
{&sd_radius, TYPE_DOUBLE, 1, "sd_radius", 4, false }, /* 55 from integrate_sd.cpp */
{&sd_seed, TYPE_INT, 2, "sd_seed", 4, false }, /* 56 from integrate_sd.cpp */
{&sd_random_state, TYPE_INT, 2, "sd_random_state", 4, false }, /* 57 from integrate_sd.cpp */
{&sd_random_precision, TYPE_DOUBLE, 1, "sd_precision_random", 4, false }, /* 58 from integrate_sd.cpp */
{&smaller_time_step,TYPE_DOUBLE,1, "smaller_time_step", 5, false }, /* 59 from integrate.cpp */
{configtemp, TYPE_DOUBLE, 2, "configtemp", 1, false }, /* 60 from integrate.cpp */
{&langevin_trans, TYPE_BOOL, 1, "langevin_trans_switch", 1, false }, /* 61 from thermostat.cpp */
{&langevin_rotate, TYPE_BOOL, 1, "langevin_rotate_switch", 1, false }, /* 62 from thermostat.cpp */
{&smaller_time_step,TYPE_DOUBLE,1, "smaller_time_step", 5, false }, /* 54 from integrate.cpp */
{configtemp, TYPE_DOUBLE, 2, "configtemp", 1, false }, /* 55 from integrate.cpp */
{&langevin_trans, TYPE_BOOL, 1, "langevin_trans_switch", 1, false }, /* 56 from thermostat.cpp */
{&langevin_rotate, TYPE_BOOL, 1, "langevin_rotate_switch", 1, false }, /* 57 from thermostat.cpp */
#ifndef ROTATIONAL_INERTIA
{&langevin_gamma_rotation, TYPE_DOUBLE, 1, "gamma_rot",1, false }, /* 63 from thermostat.cpp */
{&langevin_gamma_rotation, TYPE_DOUBLE, 1, "gamma_rot",1, false }, /* 58 from thermostat.cpp */
#else
{langevin_gamma_rotation, TYPE_DOUBLE, 3, "gamma_rot",1, false }, /* 63 from thermostat.cpp */
{langevin_gamma_rotation, TYPE_DOUBLE, 3, "gamma_rot",1, false }, /* 58 from thermostat.cpp */
#endif
{ NULL, 0, 0, NULL, 0, false }
};
Expand Down
20 changes: 5 additions & 15 deletions src/core/global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,16 @@ extern const Datafield fields[];
#define FIELD_WARNINGS 52
/** DPD_IGNORE_FIXED_PARTICLES */
#define FIELD_DPD_IGNORE_FIXED_PARTICLES 53
/** index of \ref sd_viscosity in \ref #fields */
#define FIELD_SD_VISCOSITY 54
/** index of \ref sd_radius in \ref_#fields */
#define FIELD_SD_RADIUS 55
/** index of \ref sd_seed in \ref #fields */
#define FIELD_SD_SEED 56
/** index of \ref sd_random_state i_ \ref #fields */
#define FIELD_SD_RANDOM_STATE 57
/** index of \ref sd_precision_random in \ref #fields */
#define FIELD_SD_RANDOM_PRECISION 58
/** index of \ref smaller_timestep in \ref #fields */
#define FIELD_SMALLERTIMESTEP 59
#define FIELD_SMALLERTIMESTEP 54
/** index of \ref configtemp in \ref #fields */
#define FIELD_CONFIGTEMP 60
#define FIELD_CONFIGTEMP 55
/** index of \ref langevin_trans in \ref #fields */
#define FIELD_LANGEVIN_TRANS_SWITCH 61
#define FIELD_LANGEVIN_TRANS_SWITCH 56
/** index of \ref langevin_rotate in \ref #fields */
#define FIELD_LANGEVIN_ROT_SWITCH 62
#define FIELD_LANGEVIN_ROT_SWITCH 57
/** index of \ref langevin_gamma_rotation in \ref #fields */
#define FIELD_LANGEVIN_GAMMA_ROTATION 63
#define FIELD_LANGEVIN_GAMMA_ROTATION 58

/*@}*/

Expand Down
9 changes: 0 additions & 9 deletions src/core/integrate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,6 @@ void integrate_vv(int n_steps, int reuse_forces) {
}
#endif

#ifdef SD
if (thermo_switch & THERMO_SD) {
runtimeWarning("Use integrate_sd to use Stokesian Dynamics Thermalizer.");
}
if (thermo_switch & THERMO_BD) {
runtimeWarning("Use integrate_sd to use Brownian Dynamics Thermalizer.");
}
#endif

/* Integration Steps: Step 1 and 2 of Velocity Verlet scheme:
v(t+0.5*dt) = v(t) + 0.5*dt * f(t)
p(t + dt) = p(t) + dt * v(t+0.5*dt)
Expand Down
Loading