#include <gcu/atom.h>
Public Member Functions | |
Atom () | |
Atom (int Z, double x, double y, double z=0.) | |
Atom (Atom &a) | |
Atom & | operator= (Atom &a) |
virtual | ~Atom () |
double | Distance (Atom *pAtom) |
void | zoom (double ZoomFactor) |
virtual bool | GetCoords (double *x, double *y, double *z=NULL) const |
void | SetCoords (double x, double y, double z=0) |
int | GetZ () const |
virtual void | SetZ (int Z) |
virtual void | SetCharge (char Charge) |
char | GetCharge () |
virtual const gchar * | GetSymbol () const |
virtual void | AddBond (Bond *pBond) |
virtual void | RemoveBond (Bond *pBond) |
double | x () const |
double | y () const |
double | z () const |
Vector | GetVector () const |
Bond * | GetFirstBond (std::map< Atom *, Bond * >::iterator &i) |
Bond * | GetNextBond (std::map< Atom *, Bond * >::iterator &i) |
Bond * | GetBond (Atom *pAtom) const |
int | GetBondsNumber () const |
virtual xmlNodePtr | Save (xmlDocPtr xml) const |
virtual bool | Load (xmlNodePtr node) |
virtual bool | LoadNode (xmlNodePtr node) |
virtual bool | SaveNode (xmlDocPtr xml, xmlNodePtr node) const |
virtual void | Move (double x, double y, double z=0.) |
virtual void | Transform2D (Matrix2D &m, double x, double y) |
bool | SetProperty (unsigned property, char const *value) |
std::string | GetProperty (unsigned property) const |
bool | IsInCycle (Cycle *pCycle) |
virtual bool | Match (Atom *atom, AtomMatchState &state) |
std::string | Name () |
Protected Attributes | |
int | m_Z |
double | m_x |
double | m_y |
double | m_z |
char | m_Charge |
std::map< Atom *, Bond * > | m_Bonds |
Definition at line 46 of file gcu/atom.h.
gcu::Atom::Atom | ( | ) |
The default constructor. Creates an atom with atomic number set to 0.
Reimplemented in gcp::Atom.
gcu::Atom::Atom | ( | int | Z, | |
double | x, | |||
double | y, | |||
double | z = 0. | |||
) |
Z | the atomic number of the new atom. | |
x | the x coordinate of the new atom. | |
y | the y coordinate of the new atom. | |
z | the z coordinate of the new atom. |
Reimplemented in gcp::Atom.
gcu::Atom::Atom | ( | Atom & | a | ) |
a | the Atom to duplicate. |
virtual gcu::Atom::~Atom | ( | ) | [virtual] |
virtual void gcu::Atom::AddBond | ( | Bond * | pBond | ) | [virtual] |
double gcu::Atom::Distance | ( | Atom * | pAtom | ) |
int gcu::Atom::GetBondsNumber | ( | ) | const [inline] |
Definition at line 183 of file gcu/atom.h.
References m_Bonds.
char gcu::Atom::GetCharge | ( | ) | [inline] |
Definition at line 128 of file gcu/atom.h.
References m_Charge.
virtual bool gcu::Atom::GetCoords | ( | double * | x, | |
double * | y, | |||
double * | z = NULL | |||
) | const [virtual] |
x | a pointer to the double value which will receive the x coordinate of the Atom. | |
y | a pointer to the double value which will receive the y coordinate of the Atom. | |
z | a pointer to the double value which will receive the z coordinate of the Atom or NULL for 2D representations. |
i | a C++ std::map iterator initialized by Atom::GetFirstBond. |
std::string gcu::Atom::GetProperty | ( | unsigned | property | ) | const [virtual] |
property | the identity of the property as defined in objprops.h. |
Reimplemented from gcu::Object.
Reimplemented in gcu::CrystalAtom.
virtual const gchar* gcu::Atom::GetSymbol | ( | ) | const [virtual] |
Reimplemented in gcp::FragmentResidue.
int gcu::Atom::GetZ | ( | ) | const [inline] |
bool gcu::Atom::IsInCycle | ( | Cycle * | pCycle | ) |
pCycle | a cycle in which the atom might be. |
virtual bool gcu::Atom::Load | ( | xmlNodePtr | node | ) | [virtual] |
node | a pointer to the xmlNode containing the serialized Atom. |
Reimplemented from gcu::Object.
Reimplemented in gcp::Atom, gcp::FragmentAtom, and gcp::FragmentResidue.
virtual bool gcu::Atom::LoadNode | ( | xmlNodePtr | node | ) | [virtual] |
node | a pointer to the xmlNode containing the serialized Atom. |
Reimplemented in gcu::CrystalAtom, and gcp::Atom.
virtual bool gcu::Atom::Match | ( | Atom * | atom, | |
AtomMatchState & | state | |||
) | [virtual] |
atom | the atom to which the this instance is to be compared. | |
state | the AtomMatchState representing the current comparison state. |
Reimplemented in gcp::Atom, and gcp::FragmentAtom.
virtual void gcu::Atom::Move | ( | double | x, | |
double | y, | |||
double | z = 0. | |||
) | [virtual] |
x | the x component of the transation vector. | |
y | the y component of the transation vector. | |
z | the z component of the transation vector. |
Reimplemented from gcu::Object.
std::string gcu::Atom::Name | ( | ) | [virtual] |
virtual void gcu::Atom::RemoveBond | ( | Bond * | pBond | ) | [virtual] |
virtual xmlNodePtr gcu::Atom::Save | ( | xmlDocPtr | xml | ) | const [virtual] |
xml | the xmlDoc used to save the document. |
Reimplemented from gcu::Object.
Reimplemented in gcp::Atom, gcp::FragmentAtom, and gcp::FragmentResidue.
virtual bool gcu::Atom::SaveNode | ( | xmlDocPtr | xml, | |
xmlNodePtr | node | |||
) | const [virtual] |
xml | the xmlDoc used to save the document. | |
node | a pointer to the xmlNode to which this Atom is serialized. |
Reimplemented in gcu::CrystalAtom.
virtual void gcu::Atom::SetCharge | ( | char | Charge | ) | [inline, virtual] |
Charge | the new formal charge of the Atom. |
Definition at line 124 of file gcu/atom.h.
References m_Charge.
void gcu::Atom::SetCoords | ( | double | x, | |
double | y, | |||
double | z = 0 | |||
) | [inline] |
bool gcu::Atom::SetProperty | ( | unsigned | property, | |
char const * | value | |||
) | [virtual] |
property | the identity of the property as defined in objprops.h. | |
value | the value of the property as a string. |
Reimplemented from gcu::Object.
Reimplemented in gcu::CrystalAtom.
virtual void gcu::Atom::SetZ | ( | int | Z | ) | [virtual] |
Z | the new atomic number of the Atom. |
Reimplemented in gcp::Atom, and gcp::FragmentAtom.
virtual void gcu::Atom::Transform2D | ( | Matrix2D & | m, | |
double | x, | |||
double | y | |||
) | [virtual] |
m | the 2D Matrix of the transformation. | |
x | the x component of the center of the transformation. | |
y | the y component of the center of the transformation. |
Reimplemented from gcu::Object.
Reimplemented in gcp::Atom.
double gcu::Atom::x | ( | ) | const [inline] |
double gcu::Atom::y | ( | ) | const [inline] |
double gcu::Atom::z | ( | ) | const [inline] |
Definition at line 156 of file gcu/atom.h.
References m_z.
Referenced by SetCoords().
void gcu::Atom::zoom | ( | double | ZoomFactor | ) |
ZoomFactor | the zoom factor. |
std::map<Atom*, Bond*> gcu::Atom::m_Bonds [protected] |
The Bond instances of the Atom. The index of the map is a pointer to the other end of the Bond.
Definition at line 292 of file gcu/atom.h.
Referenced by GetBondsNumber().
char gcu::Atom::m_Charge [protected] |
The charge of the Atom.
Definition at line 288 of file gcu/atom.h.
Referenced by gcp::Atom::GetCharge(), GetCharge(), and SetCharge().
double gcu::Atom::m_x [protected] |
The x coordinate of the Atom.
Definition at line 276 of file gcu/atom.h.
Referenced by SetCoords(), and x().
double gcu::Atom::m_y [protected] |
The x coordinate of the Atom.
Definition at line 280 of file gcu/atom.h.
Referenced by SetCoords(), and y().
double gcu::Atom::m_z [protected] |
The x coordinate of the Atom.
Definition at line 284 of file gcu/atom.h.
Referenced by SetCoords(), and z().
int gcu::Atom::m_Z [protected] |