[AMBER-Developers] Usage of long symbol names, KIND, DFLOAT, etc.

From: Joe Krahn <krahn.niehs.nih.gov>
Date: Tue, 31 Mar 2009 17:27:36 +0100

What is AMBER's position on the use of names longer than 31 chars? It
violates the F95 standard, but maybe all supported compilers allow long
names. F2003 increases the limit to 63 characters. Names longer than 31
may sound a bit ridiculous, but it does make sense to use verbose names
for globals. Mark just updated the charmm code using a 32-character
name: CHARMM_ATOM_TYPE_NUMERICAL_LABEL.

Some code uses the function DFLOAT(). It is not part of Fortran95; was
it ever standard Fortran? Code should use DBLE() instead. However,
DFLOAT is very common. Maybe it is OK to be lenient with this sort of
very common extension.

Complex declarations are a bit more of a problem. The Fortran Standards
really want to push the KIND concept, and DOUBLE COMPLEX is no longer
valid. Instead, you have to use COMPLEX(KIND=8). It still supports
DOUBLE PRECISION. I suppose they didn't like double-complex because it
is not as descriptive; it sounds a bit like "twice as complex".

I would rather just use a KIND parameter, because that it what the
Fortran standards want me to do. Alternatively, I can just put a #define
_COMPELX_ in dprec.h.

Also, why is dprec.h in several places? Shouldn't there be a common
AMBER include directory?

Joe




_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Apr 01 2009 - 01:15:43 PDT
Custom Search