# How do I build and run a simulation of water molecules in NAMD?

So, I have started to learn NAMD because I need that for a project I will be doing in the next couple of months. I have some prior experience of MD with gromacs. I thought that since NAMD has a GUI frontend (VMD) it would be easier to learn but I am finding it much much harder to learn.

For my work, I need to simulate droplets of water (basically a fixed number of water molecules in vaccum, without any periodic boundary). However, I have no idea how or where to start. All of the tutorials online seems to focus primarily on proteins and how to simulate them so they are not of much help.

I tried to use the VMD solvate plugin to generate a box of solvent but there does not seem to be an option to control the actual number of water molecules (something similar to gmx solvate -maxsol 200 from gromacs). It creates a box of water molecules, however, I don't know how to change the box to a sphere and remove the periodic boundary conditions (The water molecules does not need to be shifted because the MD run will automatically push it into a spherical shape).

Finally VMD solvate seems to take the topology for water from an internal file which gives TIP3P water, however, the psf file generated does not seem to have any parameters, so I am not sure how the simulation will run.

As for running the actual equilibriation, I am running into even more problems. QwikMD does not read the psf file, and I cannot figure out any way to change the boundary condition to spherical, or remove it.

So, my question is: How do I run simulations of water in NAMD ? (with the least amount of hassle)

• Take a look at this message from the VMD e-mail list.
– Camps
Jun 14 '21 at 23:11
• @Camps Thank you, I have already seen that post. My main problem is controlling the number of water molecules, changing parameters and actually running simulation. Jun 15 '21 at 8:02
• I think you can try to stimulate difference droplets with different sizes and then count the waters on it, making a "correlation".
– Camps
Jun 15 '21 at 15:37
• My research project isn't really about correlating number of water molecules with something, it's mainly on introducing ions into the droplet and seeing how they behave, so to keep things consistent, I have been asked by my supervisor to use exactly 200 water molecules for each drop. Jun 15 '21 at 18:59
• I didn't intend you change your research project, sorry. You can always count the number of molecules and delete somes this get the desire number.
– Camps
Jun 16 '21 at 1:25

One way could be as follow.

3. Modify the file solvprotein-comment.inp: removing the info about the protein, and the ions and define the number of water molecules and the size of the droplet:
#
# Protein solvated by water and ions
#

# All atoms from diferent molecules will be at least 2.0 Angstroms apart
# at the solution

tolerance 2.0

# The type of the files will be pdb

filetype pdb

# The name of the output file

output solvprotein.pdb

# The protein will be fixed with its center of mass at center of the
# box, and no rotation (the first three zeros correspond to the position
# of the center of mass and the last three correspond to the euler
# angles of rotation, in radian, relative to the position in the input
# file).

#structure protein.pdb
#  number 0
#  fixed 0. 0. 0. 0. 0. 0.
#  centerofmass
#end structure

# Water molecules will be put inside a sphere that contains the protein.
# There will be 16500 water molecules that will be put in a sphere
# centered in the origin, and a radius of 50. Angstroms.

structure water.pdb
number 300
inside sphere 0. 0. 0. 10.
end structure

# The ions will be put in the same region as the water molecules, so
# they will be inside the water sphere and will be solvating the protein
# as well.

#structure CLA.pdb
#  number 0
#  inside sphere 0. 0. 0. 50.
#end structure

#structure SOD.pdb
#  number 0
#  inside sphere 0. 0. 0. 50.
#end structure

1. Run the program as packmol < solvprotein-comment.inp.
2. Go to charmm.gui server and generate the input for NAMD.

I run for three droplets with 300 water molecules and 5 (blue), 10 (cyan) and 15 (yellow) angstroms. The image are bellow.

• Thanks! Could you please add some information about the input from CHARMM gui and how to run it with NAMD? I can create water spheres with gromacs, my main problem is in running NAMD. (Though the packmol program seems quite handy) Jun 18 '21 at 16:42
• When you upload your system in the charmm.gui server, it will create a tar.gz file with all the files needed to run NAMD/GROMACS/etc. including the script job. You just will run that script.
– Camps
Jun 18 '21 at 17:57