File atomselection.hpp

This file contains a class which defines different types of atomselections.

Author

Benjamin Lindner ben@benlabs.net

Version

See VERSION in CMakeLists.txt

Copyright

GNU General Public License

class IAtomselection
#include <atomselection.hpp>

Interface for atom selections.

Subclassed by IndexAtomselection, RangeAtomselection

Public Functions

virtual size_t operator[](size_t index) = 0
virtual size_t size() = 0
inline virtual ~IAtomselection()

Protected Functions

template<class Archive>
inline void serialize(Archive &ar, const unsigned int version)

Friends

friend class boost::serialization::access
class IndexAtomselection : public IAtomselection
#include <atomselection.hpp>

An atom selection which is implemented as an array of atom indexes. May use up significant amount of memory.

Public Functions

inline IndexAtomselection()
IndexAtomselection(std::vector<size_t> ids)
virtual size_t operator[](size_t index)
virtual size_t size()

Private Functions

template<class Archive>
inline void serialize(Archive &ar, const unsigned int version)

Private Members

std::vector<size_t> ids_

Friends

friend class boost::serialization::access
class RangeAtomselection : public IAtomselection
#include <atomselection.hpp>

Selects atoms within the given range. No memory requirements and is used e.g. for the system selection.

Public Functions

inline RangeAtomselection()
RangeAtomselection(size_t from, size_t to)
virtual size_t operator[](size_t index)
virtual size_t size()

Private Functions

template<class Archive>
inline void serialize(Archive &ar, const unsigned int version)

Private Members

size_t from_
size_t to_

Friends

friend class boost::serialization::access