Welcome to the UAMMD v3 documentation!
Universally Adaptable Multiscale Molecular Dynamics
10 Million LJ particles in a box with a low temperature thermostat. Ran on a GTX 980.
Screenshot made with superpunto!
For information about a particular module, see its page. You will find the most up to date information about a module in its header file.
About
UAMMD is a software infrastructure for complex fluids simulations for the GPU, presented as a CUDA/C++14 header-only library. UAMMD is intended to be hackable and copy-pastable.
Although “Molecular Dynamics” is part of the name,the UAMMD framework allows for much more than that. To this moment multiple integrators are implemented allowing it to perform:
Molecular Dynamics (MD)
Langevin Dynamics (LD)
Brownian Dynamics (BD)
Brownian Hydrodynamics (BDHI)
Metropolis Monte Carlo (MC)
Lattice Boltzmann (LBM)(WIP)
Fluctuating Hydrodynamics (coupled with particles with Immersed Boundary Method (IBM))
Building blocks are provided for the user to construct a certain simulation. Most are highly templated to ease adaptability.
For example, there is no harmonic trap module, but you can write a simple functor (directly in device code!) stating that each particle should experiment a force when it is trying to leave the box. Then you can pass this functor to the External Forces module. Similar things can be achieved with a bonded force, an interaction that needs to trasverse a neighbour list, an nbody interaction…
Hop on to the examples folder for an introduction or check the docs for more information.
Important
Compiling and running any code containing UAMMD requires a GPU and a system with a working CUDA environment. CUDA is free and you can download it here: https://developer.nvidia.com/cuda-toolkit
On the other hand understanding and modifying UAMMD code will require at least basic knowledge of GPU programming with CUDA. There are a lot of resources online to learn CUDA, but you can start here: https://developer.nvidia.com/blog/even-easier-introduction-cuda/
If this is the first time you encounter UAMMD and want a quick start guide check the Quick Start. The Frequently Asked Questions is also a good source of knowledge.
Look in Compiling UAMMD if some Makefile gives you troubles. UAMMD is a header only framework and it is mostly self contained in terms of dependencies so compilation should not be too troubling.
The four basic assumptions
The basic conceptual hierarchy in UAMMD.
The foundational concepts of UAMMD are supported on a handful of (deliberately) vague assumptions which can be summarized in four:
A quick example:
A brief example of how a code using UAMMD typically looks like. In this example we have a simulation of non-interacting Brownian particles.
UAMMD does not need to be compiled separatedly (it is header only).
Some special flags might be needed to compile codes including with certain UAMMD headers, see Compiling UAMMD. Here you have a short example of how a typical UAMMD code looks like:
//Ideal Brownian particles
#include"uammd.cuh"
#include"Integrator/BrownianDynamics.cuh"
using namespace uammd;
int main(){
int numberParticles = 1e5;
auto pd = make_shared<ParticleData>(numberParticles);
{
auto pos = pd->getPos(access::cpu, access::write);
std::generate(pos.begin(), pos.end(),
[&](){ return make_real4(sys->rng.uniform3(-0.5, 0.5), 0);});
}
BD::EulerMaruyama::Parameters par;
par.temperature = 1.0;
par.viscosity = 1.0;
par.hydrodynamicRadius = 1.0;
par.dt = 0.1;
auto bd = make_shared<BD::EulerMaruyama>(pd, par);
int numberSteps=100;
for(int i = 0; i<numberSteps; i++){
bd->forwardTime();
}
return 0;
}
A plethora of guided examples are available in the repository.
About this documentation
An in depth theoretical description of most of the algorithms and physics behind UAMMD can be found in Raul’s PhD manuscript, available here: https://github.com/RaulPPelaez/tesis/raw/main/manuscript.pdf
Although this documentation should be your primary source of knowledge for UAMMD, you should also consider the old wiki. Although the wiki was written for older versions of UAMMD, it might shed some light if what you are trying to find is not here.