ParM  parm
A molecular dynamics library
Public Member Functions | Protected Attributes | List of all members
OriginBox Class Reference

A rectilinear Box, with periodic boundary conditions. More...

#include <box.hpp>

Inheritance diagram for OriginBox:
Box LeesEdwardsBox WalledBox2D

Public Member Functions

 OriginBox (Vec size)
 
Vec diff (Vec r1, Vec r2)
 Distance between two points, given boundary conditions. More...
 
virtual Vec diff (Vec r1, Vec r2, boost::array< int, NDIM > boxes)
 
virtual boost::array< int, NDIMbox_round (Vec r1, Vec r2)
 The div function to go with diff. More...
 
 OriginBox (flt L)
 
flt V ()
 Volume. Can return NaN. More...
 
flt L ()
 
 OriginBox (flt L)
 
flt V ()
 Volume. Can return NaN. More...
 
flt L ()
 
flt resize (flt factor)
 Resize by a factor. Does not move atoms. More...
 
flt resize (flt factor, AtomGroup &atoms)
 Resize by a factor, and move atoms in the affine direction. More...
 
flt resize_to (Vec newsize)
 Resize to a specific shape. Does not move atoms. More...
 
flt resize_to (Vec newsize, AtomGroup &atoms)
 Resize to a specific shape, and move atoms in the affine direction. More...
 
flt resize_to_V (flt newV)
 Resize to a specific volume. Does not move atoms. More...
 
flt resize_to_V (flt newV, AtomGroup &atoms)
 Resize to a specific volume, and move atoms in the affine direction. More...
 
flt resize_to_L (flt newL)
 Resize to a specific length. Does not move atoms. More...
 
flt resize_to_L (flt newL, AtomGroup &atoms)
 Resize to a specific length, and move atoms in the affine direction. More...
 
Vec rand_loc ()
 Get a random point in the box. More...
 
Vec box_shape ()
 
void pure_shear_to (flt epsilon)
 Apply a pure shear of epsilon to reshape box. More...
 
void pure_shear_to (flt epsilon, AtomGroup &atoms)
 Apply a pure shear of epsilon, moving atoms. More...
 
- Public Member Functions inherited from Box
virtual ~Box ()
 

Protected Attributes

Vec boxsize
 

Detailed Description

A rectilinear Box, with periodic boundary conditions.

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

Constructor & Destructor Documentation

OriginBox::OriginBox ( Vec  size)
inline
OriginBox::OriginBox ( flt  L)
inline
OriginBox::OriginBox ( flt  L)
inline

Member Function Documentation

virtual boost::array<int,NDIM> OriginBox::box_round ( Vec  r1,
Vec  r2 
)
inlinevirtual

The div function to go with diff.

Reimplemented in LeesEdwardsBox.

Vec OriginBox::box_shape ( )
inline
Examples:
packer.cpp.
Vec OriginBox::diff ( Vec  r1,
Vec  r2 
)
inlinevirtual

Distance between two points, given boundary conditions.

This is the main function that Box exists for.

Implements Box.

Reimplemented in WalledBox2D, and LeesEdwardsBox.

Examples:
packer.cpp.
virtual Vec OriginBox::diff ( Vec  r1,
Vec  r2,
boost::array< int, NDIM boxes 
)
inlinevirtual

Reimplemented in LeesEdwardsBox.

flt OriginBox::L ( )
inline
Examples:
packer.cpp.
flt OriginBox::L ( )
inline
void OriginBox::pure_shear_to ( flt  epsilon)

Apply a pure shear of epsilon to reshape box.

void OriginBox::pure_shear_to ( flt  epsilon,
AtomGroup atoms 
)

Apply a pure shear of epsilon, moving atoms.

Vec OriginBox::rand_loc ( )
inline

Get a random point in the box.

flt OriginBox::resize ( flt  factor)

Resize by a factor. Does not move atoms.

flt OriginBox::resize ( flt  factor,
AtomGroup atoms 
)

Resize by a factor, and move atoms in the affine direction.

flt OriginBox::resize_to ( Vec  newsize)

Resize to a specific shape. Does not move atoms.

flt OriginBox::resize_to ( Vec  newsize,
AtomGroup atoms 
)

Resize to a specific shape, and move atoms in the affine direction.

flt OriginBox::resize_to_L ( flt  newL)

Resize to a specific length. Does not move atoms.

flt OriginBox::resize_to_L ( flt  newL,
AtomGroup atoms 
)

Resize to a specific length, and move atoms in the affine direction.

flt OriginBox::resize_to_V ( flt  newV)

Resize to a specific volume. Does not move atoms.

flt OriginBox::resize_to_V ( flt  newV,
AtomGroup atoms 
)

Resize to a specific volume, and move atoms in the affine direction.

flt OriginBox::V ( )
inlinevirtual

Volume. Can return NaN.

Implements Box.

Reimplemented in WalledBox2D.

flt OriginBox::V ( )
inlinevirtual

Volume. Can return NaN.

Implements Box.

Reimplemented in WalledBox2D.

Member Data Documentation

Vec OriginBox::boxsize
protected

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