code: private static double calculateMolecularWeight(List<AbstractMolecule> molecules) throws BuilderMoleculeException, CTKException, ChemistryException {
      Double result = 0.0;
      for (AbstractMolecule molecule : molecules) {
        molecule = BuilderMolecule.mergeRgroups(molecule);
        result += Chemistry.getInstance().getManipulator().getMoleculeInfo(molecule).getMolecularWeight();
      }
      return result;
    }
docs: intern method to calculate the molecular weight for a list of molecules
  
  @param molecules
  @return
  @throws BuilderMoleculeException
  @throws CTKException
  @throws ChemistryException if the Chemistry Engine can not be initialized