@SuppressWarnings("unchecked")
	void readGaussianBasis() throws Exception {
		/*
		 * standard Gaussian format:
		 * 
		 * [GTO] 1 S 3 172.2560000 2.0931324849764 25.9109000 2.93675143488078 5.5333500 1.80173711536432
		 * 
		 * 1 SP 2 3.6649800 -0.747384339731355 1.70917757609178 0.7705450 0.712661025209793 0.885622064435248
		 * 
		 */

		Vector sdata = new Vector();
		Vector gdata = new Vector();
		int atomIndex = 0;
		int gaussianPtr = 0;

		while (readLine() != null && (line.length() == 0 || line.charAt(0) != '[')) {
			String[] tokens = getTokens(line);
			if (tokens.length == 0)
				continue;
			if (tokens.length != 1) {
				logger.log("Error reading GTOs: missing atom index");
				new NullPointerException();
			}
			Hashtable slater = new Hashtable();
			atomIndex = parseInt(tokens[0]) - 1;
			tokens = getTokens(readLine());
			String basisType = tokens[0];
			int nGaussians = parseInt(tokens[1]);
			slater.put("atomIndex", new Integer(atomIndex));
			slater.put("basisType", basisType);
			slater.put("nGaussians", new Integer(nGaussians));
			slater.put("gaussianPtr", new Integer(gaussianPtr));
			for (int i = 0; i < nGaussians; i++) {
				String[] strData = getTokens(readLine());
				int nData = strData.length;
				float[] data = new float[nData];
				for (int d = 0; d < nData; d++)
					data[d] = parseFloat(strData[d]);
				gdata.add(data);
				gaussianPtr++;
			}
			sdata.add(slater);
		}
		float[][] garray = new float[gaussianPtr][];
		for (int i = 0; i < gaussianPtr; i++)
			garray[i] = (float[]) gdata.get(i);
		moData.put("shells", sdata);
		moData.put("gaussians", garray);
		logger.log(sdata.size() + " slater shells read");
		logger.log(garray.length + " gaussian primitives read");
	}