The Gnome Chemistry Utils 0.13.3
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 ()

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: