I develop software requirements for an application for drawing molecules. At the moment I am working on a new feature to enable adding a functional group to a molecule. Please help me understand the rules that define how the functional group attaches to the rest of the molecule.
1. How to tell which of the functional group's atoms participate in its attachment to the rest of the molecule?
2. Is the attachment happens only via one atom? Can several atoms be intermediary in the attachment?