Hi Matt, excellent question, sorry if my answer is a bit long winded.
Structure storage and I/O operations are internally handled by a
Structure class from the diffpy.Structure module. Currently, this
class does not have explicit knowledge of translational or other
symmetries, it basically allows to convert between absolute Cartesian
and fractional coordinates with respect to base vectors va, vb, vc.
The PDF calculator in PDFgui assumes that all structures are periodic
with the unit cell given by the base vectors va, vb, vc.
For the xyz structure format the base vectors are equal to Cartesian
axes, thus in terms of PDF calculation the structure is considered to
have a cubic lattice with a=1. Any fractional coordinates outside of
0 <= x < 1 range get shifted to their equivalent positions inside unit
cell.
I admit that loading of xyz files is not very useful in PDFgui. One
can change the lattice parameters in the phase panel, but since all
coordinates on that panel are fractional, the whole structure just
gets expanded/contracted, while all "outside" fractionals still get
shifted inside the cell.
For your case, the solution would be to preprocess the xyz structure
before loading it in PDFgui. This can be done by a Python script -
there are 2 scenarios:
(1) Calculate PDF of an aperiodic cluster. The trick is to setup
lattice parameters large enough so that atoms from translated
clusters to not contribute. Note, that the baseline of the
calculated PDF would be incorrect, as it follows
-4*pi*rho0*r, with rho0 given by the box size.
# python script
A = 50 # size of the large lattice
from diffpy.Structure import Structure, Lattice
stru = Structure(filename="cluster.xyz")
big_lattice = Lattice(A, A, A, 90, 90, 90)
# placeInLattice updates the fractional base, while preserving
# absolute Cartesian positions.
stru.placeInLattice(big_lattice)
# PDF calculation is independent of origin, but the structure
# is easier to check if it starts at [0,0,0].
import numpy
# vector of minimum values for x, y, z
xyz_min = numpy.min([a.xyz for a in stru], axis=0)
for a in a.xyz:
a.xyz = a.xyz - xyz_min
# save the updated structure
stru.write("cluster_boxed.stru", format="pdffit")
(2) Setup a big box with periodic boundary conditions. You need to
make sure all Cartesian positions in your xyz file remain inside
the 0 <= xc < A box. (You can try to generate much bigger cluster
and cut out a cubic box.) Use the same script as above, the PDF
baseline should be in this case correct.
If you are using Linux OS, the script above should run as is.
On Windows the best bet it to start pdffit2 and run it with
execfile("scriptname.py"). [pdffit2 is just a Python session
with a couple of preloaded PDF modules.]
Hope this helps,
Pavol