A helmet is used to detachably secure a TMS coil to the head of a patient. The helmet has a flexible sack containing a multiplicity of beads and also has a valve that permits air to enter and to be withdrawn from the interior volume of the sack. The handle of the TMS coil is inserted into the helmet, and the helmet is placed upon the head of a patient. Withdrawing air from the interior volume of the sack through the valve causes the sack to shrink and compresses the beads into a compact mass that conforms to the shape of the patients head. Maintaining the vacuum causes the sack to retain its shape, making it possible to hold the helmet and TMS coil in proper position during a TMS study.