[MMTK] Speeding Up Subset Energy Evaluation
Rocco Moretti
roccomoretti at hotpop.com
Thu Mar 16 16:27:39 CET 2006
Konrad Hinsen wrote:
> On Mar 13, 2006, at 17:53, Rocco Moretti wrote:
>
>> In the program that I'm writing, I'm doing a number of subgroup-subgroup
>> interaction energy calculations using the Amber forcefield via
>> universe.energy(subgroup1, subgroup2) calls. Unfortunately, these calls
>> seem to be painfully slow for the number of calls I'm looking to do.
>
> Do I understand correctly that you want to calculate the energies for
> many subgroups but with the same configuration? In that case, there
> isn't much to be done: what takes the time is the initialization of the
> force field evaluator, i.e. the compilation of energy terms that need to
> be taken into account. This is done once per subgroup pair, and in most
> applications this time is negligible compared to the many evaluation
> calls that are made for the same subgroup pair - but apparently not in
> your case.
That's it exactly. -- Instead of the conventional one interacting pair,
multiple configuration, I'm doing one configuration, multiple
interacting pairs. I knew I was doing something a little off normal, but
I didn't know I would get killed as badly as I do for it. For example,
on the single-processor machine I'm currently working on, the initial
calls to universe.energy() with residue-sized groups takes about 13 sec
each, whereas recalling with the same objects takes less than 0.001
seconds each. Not bad if you're recalling 99.9% of the time, but a
killer if every call requires a setup.
At this point, I'm left with examining the evaluator setup code and
seeing if I can optimize anything for my particular situation. Any hints?
Thanks,
-Rocco
More information about the mmtk
mailing list