There is not a generic way to maximize the memory usage in NWChem. The memory input line simply put an upper bound in the memory usage and, depending on the modules and computational parameters, NWChem memory usage will vary.
Using the input I posted yesterday as an example, we could focus on the memory usage for the Coulomb potential evaluation using the
CD fitting approach. In this case, if enough memory is available, NWChem will store the 3-center integrals (the most computational expensive data for this step) in memory. You could check the following line in the output file by searching for the "3-center" string. In the line below, the NWChem run was able to store all the integrals by using 176.421 MegaWords (around 1.4GB) on each process
176.421 MW buffer allocated for incore 3-center
I hope this example is clear to show that around 1.4GB is the maximum amount of memory that could be used for this specific case. In other words, if you provide x amount of memory in the input line, do not expect NWChem to use 100% of it since its usage varies.