25 #include <SimpleBond.h>
27 namespace Victor {
namespace Biopool {
43 Atom(
unsigned int mI = 1,
unsigned int mO = 4);
48 AtomCode getCode()
const;
49 unsigned long getNumber()
const;
51 vgVector3<double> getCoords();
61 const Group& getSuperior()
const;
63 vgVector3<double> getTrans()
const;
64 vgMatrix3<double> getRot()
const;
65 virtual bool inSync();
70 void bindStructure(
Atom& before,
bool connect);
77 void setCode(AtomCode ac);
78 void setNumber(
unsigned long _number);
80 void setCoords(
double _x,
double _y,
double _z);
83 void setBFac(
double _b) {
87 void setTrans(vgVector3<double> t);
88 void addTrans(vgVector3<double> t);
89 void setRot(vgMatrix3<double> r);
90 void addRot(vgMatrix3<double> r);
93 virtual const Atom& getInBond(
unsigned n)
const;
94 virtual Atom& getInBond(
unsigned n);
95 virtual const Atom& getOutBond(
unsigned n)
const;
96 virtual Atom& getOutBond(
unsigned n);
98 void setSuperior(
Group* gr);
110 bool isNotFirstAtomInStructure();
111 void propagateRotation();
117 vgVector3<double> coords;
121 vgVector3<double> trans;
122 vgMatrix3<double> rot;
135 Atom::getCode()
const {
140 Atom::getNumber()
const {
144 inline vgVector3<double>
152 Atom::getSuperior() {
153 PRECOND(superior != NULL, exception);
158 Atom::getSuperior()
const {
159 PRECOND(superior != NULL, exception);
164 Atom::hasSuperior() {
165 return (superior != NULL);
168 inline vgVector3<double>
169 Atom::getTrans()
const {
173 inline vgMatrix3<double>
174 Atom::getRot()
const {
186 Atom::bindStructure(Atom& before,
bool connect) {
188 this->setTrans(this->getCoords() - before.getCoords());
219 type = AtomTranslator(_name);
223 Atom::setCode(AtomCode ac) {
225 id.setName(AtomTranslator(ac));
229 Atom::setNumber(
unsigned long _number) {
230 id.setNumber(_number);
234 Atom::setTrans(vgVector3<double> t) {
240 Atom::addTrans(vgVector3<double> t) {
246 Atom::setRot(vgMatrix3<double> r) {
252 Atom::addRot(vgMatrix3<double> r) {
258 Atom::getInBond(
unsigned n)
const {
263 Atom::getInBond(
unsigned n) {
268 Atom::getOutBond(
unsigned n)
const {
273 Atom::getOutBond(
unsigned n) {
278 Atom::setSuperior(Group* gr) {
virtual void bindIn(SimpleBond &c)
Definition: SimpleBond.cc:115
virtual ~Atom()
Definition: Atom.cc:54
virtual void unbindIn(SimpleBond &c)
Definition: SimpleBond.cc:141
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 setType(string _name)
Definition: Atom.h:217
This class implements a simple chemical group.
Definition: Group.h:35
void setCoords(double _x, double _y, double _z)
Definition: Atom.cc:88
double distance(Atom &other)
Definition: Atom.cc:66
void setModified()
Definition: Atom.cc:181
virtual void bindOut(SimpleBond &c)
Definition: Atom.h:199
virtual void unbindOut(SimpleBond &c)
Definition: Atom.h:211
Defines chemical and abstract bonds between objects. eg.: covalent bonds. Attention: copy() strips or...
Definition: SimpleBond.h:39
void copy(const Atom &orig)
Definition: Atom.cc:126
Atom(unsigned int mI=1, unsigned int mO=4)
Definition: Atom.cc:35
void setUnModified()
Definition: Atom.cc:196
virtual void bindOut(SimpleBond &c)
Definition: SimpleBond.cc:128
virtual void unbindIn(SimpleBond &c)
Definition: Atom.h:205
virtual void unbindOut(SimpleBond &c)
Definition: SimpleBond.cc:150
Implements a simple atom type.
Definition: Atom.h:39
virtual void sync()
Definition: Atom.cc:148
virtual void bindIn(SimpleBond &c)
Definition: Atom.h:193