BondHandle Class Reference

chemical bond More...

#include <bond_handle.hh>

Inherits GenericPropContainer< BondHandle >.

Public Member Functions

 BondHandle ()
 BondHandle (const impl::ConnectorImplP &im)
void Apply (EntityVisitor &v)
void Apply (EntityViewVisitor &v)
geom::Vec3 GetPos () const
geom::Vec3 GetOriginalPos () const
Real GetLength () const
unsigned char GetBondOrder () const
void SetBondOrder (unsigned char bo)
unsigned long GetHashCode () const
bool operator== (const BondHandle &rhs) const
bool operator!= (const BondHandle &rhs) const
const impl::ConnectorImplPImpl () const
impl::ConnectorImplPImpl ()
Handle validity



 operator bool () const
bool IsValid () const
Atoms involved in bond



AtomHandle GetFirst () const
AtomHandle GetSecond () const
AtomHandle GetOther (const AtomHandle &a) const

Protected Member Functions

GenericPropContainerImplGpImpl ()
const GenericPropContainerImplGpImpl () const
void CheckValidity () const

Friends

class ConstGenericPropContainer< BondHandle >

Related Functions

(Note that these are not member functions.)



bool DLLEXPORT_OST_MOL BondExists (const AtomHandle &a, const AtomHandle &b)

Detailed Description

chemical bond

Represents a chemical bond between two atoms (GetFirst(), GetSecond()). New bonds are created with EditorBase::Connect().

Definition at line 34 of file bond_handle.hh.


Constructor & Destructor Documentation

BondHandle (  ) 

necessary dummy ctor, creates invalid handle

BondHandle ( const impl::ConnectorImplP im  ) 

ctor for internal use, in public interface for convenience purposes


Member Function Documentation

void Apply ( EntityViewVisitor v  ) 
void Apply ( EntityVisitor v  ) 

entry point for entity visitor

void CheckValidity (  )  const [protected]
unsigned char GetBondOrder (  )  const

get the bond order ((1) single, (2) double, (3) triple, (4) aromatic)

AtomHandle GetFirst (  )  const

Get first atom In python also available as the property first.

These methods return the atoms involved in the bond. No assumptions about the order should be made. With the internal coordinate system enabled, first and second may even be swapped when rebuilding the internal connectivity tree.

unsigned long GetHashCode (  )  const

unique bond id

Real GetLength (  )  const

return the length of the bond

geom::Vec3 GetOriginalPos (  )  const

return midpoint between the two atoms (original coordinates)

AtomHandle GetOther ( const AtomHandle a  )  const

get other atom Returns one of the two atoms that does not match the given one. In python also available as the property other

geom::Vec3 GetPos (  )  const

return midpoint between the two atoms (transformed coordinates)

AtomHandle GetSecond (  )  const

get second atom In python also available as the property second

const GenericPropContainerImpl* GpImpl (  )  const [protected]
GenericPropContainerImpl* GpImpl (  )  [protected]
impl::ConnectorImplP& Impl (  )  [inline]

Definition at line 110 of file bond_handle.hh.

const impl::ConnectorImplP& Impl (  )  const [inline]

Definition at line 106 of file bond_handle.hh.

bool IsValid (  )  const

check validity of handle

See also:
operator bool()
operator bool (  )  const

check validity of handle

check, whether the bond handle points to a valid bond.

Note:
It is an error to use any method other than IsValid, Impl and operator bool() when the handle is invalid. An InvalidHandle exception will be thrown.
bool operator!= ( const BondHandle rhs  )  const
bool operator== ( const BondHandle rhs  )  const
void SetBondOrder ( unsigned char  bo  ) 

set the bond order ((1) single, (2) double, (3) triple, (4) aromatic)


Friends And Related Function Documentation

bool DLLEXPORT_OST_MOL BondExists ( const AtomHandle a,
const AtomHandle b 
) [related]

check whether a bond exists, that connects the two atom handles.

This function checks, if a bond between a and b exists and returns true if this is the case. In any other case, including when one of a and b is an invalid AtomHandle, the method returns false. The function does not check whether there may be a connection involving more than one bond connecting a and b

friend class ConstGenericPropContainer< BondHandle > [friend]

Definition at line 37 of file bond_handle.hh.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 20 Jun 2016 for OpenStructure by  doxygen 1.6.1