TeraStructure is a new algorithm to fit Bayesian models of genetic variation in human populations on tera-sample-sized data sets (10^12 observed genotypes, i.e., 1M individuals at 1M SNPs). This package provides a scalable, multi-threaded C++ implementation that can be run on a single computer.