AMBER Archive (2007)

Subject: RE: AMBER: sander bug?

From: Ross Walker (ross_at_rosswalker.co.uk)
Date: Fri Jan 26 2007 - 01:26:55 CST


> + bckptr(1:natom) = 0
> +
> if(periodic == 0)then
> do i=1,natom
> j = bckptr(i)
> + if (j.eq.0) cycle
> imagcrds(1,i) = crd(1,j)
> imagcrds(2,i) = crd(2,j)
> imagcrds(3,i) = crd(3,j)

I do not believe you are correct here. It would be good if you can explain
your reasoning, how you came to find this bug, where it believe it comes
from and what issues it raises.

As far as I can tell bckptr is always filled before use in subroutine
grid_image and this is ALWAYS called before bckptr is read in get_nb_list.
Hence I see no reason to need to waste time zeroing it.

Force calls nonbond_list. which calls grid_image which fills bckptr. and
then nonbond_list calls get_nb_list which reads bckptr.

Secondly your introduction of an: if (j.eq.0) cycle

has major implications for performance in what is a critical routine and so
this does not represent a very useful fix. If you can explain your reasoning
slightly better than just a patch file I can verify if this is truly a bug
or not and devise a less performancing impacting fix.

> P.S. Warning: FORTRAN of SANDER is so strong that
> it can cause prolongated vomiting even in individuals
> having strong stomach.

Why? It is good for you. It will put hairs on your chest.

It certainly doesn't make me vomit. Once you learn to use grep and vi
correctly you will find FORTRAN is a wonderful language and I would argue
for scientific algorithms it is still the best option. Significantly easier
to read and follow than a large number of the scientific codes I have to
deal with everyday that are written in C and C++.

For codes not written by experts in maximizing cpu performance it will
likely be much faster than equivalent C++ codes. Performance wise in FORTRAN
one is given just enough rope to hang oneself while in C++ you are given
plenty more just for good measure. Lets have a molecule object, which
contains residue objects which contains atom objects which contain x,y, and
z coordinates. So lovely to read except when I want the distance between any
two atoms at you end up de-referencing about 4 pointer deep for each
coordinate... Or even better lets go use python...

All the best
Ross

/\
\/
|\oss Walker

| HPC Consultant and Staff Scientist |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- ross_at_rosswalker.co.uk |
| http://www.rosswalker.co.uk | PGP Key available on request |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu