code: public double[] findGridBoundaries() {
          IAtom[] atoms = AtomContainerManipulator.getAtomArray(protein);
          double[] minMax = new double[6];
          minMax[0] = atoms[0].getPoint3d().x;
          minMax[1] = atoms[0].getPoint3d().x;
          minMax[2] = atoms[0].getPoint3d().y;
          minMax[3] = atoms[0].getPoint3d().y;
          minMax[4] = atoms[0].getPoint3d().z;
          minMax[5] = atoms[0].getPoint3d().z;
          for (int i = 0; i < atoms.length; i++) {
              if (atoms[i].getPoint3d().x > minMax[1]) {
                  minMax[1] = atoms[i].getPoint3d().x;
              } else if (atoms[i].getPoint3d().y > minMax[3]) {
                  minMax[3] = atoms[i].getPoint3d().y;
              } else if (atoms[i].getPoint3d().z > minMax[5]) {
                  minMax[5] = atoms[i].getPoint3d().z;
              } else if (atoms[i].getPoint3d().x < minMax[0]) {
                  minMax[0] = atoms[i].getPoint3d().x;
              } else if (atoms[i].getPoint3d().y < minMax[2]) {
                  minMax[2] = atoms[i].getPoint3d().y;
              } else if (atoms[i].getPoint3d().z < minMax[4]) {
                  minMax[4] = atoms[i].getPoint3d().z;
              }
          }
          return minMax;
      }
docs: Method determines the minimum and maximum values of a coordinate space
  up to 3D space.
  
  @return double[] stores min,max,min,max,min,max