We propose a versatile, parameter-less approach for solving the shape matching problem, specifically in the context of atomic structures when atomic assignments are not known a priori. The algorithm Iteratively suggests Rotated atom-centered reference frames and Assignments (iterative rotations and assignments (IRA)). The frame for which a permutationally invariant set−set distance, namely, the Hausdorff distance, returns a minimal value is chosen as the solution of the matching problem. IRA is able to find rigid rotations, reflections, translations, and permutations between structures with different numbers of atoms, for any atomic arrangement and pattern, periodic or not. When distortions are present between the structures, optimal rotation and translation are found by further applying a standard singular value decompositionbased method. To compute the atomic assignments under the one-to-one assignment constraint, we develop our own algorithm, constrained shortest distance assignments (CShDA). The overall approach is extensively tested on several structures, including distorted structural fragments. The efficiency of the proposed algorithm is shown as a benchmark comparison against two other shape matching algorithms. We discuss the use of our approach for the identification and comparison of structures and structural fragments through two examples: a replica-exchange trajectory of a cyanine molecule, in which we show how our approach could aid the exploration of relevant collective coordinates for clustering the data, and a SiO 2 amorphous model, in which we compute distortion scores, and compare them with a classical strain-based potential. The source code and benchmark data are available at https://github.com/mammasmias/IterativeRotationsAssignments.