It is not sufficient to know just the DI mash pH. You must also know the buffering capacity of the malt. The reason for this is that robust mash pH algorithms need to know the amount of acid given off by (or absorbed) by the various malts in transitioning from the DI mash pH (the intrinsic pH) of the malt to the mash pH. To hit a certain mash pH you must determine these acid (proton) surfeits and/or deficits and adjust the sum of all of them (including the deficit of the water) to 0. If a prediction is desired it is found by computing the sum of the deficits and surfeits at several values of pH. The predicted pH is the one that brings that sum to 0.
The proton deficit of a malt at pH is well expressed as a1*(pH - pHdi) + a2*(pH - pHdi)^2 + a3*(pH-pHdi)^3. For most malts a1 is insufficient to specify the malt's buffering (the buffering is a function of pH) but as it is not a strong function you probably don't need a3. If mash pH is near pHdi a1 should be sufficient. a1 averages around 40 but can be as low (in magnitude) as -30 mEq/kgpH or as high as -90 (and even higher for sauermalz) thus we cant really do much with just the pHdi.
Determining the DI pH of any grain can be accomplished by crushing 40 grams of malt and then stirring in 100 milliliters of distilled or reverse osmosis water to produce a 1.2 qt/lb ratio mash. Allow the mash to reach equilibrium by letting it settle for at least 20 minutes. During this time the pH of the mash will change.
So far so good but we'd add the admonition to use water warmed to dough in temperature, to put the sample in a metal beaker and to put the beaker in a water bath. Stir frequently and measure pH at 5 minute intervals for at least 30 minutes.
NOW do the same thing again but add acid in the amount of say 5 mEq/kg. Repeat from NOW (with a new malt sample each time) until your 30 minute pH readings are about 4.
Do the same thing again but add acid in the amount of -5 mEq/kg (IOW add + 5 mEq/kg base) and repeat until mash pH's are above 6.
Now pick a time (say 30 minutes) and plot the data with pH as the independent variable. You will have a curve of mEq/kg vs pH. Use a curve fitting routine to find a1, a2 and a3 that minimize chi-squared summed over the 30 minute data. These go into the model
acid = a1*(pH - pHdi) + a2*(pH - pHdi)^2 + a3*(pH-pHdi)^3
The darker the malt is the higher its acid content and the lower the pH value will be. Conversely the lighter the malt is the lower its acid content and the higher the pH value will be.
It seems to be true that the darker the malt the more acidic but the DI mash pH of 150L caramel is 4.48 while that of 600L roast barley is 4.70. Thus is as good as example as any for illustrating that the buffering as well as the DI mash pH must be taken into account.
Use a recently calibrated pH meter to take a reading of the test mash and then record the pH value as the DI pH value of the grain tested. Then plug that number into your favorite brewing water calculator and you will see the results that you expected.
Plug in your measured DI pH and at least a1 (the linear buffering terms in the pH region near pHdi. Your program won't accept a1? Then it can't do a very good job of estimating mash pH unless it does a good job of guessing buffering from color or malt type.