bjmorgan / vasppy

A Python suite for manipulating VASP input and output
MIT License
44 stars 27 forks source link

Calculated RDF value goes down to 0 after half distance of lattice constant? #28

Closed Potioner closed 10 months ago

Potioner commented 10 months ago

Hi,

As described in the title, I found this issue when I used a relatively small supercell. Please see below. The lattice for this system is: 11.226595 0.000000 0.000000 0.000000 11.226595 0.000000 0.000000 0.000000 11.226595 Picture1

I guess vasppy will automatically set the half distance of lattice constant as the cut-off when calculating RDF? if it is, how can I change this cut-off?

bjmorgan commented 10 months ago

The code applies the minimum image convention to all interatomic distances, as the maximum distance a pair of atoms can be separated by is half the unit cell repeat distance.

If you want to generate an RDF at longer separations (and do not care about the artefacts that you will get from wrapping around the periodic boundaries) you can convert your input structures into supercells before passing them to the RDF calculation function.

e.g., in pymatgen, you can create a series of 2 × 2 × 2 supercells using

supercell_structures = [s * [2,2,2] for s in structures]