Our algorithm automatically places dummy atoms following a precise set of rules that are designed to ensure consistent performance even when a molecule is translated, rotated, or if the atom order is permuted. If a proposed angle α abc is found to be within 15°of linear (0°or 180°) during the construction of the internal coordinate system, then the angle is not added and an improper dihedral is added instead. If atom b is bonded to at least three atoms, then the improper dihedral τ abdc is added to the coordinate system, where d is chosen to be the bonded atom closest to b excluding a and c. If atom b is bonded only to a and c, a dummy atom is added to the coordinate system, as illustrated in figure . The dummy atom x is placed 1 Å away from atom b in the direction of δba × δbc , where δ is the unit bond vector. To counteract the dummy atom's additional Cartesian degrees of freedom, the δ bx bond stretch coordinate is constrained to 1 Å and the α abx and α cbx bending angles are constrained to 90°. The nearly-linear angle α abc is then replaced with the improper dihedral angle τ abxc . However, if the α abc angle is already too close to linear when the algorithm detects the need for the dummy atom, then this procedure for determining the orientation of the dummy atom will become numerically unstable. For this reason, if δba × δbc 2 < 10 -4 , an alternate procedure is used instead. This procedure places the dummy atom in the direction Iδac δT ac ŵ, where ŵ is the unit vector of the Cartesian axis that is nearest to being orthogonal with the vector δac . While this approach loses rotational invariance of the dummy atom positioning, the positioning does maintain translational and permutational invariance.