Bug/feature of findContacts

Konrad Hinsen hinsen@cnrs-orleans.fr
Mon, 17 Aug 1998 11:31:56 +0200 (DFT)


> > At the C level, each atom is identified by an index into the arrays
> > that store the atom-related quantities (position, velocity, charge,
> > etc.).
> 
> This is the point where I wish I could chide Konrad for still using
> indicies :) For our simulation code, most of the information is stored

You can, but it won't change much ;-)

> in an atom or bond class, and VMD stores nearly all of its information
> that way.  However, we keep coordinates, velocities and forces in a

Fine if your low-level language is object-oriented. In C, simulating
classes would only create a big mess.

> different array and use indicies to map between then, since
> performance is a lot better in that case.  (And VMD stores coordinate

Well, MMTK doesn't use arrays and indices much more than that!
None of the index-using C code ever deals with particular atoms,
there are just loops over all atoms with references to arrays.

> So far, other than for the above performance reasons, I have come
> across very few cases where I've needed to express relationships as
> indicies.  When I've needed them, they've been easy to build for that
> existing structure, but I agree that trying to manipulate those tables
> during structure modification is tedious.  There's also the question

In MMTK, indices are never modified. Whenever a universe is changed,
the complete index set is recalculated before the next C-level
operation. This is rare anyway; normally you first build up
your system and then work on it.

> Besides, there are other ways, like caching information and toggling a
> status flag to indicate if a rebuild is needed.  There's still some
> overhead but not much and it is much easier to understand.

That's exactly how MMTK deals with low-level information; not just
indices, but also energy terms etc.

> All this talk of indicies goes double (or triple) for PDB files.
> There are at least three ways to index an atom:
> 
>   1) the "serial number", which need not be consequtive because for
> some reason TER records share the same number space, as in
> ATOM   1
> TER    2
> ATOM   3

This is what MMTK uses at the moment, although probably

>   2) the position in the file (the first being numbered 0 or 1 and
> increasing by one thereafter

would be a more resonable choice. Although I must confess that I would
prefer to deliberately avoid any resemblence between MMTK indices and
PDB indices, just to force people to give up thinking about "atom
numbers". Better yet, I'd love to get rid of the PDB format altogether!

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen@cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------