Right now all mass calculations first generate the molecular formula of the entity in question (peptide, fragment, amino acid, etc) before calculating the monoisotopic mass or average weight from this molecular formula. Doing this is (slightly) more precise but takes more complexity and time to calculate. For many use cases where only the mass is needed this is just not necessary.
The best way to approach this I think is to start with the fragmentation code and make sure that fragments can be calculated using masses instead of molecular formulas and in that process see which other functions and structures need updating. I was expecting to build some generic to make all calculation functions generic over the chosen output type (monoisotopic mass/average weight/molecular formula).