I have an equilibrated trajectory from a molecular dynamics simulation and I would like to calculate the structure factor using the atomic positions. I think I am able to do it right for cubic lattices that I have been testing on. It is essentially just the discrete fourier transform of the atomic positions weighted by their atomic form factors.
I am having trouble figuring out the right way to perform the calculation for my actual simulated system which is simulated in a monoclinic unit cell. I believe the first step is to apply a transformation to the unit cell that shifts all of the atoms into an orthorhombic box of the same volume. This makes the atomic positions skewed, but the periodicity is such that I can apply a discrete fourier transform to it directly. After that, I'm not sure about the right way to transform the structure factor so it represents that of the actual unit cell.