Loading...
Searching...
No Matches
atomVector.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: atomVector.h,v 1.24.20.1 2007/05/18 12:02:43 oliver Exp $
//
#ifndef BALL_MOLMEC_COMMON_ATOMVECTOR_H
#define BALL_MOLMEC_COMMON_ATOMVECTOR_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
namespace BALL
{
class Gradient;
class Atom;
class Composite;
class BALL_EXPORT AtomVector
: private std::vector<Atom*>
{
public:
BALL_CREATE_DEEP(AtomVector)
typedef std::vector<Atom*>::iterator Iterator;
typedef std::vector<Atom*>::const_iterator ConstIterator;
AtomVector();
AtomVector(const Composite& composite, bool selected_only = false);
AtomVector(const AtomVector& atoms, bool deep = true);
virtual ~AtomVector();
using std::vector<Atom*>::clear;
const AtomVector& operator = (const AtomVector& rhs);
void set(const AtomVector& atoms);
const AtomVector& operator = (const Composite& rhs);
void set(const Composite& composite, bool selected_only = false);
using std::vector<Atom*>::size;
Atom* & operator [] (int i) { return std::vector<Atom*>::operator [] (i); }
Atom* const & operator [] (int i) const { return std::vector<Atom*>::operator [] (i); }
void savePositions();
void resetPositions();
void moveTo(const Gradient& direction, double step = 1.0);
void moveTo(const Gradient& direction, double step, Size k);
using std::vector<Atom*>::push_back;
void resize(Size new_size);
//?????: GCC3 using std::vector<Atom*>::begin;
iterator begin() { return std::vector<Atom*>::begin(); }
const_iterator begin() const { return std::vector<Atom*>::begin(); }
//?????: GCC3 using std::vector<Atom*>::end;
iterator end() { return std::vector<Atom*>::end(); }
const_iterator end() const { return std::vector<Atom*>::end(); }
protected:
/*_ The saved positions.
*/
std::vector<Vector3> saved_position_;
};
} // end of namespace BALL
#endif // BALL_MOLMEC_MINIMIZATION_GRADIENT_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::AtomVector::resetPositions
void resetPositions()
BALL::AtomVector::set
void set(const AtomVector &atoms)
BALL::AtomVector::begin
const_iterator begin() const
Definition atomVector.h:170
BALL::AtomVector::savePositions
void savePositions()
BALL::AtomVector::end
const_iterator end() const
Definition atomVector.h:176
BALL::AtomVector::begin
iterator begin()
Definition atomVector.h:169
BALL::AtomVector::ConstIterator
std::vector< Atom * >::const_iterator ConstIterator
Definition atomVector.h:46
BALL::AtomVector::saved_position_
std::vector< Vector3 > saved_position_
Definition atomVector.h:184
BALL::AtomVector::resize
void resize(Size new_size)
BALL::AtomVector::Iterator
std::vector< Atom * >::iterator Iterator
Definition atomVector.h:42
BALL::AtomVector::moveTo
void moveTo(const Gradient &direction, double step=1.0)
BALL::AtomVector::end
iterator end()
Definition atomVector.h:175
BALL::AtomVector::moveTo
void moveTo(const Gradient &direction, double step, Size k)
BALL::AtomVector::AtomVector
AtomVector()
BALL::Atom
Definition atom.h:90
BALL::Composite
Definition composite.h:74
BALL::Gradient
Definition gradient.h:45
common.h
BALL_CREATE_DEEP
#define BALL_CREATE_DEEP(name)
Definition create.h:26
BALL::atoms
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
std
STL namespace.
vector3.h