Initialize the atom configuration. More...
#include "initAtoms.h"#include <math.h>#include <assert.h>#include "constants.h"#include "decomposition.h"#include "parallel.h"#include "random.h"#include "linkCells.h"#include "timestep.h"#include "memUtils.h"#include "performanceTimers.h"
Go to the source code of this file.
Functions | |
| static void | computeVcm (SimFlat *s, real_t vcm[3]) |
| Computes the center of mass velocity of the system. More... | |
| Atoms * | initAtoms (LinkCell *boxes) |
| Allocates memory to store atom data. More... | |
| void | destroyAtoms (Atoms *atoms) |
| void | createFccLattice (int nx, int ny, int nz, real_t lat, SimFlat *s) |
| Creates atom positions on a face centered cubic (FCC) lattice with nx * ny * nz unit cells and lattice constant lat. More... | |
| void | setVcm (SimFlat *s, real_t newVcm[3]) |
| Sets the center of mass velocity of the system. More... | |
| void | setTemperature (SimFlat *s, real_t temperature) |
| Sets the temperature of system. More... | |
| void | randomDisplacements (SimFlat *s, real_t delta) |
| Add a random displacement to the atom positions. More... | |
Initialize the atom configuration.
Definition in file initAtoms.c.
Computes the center of mass velocity of the system.
Definition at line 202 of file initAtoms.c.


Creates atom positions on a face centered cubic (FCC) lattice with nx * ny * nz unit cells and lattice constant lat.
Set momenta to zero.
Definition at line 64 of file initAtoms.c.


| void destroyAtoms | ( | Atoms * | atoms | ) |
Allocates memory to store atom data.
Call functions such as createFccLattice and setTemperature to set up initial atom positions and momenta.
Definition at line 23 of file initAtoms.c.


Add a random displacement to the atom positions.
Atoms are displaced by a random distance in the range [-delta, +delta] along each axis.
| [in] | delta | The maximum displacement (along each axis). |
Definition at line 187 of file initAtoms.c.


Sets the temperature of system.
Selects atom velocities randomly from a boltzmann (equilibrium) distribution that corresponds to the specified temperature. This random process will typically result in a small, but non zero center of mass velocity and a small difference from the specified temperature. For typical MD runs these small differences are unimportant, However, to avoid possible confusion, we set the center of mass velocity to zero and scale the velocities to exactly match the input temperature.
Definition at line 145 of file initAtoms.c.


Sets the center of mass velocity of the system.
| [in] | newVcm | The desired center of mass velocity. |
Definition at line 111 of file initAtoms.c.

