CoMD
A Mini-app for Co-Design of Classical Molecular Dynamics.
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
initAtoms.h
Go to the documentation of this file.
1
/// \file
2
/// Initialize the atom configuration.
3
4
#ifndef __INIT_ATOMS_H
5
#define __INIT_ATOMS_H
6
7
#include "
mytype.h
"
8
9
struct
SimFlatSt
;
10
struct
LinkCellSt
;
11
12
/// Atom data
13
typedef
struct
AtomsSt
14
{
15
// atom-specific data
16
int
nLocal
;
//!< total number of atoms on this processor
17
int
nGlobal
;
//!< total number of atoms in simulation
18
19
int
*
gid
;
//!< A globally unique id for each atom
20
int
*
iSpecies
;
//!< the species index of the atom
21
22
real3
*
r
;
//!< positions
23
real3
*
p
;
//!< momenta of atoms
24
real3
*
f
;
//!< forces
25
real_t
*
U
;
//!< potential energy per atom
26
}
Atoms
;
27
28
29
/// Allocates memory to store atom data.
30
Atoms
*
initAtoms
(
struct
LinkCellSt
* boxes);
31
void
destroyAtoms
(
struct
AtomsSt
* atoms);
32
33
void
createFccLattice
(
int
nx,
int
ny,
int
nz,
real_t
lat,
struct
SimFlatSt
* s);
34
35
void
setVcm
(
struct
SimFlatSt
* s,
real_t
vcm[3]);
36
void
setTemperature
(
struct
SimFlatSt
* s,
real_t
temperature);
37
void
randomDisplacements
(
struct
SimFlatSt
* s,
real_t
delta);
38
#endif
initAtoms.h
Generated on Wed Jun 5 2013 11:08:31 for CoMD by
1.8.3.1