I want to model some cells with liquid water using VASP. I use the Packmol package to generate the initial configuration, but when I try to convert the pdb output file into the POSCAR format, the positions are completely messed up. This is the input file for Packmol, which places 17 H2O molecules in a 5x5x20 Angström box:
#
# A box with water
#
tolerance 2.0
filetype pdb
output water_box.pdb
structure water.pdb
number 17
inside box 0. 0. 0. 5. 5. 20.
end structure
This looks fine when I open the output file in VESTA, all molecules are within the stated confines with reasonable minimal distance:
But this structure contains no cell information. When I export the data as POSCAR format, the cell looks like this:
The positions are messed up and the minimal distance between molecules is not preserved. As such, some of these molecules are not recognizable as H2O anymore.
I get exactly the same result, when I copy the atomic positions from the .pdb file and place them in a POSCAR file manually.
How can I convert the pdb file into the POSCAR format properly?