Designing the CapSet Class
This page describes the design of the CapSet
class.
What is the CapSet class?
The CapSet
class is a container of Cap
objects.
Why do we need the CapSet class?
The need for the CapSet
class stemmed from the container
consideration. In short, we need a class which can hold Cap
objects.
CapSet Considerations
- asymmetry
Given a severed bond \(A-B\), let caps \(C\) and \(D\) respectively replace \(A\) and \(B\). It is generally the case that \(C-B\) and \(A-D\) will in general lead to two caps because \(C\) and \(D\) will not usually be value equal.
- multiple caps
An object \(A\) may make bonds to several atoms which are not in the fragment. If \(A\) is bonded to \(B\) and \(C\), and \(B\) and \(C\) are both not in the fragment we need caps to address fragmenting the \(A-B\) bond, but also the \(A-C\) bond
CapSet Design
Following the container consideration, the CapSet
object is a
container-like object whose elements are instances of the Cap
class. The
multiple caps consideration is addressed by adding multiple caps,
with the same anchor, to the CapSet
object. In a similar vein, the
asymmetry consideration is addressed by adding two Cap
instances
to the CapSet
object, each having a different anchor atom.
CapSet Design Summary
- asymmetry
The asymmetry of capping a bond is handled by adding multiple
Cap
objects to theCapSet
object.- multiple caps
Cap
objects can be created for each of the replaced atoms.