Loading...
Searching...
No Matches
BALL::PeriodicBoundary Class Reference
Molecular Modeling » Molecular Mechanics » General Force Field Classes.

`#include <BALL/MOLMEC/COMMON/periodicBoundary.h>`

## Classes

struct | Option
struct | Default
| Default values. More...

## Public Types

Type definitions
typedef std::pair< Size, Size > | AtomIndexPair
typedef std::vector< AtomIndexPair > | AtomIndexArray

## Public Member Functions

Constructors and Destructors
| PeriodicBoundary ()
| PeriodicBoundary (const ForceField &force_field)
| PeriodicBoundary (const PeriodicBoundary &periodic_boundary)
virtual | ~PeriodicBoundary ()
Assignment
PeriodicBoundary & | operator= (const PeriodicBoundary &periodic_boundary)
virtual void | clear ()
Setup Methods
bool | setup ()
Size | generateMoleculesVector ()
Accessors
void | enable ()
| Enable periodic boundary conditions.
void | disable ()
| Disable periodic boundary conditions.
SimpleBox3 | getBox () const
void | setBox (const SimpleBox3 &box)
Size | addSolvent (const String &filename)
Size | removeSolvent ()
Predicates
bool | isEnabled () const
Periodic boundary methods
void | updateMolecules ()

## Variables

Options * | options

## Detailed Description

Periodic boundary class for force field simulations. Molecular Mechanics: class representing periodic boundary conditions.

Definition at line 34 of file periodicBoundary.h.

## Member Typedef Documentation

## AtomIndexArray

typedef std::vector<AtomIndexPair> BALL::PeriodicBoundary::AtomIndexArray

Definition at line 48 of file periodicBoundary.h.

## AtomIndexPair

typedef std::pair<Size, Size> BALL::PeriodicBoundary::AtomIndexPair

Definition at line 45 of file periodicBoundary.h.

## Constructor & Destructor Documentation

## PeriodicBoundary() [1/3]

BALL::PeriodicBoundary::PeriodicBoundary | ( |  | ) |

Default constructor.

## PeriodicBoundary() [2/3]

BALL::PeriodicBoundary::PeriodicBoundary | ( | const ForceField & | force_field | ) |

Constructor.

## PeriodicBoundary() [3/3]

BALL::PeriodicBoundary::PeriodicBoundary | ( | const PeriodicBoundary & | periodic_boundary | ) |

Copy constructor

## ~PeriodicBoundary()

virtual BALL::PeriodicBoundary::~PeriodicBoundary | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## addSolvent()

Size BALL::PeriodicBoundary::addSolvent | ( | const String & | filename | ) |

Fill the defined box with a solvent. This method fills the defined box with solvent molecules. If no box is defined, no solvent is added. The neccessary solvent box template is either taken from the options (solvent_file) or a default is assumed.

  This method replicates the solvent box starting at the box origin in all three dimensions and removes all solvent molecules that are within solvent_distance of a solute molecule or outside the periodic box.

  To ensure periodicity, our SimpleBox instance might be resized to an integral multiple of the spacing of the periodic solvent box. The method returns the number of inserted solvent molecules. All solvent molecules are marked as such by setting their property
  Molecule::PROPERTY__PERIODIC_BOX_SOLVENT .

See also
  removeSolvent

## clear()

virtual void BALL::PeriodicBoundary::clear | ( |  | ) |

virtual

Clear method

## disable()

void BALL::PeriodicBoundary::disable | ( |  | ) |

Disable periodic boundary conditions.

## enable()

void BALL::PeriodicBoundary::enable | ( |  | ) |

Enable periodic boundary conditions.

## generateMoleculesVector()

Size BALL::PeriodicBoundary::generateMoleculesVector | ( |  | ) |

Generate the vector of molecules of the system

## getBox()

SimpleBox3 BALL::PeriodicBoundary::getBox | ( |  | ) | const

Retrieve the box dimensions.

## isEnabled()

bool BALL::PeriodicBoundary::isEnabled | ( |  | ) | const

Returns true if the periodic boundary is enabled

See also
  enable
  disable

## operator=()

PeriodicBoundary & BALL::PeriodicBoundary::operator= | ( | const PeriodicBoundary & | periodic_boundary | ) |

Assignment operator.

## removeSolvent()

Size BALL::PeriodicBoundary::removeSolvent | ( |  | ) |

Removes all solvent molecules This method removes all molecules that have the property Molecule::PROPERTY__PERIODIC_BOX_SOLVENT set from the force field's system. The number of removed solvent molecules is returned.

See also
  addSolvent

## setBox()

void BALL::PeriodicBoundary::setBox | ( | const SimpleBox3 & | box | ) |

Set the box dimensions. The box dimensions are additionally stored in options using keys lower and upper .

## setup()

bool BALL::PeriodicBoundary::setup | ( |  | ) |

Sets up the periodic box

## updateMolecules()

void BALL::PeriodicBoundary::updateMolecules | ( |  | ) |

Checks which molecules are inside the box. If the center of mass of a molecule leaves the box, it is inserted on the other side.

## Member Data Documentation

## options

Options* BALL::PeriodicBoundary::options

Periodic Boundary options. This is usually a pointer to the options of the force field the PeriodicBoundary object is contained in.

Definition at line 245 of file periodicBoundary.h.