Mechanism of self-assembly of tobacco mosaic virus protein