The Gnome Chemistry Utils  0.13.98
Public Member Functions
gcu::Cycle Class Reference

#include <gcu/cycle.h>

Inheritance diagram for gcu::Cycle:
gcu::Chain gcu::Object

List of all members.

Public Member Functions

 Cycle (Molecule *molecule)
virtual ~Cycle ()
void Simplify ()
virtual void Erase (Atom *pAtom1, Atom *pAtom2)
virtual void Insert (Atom *pAtom1, Atom *pAtom2, Chain &chain)
bool IsBetterForBonds (Cycle *pCycle)
void GetAngles2D (Bond *pBond, double *a1, double *a2)
int GetFusedBonds ()
std::string Name ()
- Public Member Functions inherited from gcu::Chain
 Chain (Bond *pBond, Atom *pAtom=NULL, TypeId Type=ChainType)
 Chain (Molecule *molecule, Bond *pBond, TypeId Type=ChainType)
 Chain (Molecule *molecule, Atom *pAtom, TypeId Type=ChainType)
virtual ~Chain ()
void FindCycles (Atom *pAtom)
bool FindCycle (Atom *pAtom, Bond *pBond)
void Extract (Atom *pAtom1, Atom *pAtom2, Chain &chain)
void Reverse ()
void AddBond (Atom *start, Atom *end)
unsigned GetUnsaturations ()
unsigned GetHeteroatoms ()
bool Contains (Atom *pAtom)
bool Contains (Bond *pBond)
unsigned GetLength ()
double GetMeanBondLength ()
AtomGetNextAtom (Atom *pAtom)
unsigned BuildLength (unsigned *cycle_size=NULL, unsigned *cycle_pos=NULL)
- Public Member Functions inherited from gcu::Object
 Object (TypeId Id=OtherType)
virtual ~Object ()
TypeId GetType () const
void SetId (gchar const *Id)
char const * GetId () const
virtual void AddChild (Object *object)
ObjectGetMolecule () const
ObjectGetReaction () const
ObjectGetGroup () const
DocumentGetDocument () const
ApplicationGetApplication () const
ObjectGetParentOfType (TypeId Id) const
ObjectGetChild (const gchar *Id) const
ObjectGetFirstChild (std::map< std::string, Object * >::iterator &i)
ObjectGetNextChild (std::map< std::string, Object * >::iterator &i)
ObjectGetDescendant (const char *Id) const
ObjectGetParent () const
void SetParent (Object *Parent)
virtual xmlNodePtr Save (xmlDocPtr xml) const
virtual bool Load (xmlNodePtr node)
virtual bool GetCoords (double *x, double *y, double *z=NULL) const
virtual void Move (double x, double y, double z=0.)
virtual void Transform2D (Matrix2D &m, double x, double y)
bool SaveChildren (xmlDocPtr xml, xmlNodePtr node) const
void SaveId (xmlNodePtr node) const
xmlNodePtr GetNodeByProp (xmlNodePtr node, char const *Property, char const *Id)
xmlNodePtr GetNextNodeByProp (xmlNodePtr node, char const *Property, char const *Id)
xmlNodePtr GetNodeByName (xmlNodePtr node, char const *Name)
xmlNodePtr GetNextNodeByName (xmlNodePtr node, char const *Name)
bool HasChildren () const
unsigned GetChildrenNumber () const
virtual ObjectGetAtomAt (double x, double y, double z=0.)
virtual bool Build (std::set< Object * > const &Children) throw (std::invalid_argument)
virtual double GetYAlign ()
virtual bool BuildContextualMenu (UIManager *uim, Object *object, double x, double y)
void EmitSignal (SignalId Signal)
virtual bool OnSignal (SignalId Signal, Object *Child)
void Lock (bool state=true)
bool IsLocked ()
ObjectGetFirstLink (std::set< Object * >::iterator &i)
ObjectGetNextLink (std::set< Object * >::iterator &i)
void Link (Object *object)
void Unlink (Object *object)
virtual void OnUnlink (Object *object)
void GetPossibleAncestorTypes (std::set< TypeId > &types) const
virtual bool SetProperty (unsigned property, char const *value)
virtual std::string GetProperty (unsigned property) const
virtual void OnLoaded ()
void SetDirty (bool dirty=true)
virtual void Clear ()
std::string Identity ()
virtual char const * HasPropertiesDialog () const
virtual bool CanSelect () const
virtual void NotifyEmpty ()
void ShowPropertiesDialog ()
bool GetDirty (void) const

Additional Inherited Members

- Protected Attributes inherited from gcu::Chain
std::map< Atom *, ChainEltm_Bonds
Moleculem_Molecule

Detailed Description

Represents a cycle.

Definition at line 36 of file cycle.h.


Constructor & Destructor Documentation

gcu::Cycle::Cycle ( Molecule molecule)
Parameters:
moleculea molecule.

Constructs an initially empty cycle for the molecule.

virtual gcu::Cycle::~Cycle ( )
virtual

The destructor.


Member Function Documentation

virtual void gcu::Cycle::Erase ( Atom pAtom1,
Atom pAtom2 
)
virtual
Parameters:
pAtom1an atom in the source chain.
pAtom2an atom in the source chain.

Erases a sub-chain. The result is not a cycle. This should be followed by the insertion of a new chain to close the cycle again.

Reimplemented from gcu::Chain.

void gcu::Cycle::GetAngles2D ( Bond pBond,
double *  a1,
double *  a2 
)
Parameters:
pBonda bond of the cycle.
a1where to put the result for the first angle.
a2where to put the result for the first angle.

Evaluates the angles between the bond and its two adjacent bonds in the cycle.

int gcu::Cycle::GetFusedBonds ( )
Returns:
the number of bonds shared with other cycles.
virtual void gcu::Cycle::Insert ( Atom pAtom1,
Atom pAtom2,
Chain chain 
)
virtual
Parameters:
pAtom1an atom in the source chain.
pAtom2an atom in the source chain.
chainthe source chain.

Inserts a chain. Bothe atoms must already be in the target cycle and the insertion should close the cycle.

Reimplemented from gcu::Chain.

bool gcu::Cycle::IsBetterForBonds ( Cycle pCycle)
Parameters:
pCycleanother cycle sharing a bond.

Compares two cycles in competition to know which is the best to contain the second line of a shared double bond.

Returns:
true if the this instance is to be preferred, false otherwise.
std::string gcu::Cycle::Name ( )
virtual
Returns:
the localized object generic name.

Reimplemented from gcu::Chain.

void gcu::Cycle::Simplify ( )

Finds the smallest cycles collection in a polycyclic system.


The documentation for this class was generated from the following file: