Watr and salt (VMD, LAMMPS, TopoTools)

bennerTop.jpg

Hello again, Axel. Good day.

I’m trying to set up a system with water and NaCl using VMD, LAMMPS and TopoTools. But I’m having problems with Autoionize (to add Na abd Cl ions in my water box).

ionized.pdb (67.3 KB)

ionized.psf (93.3 KB)

tip4p-after1ns.pdb (72 KB)

tip4p-20Abox.psf (100 KB)

tip4pfromlammps.pdb (232 KB)

tip4pfromlammps.psf (288 KB)

data.tip4p (297 KB)

[...]

(annoying scientific advertising spam deleted)

Hello again, Axel. Good day.

I'm trying to set up a system with water and NaCl using VMD, LAMMPS and
TopoTools. But I'm having problems with Autoionize (to add Na abd Cl ions
in my water box).

--------------------
Here is what I did:
1. I obtained a LAMMPS data file for a TIP4P cubic water box, containing
only O and H (no massless atoms).
2. I converted this LAMMPS data file to psf and pdb files using some
TopoTools commands.
       * topo readlammpsdata data.tip4p full
        topo guessatom lammps data
        animate write psf tip4pfromlammps.psf xplor * #I tried
with/without "xplor" at the end, but same result#
        *animate write pdb tip4pfromlammps.pdb xplor*
3. I entered the PSF and PDB files of my water box in the GUI of "Add
ions" tool in VMD
4. I received an error that says: error reading atoms
*vmd > DEBUG: command_line = -psf
{/home/hannahebro/Documents/mdm_research/mysims/building_structures/water/waterfromlammpsdata/tip4pfromlammps.psf}
-pdb
{/home/hannahebro/Documents/mdm_research/mysims/building_structures/water/waterfromlammpsdata/tip4pfromlammps.pdb}
-o ionized -seg ION -nions {{SOD 10} {CLA 10}} -from 5 -between 5
Autoionize) Reading
/home/hannahebro/Documents/mdm_research/mysims/building_structures/water/waterfromlammpsdata/tip4pfromlammps.psf//home/hannahebro/Documents/mdm_research/mysims/building_structures/water/waterfromlammpsdata/tip4pfromlammps.pdb...
psfgen) clearing structure, preserving topology and aliases
psfgen) reading structure from psf file
/home/hannahebro/Documents/mdm_research/mysims/building_structures/water/waterfromlammpsdata/tip4pfromlammps.psf
BAD ATOM LINE IN PSF FILE:
: 1 1 O 1 -1.048400 15.9994 0

psfgen) error reading atoms*
----------------------

I thought the problem was with my converted psf. So I also tried this:

yes. this is absolutely the problem. as it says *explicitly* in the
description for generating the .psf/.pdb those are for *visualization only*.

a lammps data file and a .psf file are on rather extreme ends of how
to provide topology information. a lammps data file is far more flexible,
but a lot of information is already stripped off, while a .psf file has only
little of it and has to be preprocessed by the MD code in combination
with a parameter file to be complete. as a consequence, it is not
trivial to interconvert between the two. for visualization much *less*
information is needed than for a simulation.

1. I obtained equilibrated psf and pdb files for TIP4P water (didnt come
from LAMMPS data file; filenames are: tip4p-20Abox.psf, tip4p-after1ns.pdb)
2. I entered these in the GUI of "Add ions" tool in VMD
3. There was no error. The display showed the water molecules and the ions
successfully.

I also tried manually modifying the converted psf and pdb files and copied
the format of the successful ones, but I got this error: "Line too short in
psf file. Couldn't read atom 0".
I attached here the files I used and generated. Please check them when you
have time. I'm sorry to ask this much favor from you. But I'm really stuck
now.

if you want to use modeling tools provided with VMD, you have to
stick with the file formats (i.e. .psf) that VMD/psfgen use, or you
have to fix up your psf with additional scripting to be complete.
VMD has tutorials that explain the structure of a .psf file.
please note, that if you make sure that the order of coordinates
is the same, you can always take an intitial .psf file and then
add coordinates from a LAMMPS MD run to it. the .psf file only
contains the topology information.

in general, you are doing things, where it is impossible to rely
100% on the scripts that you use without knowing (and checking)
the corresponding file formats.

like i frequently say: there ain't no escape from the blues!

ciao,
    axel.