This specific routine allows for the simulation of (lamellar) structures affected by various nature and density of layer defects (e.g., layer vacancies, isomorphic substitutions) and stacking defects (e.g., welldefined or random stacking faults,interstratification). It has been previously applied to the study of nanocrystalline manganese or iron oxides