public void translateSelectedAtomsXYBy(Matrix3f transform, BitSet bs, float dx, float dy) {
		if (translationMatrix == null)
			translationMatrix = new Matrix4f();
		if (tempMatrix1 == null)
			tempMatrix1 = new Matrix3f();
		if (tempMatrix4f == null)
			tempMatrix4f = new Matrix4f();
		if (tempPoint3f == null)
			tempPoint3f = new Point3f();
		if (tempVector3f == null)
			tempVector3f = new Vector3f();
		// *watch* the order of matrix multiplications: first transform the atomic coordinates into the current
		// view space, and then apply translation, and then transform back to the model space.
		tempMatrix4f.setIdentity();
		tempMatrix1.invert(transform);
		tempMatrix4f.setRotation(tempMatrix1);
		translationMatrix.set(tempMatrix4f);
		tempMatrix4f.setIdentity();
		tempVector3f.set(dx * 0.05f, -dy * 0.05f, 0);
		tempMatrix4f.setTranslation(tempVector3f);
		translationMatrix.mul(tempMatrix4f);
		tempMatrix4f.setRotation(transform);
		tempVector3f.set(0, 0, 0);
		tempMatrix4f.setTranslation(tempVector3f);
		translationMatrix.mul(tempMatrix4f);
		for (int i = 0; i < iAtom; i++) {
			if (bs.get(i)) {
				tempPoint3f.x = atom[i].rx;
				tempPoint3f.y = atom[i].ry;
				tempPoint3f.z = atom[i].rz;
				translationMatrix.transform(tempPoint3f);
				atom[i].setLocation(tempPoint3f);
			}
		}
	}