# espressopp.bc.BC¶

Overview

Details

This is the abstract base class for all boundary condition objects. It cannot be used directly. All derived classes implement at least the following methods:

class espressopp.bc.BC
getFoldedPosition(pos, imageBox)
Parameters: pos – imageBox – (default: None)
getMinimumImageVector(pos1, pos2)
Parameters: pos1 – pos2 –
getRandomPos()
getUnfoldedPosition(pos, imageBox)
Parameters: pos – imageBox –

pos, pos1 and pos2 are particle coordinates ( type: (float, float, float) ). imageBox ( type: (int, int, int) ) specifies the

## espressopp.bc.OrthorombicBC¶

Like all boundary condition objects, this class implements all the methods of the base class BC , which are described in detail in the documentation of the abstract class BC.

The OrthorhombicBC class is responsible for the orthorhombic boundary condition. Currently only periodic boundary conditions are supported.

Example:

>>> boxsize = (Lx, Ly, Lz)
>>> bc = espressopp.bc.OrthorhombicBC(rng, boxsize)

espressopp.bc.OrthorhombicBC(rng, boxL)
Parameters: rng – boxL (real) – (default: 1.0)
espressopp.bc.OrthorhombicBC.setBoxL(boxL)
Parameters: boxL –

## espressopp.bc.SlabBC¶

Like all boundary condition objects, this class implements all the methods of the base class BC , which are described in detail in the documentation of the abstract class BC.

The SlabBC class is responsible for a cuboid boundary condition that is periodic in all but the “dir” dimension. Currently, dir is set arbirtrarily to “0” (the x-direction).

Example:

>>> boxsize = (Lx, Ly, Lz)
>>> bc = espressopp.bc.SlabBC(rng, boxsize)

espressopp.bc.SlabBC(rng, boxL)
Parameters: rng – boxL (real) – (default: 1.0)
espressopp.bc.SlabBC.setBoxL(boxL)
Parameters: boxL –