Molecular analysis of two-dimensional protein crystallization