void dipole() throws ScriptException {
		// dipole intWidth floatMagnitude OFFSET floatOffset {atom1} {atom2}
		String propertyName = null;
		Object propertyValue = null;
		boolean iHaveAtoms = false;
		boolean iHaveCoord = false;

		viewer.loadShape(JmolConstants.SHAPE_DIPOLES);
		viewer.setShapeProperty(JmolConstants.SHAPE_DIPOLES, "init", null);
		if (statementLength == 1) {
			viewer.setShapeProperty(JmolConstants.SHAPE_DIPOLES, "thisID", null);
			return;
		}
		for (int i = 1; i < statementLength; ++i) {
			propertyName = null;
			propertyValue = null;
			Token token = statement[i];
			switch (token.tok) {
			case Token.on:
				propertyName = "on";
				break;
			case Token.off:
				propertyName = "off";
				break;
			case Token.delete:
				propertyName = "delete";
				break;
			case Token.integer:
			case Token.decimal:
				propertyName = "dipoleValue";
				propertyValue = new Float(floatParameter(i));
				break;
			case Token.expressionBegin:
				propertyName = (statement[i + 1].tok == Token.bitset ? "atomBitset"
						: iHaveAtoms || iHaveCoord ? "endSet" : "startSet");
				propertyValue = expression(statement, i);
				i = pcLastExpressionInstruction;
				iHaveAtoms = true;
				break;
			case Token.leftbrace:
				// {X, Y, Z}
				Point3f pt = getCoordinate(i, true);
				i = pcLastExpressionInstruction;
				propertyName = (iHaveAtoms || iHaveCoord ? "endCoord" : "startCoord");
				propertyValue = pt;
				iHaveCoord = true;
				break;
			case Token.bond:
			case Token.bonds:
				propertyName = "bonds";
				break;
			case Token.calculate:
				continue; // ignored
			case Token.identifier:
				String cmd = (String) token.value;
				if (cmd.equalsIgnoreCase("cross")) {
					propertyName = "cross";
					propertyValue = Boolean.TRUE;
					break;
				}
				if (cmd.equalsIgnoreCase("noCross")) {
					propertyName = "cross";
					propertyValue = Boolean.FALSE;
					break;
				}
				if (cmd.equalsIgnoreCase("offset")) {
					float v = floatParameter(++i);
					if (statement[i].tok == Token.integer) {
						propertyName = "dipoleOffsetPercent";
						propertyValue = new Integer((int) v);
					}
					else {
						propertyName = "dipoleOffset";
						propertyValue = new Float(v);
					}
					break;
				}
				if (cmd.equalsIgnoreCase("value")) {
					propertyName = "dipoleValue";
					propertyValue = new Float(floatParameter(++i));
					break;
				}
				if (cmd.equalsIgnoreCase("offsetSide")) {
					propertyName = "offsetSide";
					propertyValue = new Float(floatParameter(++i));
					break;
				}
				if (cmd.equalsIgnoreCase("width")) {
					propertyName = "dipoleWidth";
					propertyValue = new Float(floatParameter(++i));
					break;
				}
				propertyName = "thisID"; // might be "molecular"
				propertyValue = ((String) token.value).toLowerCase();
				break;
			default:
				invalidArgument();
			}
			if (propertyName != null)
				viewer.setShapeProperty(JmolConstants.SHAPE_DIPOLES, propertyName, propertyValue);
		}
		if (iHaveCoord || iHaveAtoms)
			viewer.setShapeProperty(JmolConstants.SHAPE_DIPOLES, "set", null);
	}