ParM  parm
A molecular dynamics library
Public Member Functions | Protected Attributes | List of all members
NListed< A, P > Class Template Reference

#include <interaction.hpp>

Inheritance diagram for NListed< A, P >:
Interaction

Public Member Functions

 NListed (sptr< AtomVec > vec, sptr< NeighborList > neighbors)
 
void add (A atm)
 
 NListed (sptr< Box > box, sptr< AtomVec > atomv, const flt skin)
 
void update_pairs ()
 
get_pair (IDPair &pair)
 
A & getatom (uint n)
 
flt energy (Box &box, IDPair &pair)
 
flt energy (Box &box)
 Potential energy due to this Interaction. More...
 
unsigned long long contacts (Box &box)
 number of Atom pairs with E != 0 More...
 
unsigned long long overlaps (Box &box)
 number of Atom pairs with E > 0 More...
 
flt pressure (Box &box)
 Partial pressure due to this Interaction. More...
 
vector< P > & pair_iter ()
 
uint size ()
 
flt energy_pair (P pair, Box &box)
 
void set_forces (Box &box)
 
flt set_forces_get_pressure (Box &box)
 Set forces (Atom.f) and return \(P = \sum_{\left<i,j \right>} \vec r_{ij} \cdot \vec F_{ij}\) at the same time (see pressure()). More...
 
Matrix stress (Box &box)
 The force-moment tensor for the current simulation: More...
 
Matrix set_forces_get_stress (Box &box)
 
Vec forces_pair (P pair, Box &box)
 
vector< A > & atom_list ()
 
sptr< NeighborListneighbor_list ()
 
 ~NListed ()
 
- Public Member Functions inherited from Interaction
virtual ~Interaction ()
 

Protected Attributes

vector< A > atoms
 
vector< P > pairs
 
sptr< NeighborListneighbors
 
uint last_update
 

Detailed Description

template<class A, class P>
class NListed< A, P >

Examples:
hardspheres.cpp, LJatoms.cpp, and packer.cpp.

Constructor & Destructor Documentation

template<class A, class P>
NListed< A, P >::NListed ( sptr< AtomVec vec,
sptr< NeighborList neighbors 
)
inline
template<class A, class P>
NListed< A, P >::NListed ( sptr< Box box,
sptr< AtomVec atomv,
const flt  skin 
)
inline
template<class A, class P>
NListed< A, P >::~NListed ( )
inline

Member Function Documentation

template<class A, class P>
void NListed< A, P >::add ( atm)
inline
template<class A, class P>
vector<A>& NListed< A, P >::atom_list ( )
inline
template<class A , class P >
unsigned long long NListed< A, P >::contacts ( Box box)

number of Atom pairs with E != 0

template<class A , class P >
flt NListed< A, P >::energy ( Box box,
IDPair pair 
)
template<class A , class P >
flt NListed< A, P >::energy ( Box box)
virtual

Potential energy due to this Interaction.

Implements Interaction.

template<class A, class P>
flt NListed< A, P >::energy_pair ( pair,
Box box 
)
inline
template<class A, class P>
Vec NListed< A, P >::forces_pair ( pair,
Box box 
)
inline
template<class A, class P>
P NListed< A, P >::get_pair ( IDPair pair)
inline
template<class A, class P>
A& NListed< A, P >::getatom ( uint  n)
inline
template<class A, class P>
sptr<NeighborList> NListed< A, P >::neighbor_list ( )
inline
template<class A , class P >
unsigned long long NListed< A, P >::overlaps ( Box box)

number of Atom pairs with E > 0

template<class A, class P>
vector<P>& NListed< A, P >::pair_iter ( )
inline
template<class A , class P >
flt NListed< A, P >::pressure ( Box box)
virtual

Partial pressure due to this Interaction.

\(P = \sum_{\left<i,j \right>} \vec r_{ij} \cdot \vec F_{ij}\), or equivalently \(P = \sum_i \vec r_i \cdot \vec F_i\)

Note that the full pressure involves all interactions and temperature, and needs to be normalized by \( \frac{1}{dV} \) where \(d\) is the number of dimensions and \(V\) is the volume.

Implements Interaction.

template<class A , class P >
void NListed< A, P >::set_forces ( Box box)
virtual

Implements Interaction.

template<class A , class P >
flt NListed< A, P >::set_forces_get_pressure ( Box box)
virtual

Set forces (Atom.f) and return \(P = \sum_{\left<i,j \right>} \vec r_{ij} \cdot \vec F_{ij}\) at the same time (see pressure()).

Reimplemented from Interaction.

template<class A , class P >
Matrix NListed< A, P >::set_forces_get_stress ( Box box)
template<class A, class P>
uint NListed< A, P >::size ( )
inline
template<class A , class P >
Matrix NListed< A, P >::stress ( Box box)
virtual

The force-moment tensor for the current simulation:

\(\tau^{\alpha \beta} = \sum_{\left<i,j \right>} r_{ij}^\alpha F_{ij}^\beta\).

At \(T=0\), the stress tensor \(\Sigma = \frac{1}{dV} \tau \).

Reimplemented from Interaction.

template<class A , class P >
void NListed< A, P >::update_pairs ( )

Member Data Documentation

template<class A, class P>
vector<A> NListed< A, P >::atoms
protected
template<class A, class P>
uint NListed< A, P >::last_update
protected
template<class A, class P>
sptr<NeighborList> NListed< A, P >::neighbors
protected
template<class A, class P>
vector<P> NListed< A, P >::pairs
protected

The documentation for this class was generated from the following file: