in reply to Iteration speed

There could be several things causing slow iteration time:

1) data structures used (some are more efficient than others)
2) the algorithm used for determining interations (is it the most efficient?).
3)how the residuals are being parsed and compared
4) how you are reading in the file (if you have a new file read for each residue it will bottleneck)
5) how you are storing information in the database.

These are just off the top of my head. No doubt there are others. Give us a better idea of what you are doing (especially addressing the above) and it will be easier to help you.

davidj