RE: amber-developers: ene and ener array mess in sander

From: Volodymyr Babin <>
Date: Sun, 23 Nov 2008 17:46:56 -0500 (EST)

Hi everyone,

if I may add to this:

> At the time i thought that the best cleanup would be an energy module
> of get and set routines. The main advantages of get/set seemed to be
> an improved chance of correctness and easier debugging:
> these routines would be a good spot for detailed verification
> with special test cases, tracing, and breakpoints.
> I also thought get/set might be good locations for investigating race
> conditions which i thought we might be having with psander.

What you are writing about is often referred to as "encapsulation": hiding
of the implementation details behind a consistent interface. There are two
more important concepts that make writing of large programs easier:
and polymorphism. Inheritance can be simulated in fortran (with some pain
because there is no pointer cast mechanism), but polymorphism cannot -- there
is simply no 'pointer to subroutine' type. OTOH, it should be possible to
"the entropy" considerably using encapsulation alone [not fully, because
the polymorphism, dispatch is still going to be "by hands"].

Have a nice evening,
Received on Fri Dec 05 2008 - 16:29:53 PST
Custom Search