An algorithm and a computer program that can be used in the search for all possible periodic packings of a specified set of polyhexes with a specified packing factor have been developed. The algorithm is based on the discrete modeling method of molecular packings.