27 namespace Victor {
namespace Biopool {
39 Group(
unsigned int mI = 1,
unsigned int mO = 4);
43 virtual string getClassName()
const {
48 virtual unsigned int getCode()
const;
49 virtual unsigned int size()
const;
51 Atom& getAtom(
unsigned int n);
52 const Atom& getAtom(
unsigned int n)
const;
54 virtual void save(
Saver& s);
55 vector<Atom>& giveAtoms();
57 vgVector3<double> getTrans()
const;
58 vgMatrix3<double> getRot()
const;
60 virtual bool isMember(
const AtomCode& ac)
const;
64 void setAtom(
unsigned int n,
Atom& at);
68 virtual void load(
Loader& l);
70 void setTrans(vgVector3<double> t);
71 void addTrans(vgVector3<double> t);
72 void setRot(vgMatrix3<double> r);
73 void addRot(vgMatrix3<double> r);
75 virtual void setModified();
88 virtual Atom& operator[](
unsigned int n);
89 virtual const Atom& operator[](
unsigned int n)
const;
90 virtual Atom& operator[](
const AtomCode& ac);
91 virtual const Atom& operator[](
const AtomCode& ac)
const;
102 unsigned int pGetIndex(
const unsigned long cmp)
const;
106 vgVector3<double> trans;
107 vgMatrix3<double> rot;
118 Group::getCode()
const {
119 ERROR(
"Group::getCode() undefined.", exception);
124 Group::size()
const {
129 Group::save(Saver& s) {
139 Group::getAtom(
unsigned int n) {
140 PRECOND(n < atoms.size(), exception);
145 Group::getAtom(
unsigned int n)
const {
146 PRECOND(n < atoms.size(), exception);
150 inline vgVector3<double>
151 Group::getTrans()
const {
155 inline vgMatrix3<double>
156 Group::getRot()
const {
161 Group::isMember(
const AtomCode& ac)
const {
168 Group::setAtom(
unsigned int n, Atom& at) {
169 PRECOND(n < atoms.size(), exception);
171 atoms[n].setSuperior(
this);
172 Group::setModified();
176 Group::load(Loader& l) {
182 Group::setTrans(vgVector3<double> t) {
184 Group::setModified();
188 Group::addTrans(vgVector3<double> t) {
190 Group::setModified();
194 Group::setRot(vgMatrix3<double> r) {
198 Group::setModified();
202 Group::addRot(vgMatrix3<double> r) {
206 Group::setModified();
231 v->PrepareGroup(*
this);
235 Group::acceptOptimizer(OptimizationVisitor* v) {
236 v->PrepareGroup(*
this);
243 Group::operator[](
unsigned int n) {
244 PRECOND(n < atoms.size(), exception);
249 Group::operator[](
unsigned int n)
const {
250 PRECOND(n < atoms.size(), exception);
255 Group::operator[](
const AtomCode& ac) {
257 INVARIANT(a != NULL, exception);
259 ERROR(
"Inexistent atom requested.", exception);
264 Group::operator[](
const AtomCode& ac)
const {
266 INVARIANT(a != NULL, exception);
268 ERROR(
"Inexistent atom requested.", exception);
virtual void sync()
Definition: Group.cc:150
Base class for saving components (Atoms, Groups, etc.).
Definition: Saver.h:39
void removeAtom(Atom &a)
Definition: Group.cc:85
virtual const SimpleBond & getInBond(unsigned int n) const
Definition: SimpleBond.h:176
virtual const SimpleBond & getOutBond(unsigned int n) const
Definition: SimpleBond.h:184
void copy(const Group &orig)
Definition: Group.cc:110
This class implements a simple chemical group.
Definition: Group.h:35
void resetBoundaries()
Definition: Group.cc:50
virtual const Group & getInBond(unsigned int n) const
Definition: Group.h:210
Base class for loading components (Atoms, Groups, etc.).
Definition: Loader.h:39
Base class implementing the visitor pattern.
Definition: Visitor.h:38
Atom * pGetAtom(const AtomCode &ac) const
Definition: Group.cc:200
Base class for components without elements.
Definition: Monomer.h:32
Base class Optimizacion Patter.
Definition: Visitor.h:66
virtual const Group & getOutBond(unsigned int n) const
Definition: Group.h:220
Implements a simple atom type.
Definition: Atom.h:39
void addAtom(Atom &a)
Definition: Group.cc:169