public void rotateSelectedAtoms(BitSet bs, char axis, float angle) {
		if (rotationMatrix == null)
			rotationMatrix = new Matrix3f();
		if (tempPoint3f == null)
			tempPoint3f = new Point3f();
		if (axisAngle == null)
			axisAngle = new AxisAngle4f();
		Point3f center = getCenterOfSelectedAtoms(bs);
		switch (axis) {
		case 'x':
			axisAngle.set(1, 0, 0, angle);
			break;
		case 'y':
			axisAngle.set(0, 1, 0, angle);
			break;
		default:
			axisAngle.set(0, 0, 1, angle);
		}
		rotationMatrix.set(axisAngle);
		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;
				rotationMatrix.transform(tempPoint3f);
				atom[i].setLocation(tempPoint3f);
			}
		}
		translateSelectedAtomsTo(bs, center);
	}