Class BondSearch
java.lang.Object
|
+--BondSearch
- public class BondSearch
- extends java.lang.Object
Finds bonds between Atoms in a Molecule
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 |
BondSearch
public BondSearch()
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 moleculexb
- the number of boxes in the x directionyb
- the number of boxes in the y directionzb
- 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 forpairDist
- 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 bondscutoff
- distance to check for cutoff- Returns:
- a 2d integer array that lists the neighboring atoms for each atom