void load() throws ScriptException {
		StringBuffer loadScript = new StringBuffer("load");
		int[] params = new int[4];
		Point3f unitCells = viewer.getDefaultLattice();
		params[1] = (int) unitCells.x;
		params[2] = (int) unitCells.y;
		params[3] = (int) unitCells.z;
		int i = 1;
		// ignore optional file format
		String filename = "fileset";
		if (statementLength == 1) {
			i = 0;
		}
		else {
			if (statement[1].tok == Token.identifier)
				i = 2;
			if (statement[i].tok != Token.string)
				filenameExpected();
		}
		// long timeBegin = System.currentTimeMillis();
		if (statementLength == i + 1) {
			filename = (String) statement[i].value;
			if (i == 0 || filename.length() == 0)
				filename = viewer.getFullPathName();
			loadScript.append(" " + StateManager.escape(filename) + ";");
			viewer.openFile(filename, params, loadScript.toString());
		}
		else if (statement[i + 1].tok == Token.leftbrace || statement[i + 1].tok == Token.integer) {
			filename = (String) statement[i++].value;
			if (filename.length() == 0)
				filename = viewer.getFullPathName();
			loadScript.append(" " + StateManager.escape(filename));
			if (statement[i].tok == Token.integer) {
				params[0] = statement[i++].intValue;
				loadScript.append(" " + params[0]);
			}
			if (i < statementLength && statement[i].tok == Token.leftbrace) {
				unitCells = getCoordinate(i, false);
				params[1] = (int) unitCells.x;
				params[2] = (int) unitCells.y;
				params[3] = (int) unitCells.z;
				loadScript.append(" " + StateManager.escape(unitCells));
				i = pcLastExpressionInstruction + 1;
				int iGroup = -1;
				int[] p;
				if (i < statementLength && statement[i].tok == Token.spacegroup) {
					++i;
					String spacegroup = viewer.simpleReplace(stringParameter(i++), "''", "\"");
					loadScript.append(" " + StateManager.escape(spacegroup));
					if (spacegroup.equalsIgnoreCase("ignoreOperators")) {
						iGroup = -999;
					}
					else {
						if (spacegroup.indexOf(",") >= 0) // Jones Faithful
							if ((unitCells.x < 9 && unitCells.y < 9 && unitCells.z == 0))
								spacegroup += "#doNormalize=0";
						iGroup = viewer.getSpaceGroupIndexFromName(spacegroup);
						if (iGroup == -1)
							evalError(GT._("space group {0} was not found.", spacegroup));
					}
					p = new int[5];
					for (int j = 0; j < 4; j++)
						p[j] = params[j];
					p[4] = iGroup;
					params = p;
				}
				if (i < statementLength && statement[i].tok == Token.unitcell) {
					++i;
					p = new int[11];
					for (int j = 0; j < params.length; j++)
						p[j] = params[j];
					p[4] = iGroup;
					float[] fparams = new float[6];
					i = floatParameterSet(i, fparams);
					loadScript.append(" {");
					for (int j = 0; j < 6; j++) {
						p[5 + j] = (int) (fparams[j] * 10000f);
						loadScript.append((j == 0 ? "" : " ") + p[5 + j]);
					}
					loadScript.append("}");
					params = p;
				}
			}
			loadScript.append(";");
			viewer.openFile(filename, params, loadScript.toString());
		}
		else {
			String modelName = (String) statement[i].value;
			i++;
			loadScript.append(" " + StateManager.escape(modelName));
			String[] filenames = new String[statementLength - i];
			while (i < statementLength) {
				modelName = (String) statement[i].value;
				filenames[filenames.length - statementLength + i] = modelName;
				loadScript.append(" " + StateManager.escape(modelName));
				i++;
			}
			loadScript.append(";");
			viewer.openFiles(modelName, filenames, loadScript.toString());
		}
		String errMsg = viewer.getOpenFileError();
		// int millis = (int)(System.currentTimeMillis() - timeBegin);
		// Logger.debug("!!!!!!!!! took " + millis + " ms");
		if (errMsg != null)
			evalError(errMsg);
		if (logMessages)
			viewer.scriptStatus("Successfully loaded:" + filename);
		String defaultScript = viewer.getDefaultLoadScript();
		String msg = "";
		if (defaultScript.length() > 0)
			msg += "\nUsing defaultLoadScript: " + defaultScript;
		String script = viewer.getModelSetProperty("jmolscript");
		if (script != null) {
			msg += "\nAdding embedded #jmolscript: " + script;
			defaultScript += ";" + script;
		}
		if (msg.length() > 0)
			Logger.info(msg);
		if (defaultScript.length() > 0)
			runScript(defaultScript);
	}