Protein crystallization plays a central role in structural biology, with broad impact in pharmaceutical formulation, drug delivery, biosensing, and biocatalysis. Despite this importance, the process of protein crystallization remains poorly understood and highly empirical, with largely unpredictable crystal contacts, lattice packing arrangements, and space group preferences, and the programming of protein crystallization through precisely engineered sidechain-sidechain interactions across multiple protein-protein interfaces is an outstanding challenge. Here we develop a general computational approach to designing three-dimensional(3D) protein crystals with pre-specified lattice architectures at atomic accuracy that hierarchically constrains the overall degree of freedoms (DOFs) of the system. We use the approach to design three pairs of oligomers that can be individually purified, and upon mixing, spontaneously self-assemble into large 3D crystals (>100 micrometers). Small-angle X-ray scattering and X-ray crystallography show these crystals are nearly identical to the computational design models, with the design target F4132 and I432 space groups and closely corresponding overall architectures and protein-protein interfaces. The crystal unit cell dimensions can be systematically redesigned while retaining space group symmetry and overall architecture, and the crystals are both extremely porous and highly stable, enabling the robust scaffolding of inorganic nanoparticle arrays. Our approach thus enables the computational design of protein crystals with high accuracy, and since both structure and assembly are encoded in the primary sequence, provides a powerful new platform for biological material engineering.