private void setParticleField(String str1, String str2, double x) {
		if (model instanceof MolecularModel) {
			setAtomField(str1, str2, x);
			return;
		}
		MesoModel m = (MesoModel) model;
		int lb = str1.indexOf("[");
		int rb = str1.indexOf("]");
		double z = parseMathExpression(str1.substring(lb + 1, rb));
		if (Double.isNaN(z))
			return;
		int i = (int) Math.round(z);
		if (i < 0 || i >= m.numberOfParticles) {
			out(ScriptEvent.FAILED, "Particle " + i + " doesn't exisit.");
			return;
		}
		String s = str2.toLowerCase().intern();
		boolean b = true;
		if (s == "color")
			m.gb[i].color = new Color((int) x);
		else if (s == "custom")
			m.gb[i].custom = (float) x;
		else if (s == "rx")
			m.gb[i].rx = x * IR_CONVERTER;
		else if (s == "ry")
			m.gb[i].ry = x * IR_CONVERTER;
		else if (s == "theta")
			m.gb[i].theta = x;
		else if (s == "vx")
			m.gb[i].vx = x * IV_CONVERTER;
		else if (s == "vy")
			m.gb[i].vy = x * IV_CONVERTER;
		else if (s == "omega")
			m.gb[i].omega = x;
		else if (s == "ax")
			m.gb[i].ax = x;
		else if (s == "ay")
			m.gb[i].ay = x;
		else if (s == "alpha")
			m.gb[i].alpha = x;
		else if (s == "hx")
			m.gb[i].hx = (float) x * R_CONVERTER;
		else if (s == "hy")
			m.gb[i].hy = (float) x * R_CONVERTER;
		else if (s == "gamma")
			m.gb[i].gamma = (float) x;
		else if (s == "charge")
			m.gb[i].charge = x;
		else if (s == "dipole")
			m.gb[i].dipoleMoment = x;
		else if (s == "mass")
			m.gb[i].mass = x / M_CONVERTER;
		else if (s == "friction")
			m.gb[i].friction = (float) x;
		else if (s == "damp_type")
			m.gb[i].dampType = (byte) x;
		else if (s == "inertia")
			m.gb[i].inertia = x;
		else if (s == "breadth")
			m.gb[i].breadth = x * IR_CONVERTER;
		else if (s == "length")
			m.gb[i].length = x * IR_CONVERTER;
		else if (s == "epsilon")
			m.gb[i].epsilon0 = x;
		else if (s == "restraint") {
			if (m.gb[i].restraint == null)
				m.gb[i].restraint = new PointRestraint(x * 0.01, m.gb[i].rx, m.gb[i].ry);
			else
				m.gb[i].restraint.k = x * 0.01;
		} else if (s == "restraint.x") {
			if (m.gb[i].restraint != null)
				m.gb[i].restraint.x0 = x * IR_CONVERTER;
		} else if (s == "restraint.y") {
			if (m.gb[i].restraint != null)
				m.gb[i].restraint.y0 = x * IR_CONVERTER;
		} else {
			out(ScriptEvent.FAILED, "Cannot set property: " + str2);
			b = false;
		}
		if (b)
			notifyChange();
	}