3.2.15 SetBgn

virtual bool SetBgn(OEAtomBase*bgn)

Define the ``begin'' (or ``source'') atom of a bond. Normally, the begin atom of a bond is defined when the bond is created with OEMolBase::NewBond. However, it is occasionally useful to defer this decision, by passing the NULL pointer, (OEAtomBase*)0, as the begin atom to OEMolBase::NewBond. The begin atom should then later be specified by calling this method, OEBondBase::SetBgn, to resolve the begin atom before the molecule is used. Note that it is not possible to set/change the begin atom of a bond, once it has been defined. To achieve the same behavior call the OEMolBase::DeleteBond method, followed by OEMolBase::NewBond, to first destroy the original and replace it with a new bond.