version 1.16 | version 1.17 |
---|
| |
// Copyright (c) 2001-2002 Board of Trustees of the University of Illinois | // Copyright (c) 2001-2002 Board of Trustees of the University of Illinois |
// Theoretical Biophysics Group http://www.ks.uiuc.edu/ | // Theoretical Biophysics Group http://www.ks.uiuc.edu/ |
// | // |
// $Id: BondSearch.java,v 1.16 2002/02/22 15:51:53 johns Exp $ | // $Id: BondSearch.java,v 1.17 2002/10/18 16:03:10 mbach Exp $ |
// | // |
| |
import java.util.*; | import java.util.*; |
| |
* x value, the maximum y value, and the maximum z value, | * x value, the maximum y value, and the maximum z value, |
* in that order, from the input float array. | * in that order, from the input float array. |
*/ | */ |
static float[] find_minmax(float[] pos) { | /*static float[] find_minmax(float[] pos) { |
float x1, x2, y1, y2, z1, z2; | float x1, x2, y1, y2, z1, z2; |
float posmax = pos.length; | float posmax = pos.length; |
| |
| |
f[5] = z2; | f[5] = z2; |
| |
return f; | return f; |
} | }*/ |
| |
| |
/** Finds the distance between 2 points, given as arrays | /** Finds the distance between 2 points, given as arrays |
| |
return (c0*c0 + c1*c1 + c2*c2); | return (c0*c0 + c1*c1 + c2*c2); |
} | } |
| |
//--------------------------------------------------------- | |
//-- Inner classes ---------------------------------------- | |
//--------------------------------------------------------- | |
| |
| |
/** GridSearchPair holds information for 2 atoms that share a bond */ | |
public static class GridSearchPair { | |
| |
/** atom index of first atom */ | |
public int index1; | |
/** atom index of second atom */ | |
public int index2; | |
| |
/** next GridSearchPair */ | |
public GridSearchPair next = null; | |
| |
/** Constructor */ | |
public GridSearchPair() {} | |
| |
/** Constructor | |
* @param ind1 index number of first atom | |
* @param ind2 index number of second atom | |
*/ | |
public GridSearchPair(int ind1, int ind2) { | |
index1 = ind1; | |
index2 = ind2; | |
} | |
} | |
| |
| |
/** Creates a list of which neighbors to check for which boxes | /** Creates a list of which neighbors to check for which boxes |
* @param numAtoms the number of atoms in the molecule | * @param numAtoms the number of atoms in the molecule |
| |
return nbrList; | return nbrList; |
} | } |
| |
| |
| //--------------------------------------------------------- |
| //-- Inner classes ---------------------------------------- |
| //--------------------------------------------------------- |
| |
| |
| /** GridSearchPair holds information for 2 atoms that share a bond */ |
| public static class GridSearchPair { |
| |
| /** atom index of first atom */ |
| public int index1; |
| /** atom index of second atom */ |
| public int index2; |
| |
| /** next GridSearchPair */ |
| public GridSearchPair next = null; |
| |
| /** Constructor */ |
| public GridSearchPair() {} |
| |
| /** Constructor |
| * @param ind1 index number of first atom |
| * @param ind2 index number of second atom |
| */ |
| public GridSearchPair(int ind1, int ind2) { |
| index1 = ind1; |
| index2 = ind2; |
| } |
| } |
| |
} | } |