4.101 OEMolecularFormula

void OEMolecularFormula(std::string &str, const OEMolBase &mol)

This function calculates the molecular formula for the given molecule, return the result in the str argument. The component elements of the molecular formula are listed in Hill order. This function determines the cummulative molecular formula, so elements from different connected components are summed. To generate a "dot disconnected" molecular formula, this function should be used to generate the formula for each component or part, and the results concatenated together as appropriate.