JMV 0.74 Programmer's Documentation

Class BondSearch

java.lang.Object
  |
  +--BondSearch

public class BondSearch
extends java.lang.Object

Finds bonds between Atoms in a Molecule


Inner Class Summary
static class BondSearch.GridSearchPair
          GridSearchPair holds information for 2 atoms that share a bond
 
Constructor Summary
BondSearch()
           
 
Method Summary
static int[][] bondSearch(Molecule molec, float cutoff)
          Determines the actual bonds for each atom in the molecule
static BondSearch.GridSearchPair gridSearch(Molecule molec, float pairDist)
          Creates GridSearchPairs to determine closeness of atoms for bond search Here's how it works: gridSearch() divides the space that the molecule occupies into a 3-d grid of cubes, or gridboxes.
static int[][] makeNeighborCheckList(int numAtoms, int xb, int yb, int zb)
          Creates a list of which neighbors to check for which boxes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BondSearch

public BondSearch()
Method Detail

makeNeighborCheckList

public static int[][] makeNeighborCheckList(int numAtoms,
                                            int xb,
                                            int yb,
                                            int zb)
Creates a list of which neighbors to check for which boxes
Parameters:
numAtoms - the number of atoms in the molecule
xb - the number of boxes in the x direction
yb - the number of boxes in the y direction
zb - the number of boxes in the z direction
Returns:
a 2d integer array lising the gridboxes to check for each atom

gridSearch

public static BondSearch.GridSearchPair gridSearch(Molecule molec,
                                                   float pairDist)
Creates GridSearchPairs to determine closeness of atoms for bond search Here's how it works: gridSearch() divides the space that the molecule occupies into a 3-d grid of cubes, or gridboxes. For each gridbox, it determines which atoms are in that box. It also determines which gridboxes neighbor that box, and should be checked for neighboring atoms. This step allows large molecules to be loaded faster, since atoms that are far apart won't be checked for bonds.
Parameters:
molec - Molecule to determine grid for
pairDist - dimension of a single grid box
Returns:
a GridSearchPair of all the atom pairs close enough to be searched for bonds

bondSearch

public static int[][] bondSearch(Molecule molec,
                                 float cutoff)
Determines the actual bonds for each atom in the molecule
Parameters:
molec - the Molecule for which to determine bonds
cutoff - distance to check for cutoff
Returns:
a 2d integer array that lists the neighboring atoms for each atom

Copyright (C) 2000-2002 The Board of Trustees of the University of Illinois