  Estimating force constants for crystal structures is a fundamental aspect of
calculating various phonon-related properties. However, it can be a challenging
task, particularly when dealing with a large number of atoms or when third and
higher-order force constants are needed. In this study, we propose an efficient
approach that involves constructing a complete orthonormal basis set of the
force constants. We formulate this approach using projector matrices and their
eigenvectors corresponding to the requirements for the force constants. This
basis set allows us to infer the force constants from displacement-force
datasets precisely. Our efficient algorithms for the basis-set construction and
force constant estimation from a displacement-force dataset are implemented in
the symfc code. Furthermore, several applications are demonstrated in this
study, indicating that the current approach helps to obtain force constants
efficiently and precisely.
