LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] SPC/e water model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] SPC/e water model

From: "R. Varsha" <varsharani.0909@...24...>
Date: Mon, 18 Sep 2017 12:42:22 +0530

Hello Andrew,

I have generated lammps data file ( for spc/e water model through moltemplate. And I can visualize that in VMD by topo command which is as follows-
in TK console > topo readlammpsdata full

Now I want to add ions in that water box. For that first we need pdb and psf files for that system as inputs to autoionize.
I have created pdb and psf files in VMD by using following commands-
animate write pdb system.pdb
animate write psf system.psf

These files has been generated successfully.
But When I did autoionize to add ions. I got error that my psf file is in charmm format & it should be in x-plor format.
I tried other commands also to get x-plor format of psf such as
writepsf x-plor system.psf
writepsf X-PLOR system.psf
writepsf card name "system-xplor.psf" xplor

but nothing happened with these commands

So first my query is that NAMD and VMD generates psf file in x-plor format by default ..then why my psf file is not created in x-plor format.
And secondly how can I convert psf file format from charmm to xplor.



On Fri, Sep 15, 2017 at 8:54 AM, Andrew Jewett <jewett@...1937...> wrote:
On Wed, Sep 13, 2017 at 10:49 PM, R. Varsha <varsharani.0909@...24...> wrote:
> Dear Andrew,
> I went through moltemplate to create spc/e water model data file by loading
> the pdb file which I had created in the VMD already.  I got the data file
> for spc/e water model. But here I am unable to get files related to spc/e
> water box so that I can see that water box in vmd.

If you have already installed moltemplate, then all you need to do is

1) Create a file "" with these contents:

 ---- "" file: ----

import ""

wat = new SPCE [260]

 ---- end of "" file ----

(In this example, "260" is the number of water molecules in the PDB
file you created by vmd.  Change it for your PDB)

2) Then run moltemplate this way: -pdb YOURFILE.pdb

That's all there is to it.

This works because several of the most popular force fields (like
"" and "") and water models ("" and
"") are included in a subdirectory that
looks in whenever it can't find a file you requested.  If you get the
chance, you really should take a look at the contents of the the
"" file (in the "force_fields" subdirectory).  It includes the
settings that Steve mentioned.  For one thing you may need to modify
the "" file if later you want to mix SPC/E water with molecules
that use a slightly different (but equivalent) pair_style.  (For
example, the OPLSAA force field uses pair_style lj/cut/coul/long
instead of lj/charmm/coul/long, currently used by default in
The "force_field_OPLSAA/waterSPCE+methane/moltemplate_files/"
directory has a customized version of "" for use with OPLSAA.)

Unfortunately, you would not even know these files exist or where to
find them if you installed moltemplate the easy way using:

pip install moltemplate

...all of the examples and documentation will be omitted or hidden
from view.  I'm not sure how to handle this issue.  If I start getting
a lot more questions like this, I'll remove the pip/pypi installation



> And when I use the first approach that is vmd topotools to generate data
> file for that water box which is TIP3P, I found some errors in that. I am
> interested to know that how can I convert this data file into spc/e data in
> VMD.
> On Thu, Sep 14, 2017 at 1:18 AM, Steve Plimpton <sjplimp@...24...> wrote:
>> I don't know about the VMD part, but on the LAMMPS
>> side you just need a few different params in your
>> pair style for SPC/E vs TIP3P,  See Section howto 6.7
>> thru 6.9.
>> Steve
>> On Wed, Sep 13, 2017 at 2:27 AM, Andrew Jewett <jewett@...1937...> wrote:
>>> My impression was that once you have generated the atom coordinates in
>>> VMD, you would use Axel's topotools to create the LAMMPS data file and input
>>> script with the force field parameters.  Since you choose these force field
>>> parameters manually, they could be either TIP3P or SPC/E, or anything else
>>> you desire.
>>> Alternatively you could save the coordinated as an .XYZ or .PDB file and
>>> load them into moltemplate and then choose SPC/E or TIP3P water.  Those
>>> water models are already included with moltemplate, so you don't have to
>>> specify the parameters manually.  There's an example/tutorial how to do this
>>> included with moltemplate.  Currently, you can also get the files for that
>>> example here:
>>> (The URL for these files could change in the future.)
>>> This exact topic is also discussed in chapter 4 of the moltemplate
>>> manual.  This is the main introductory chapter, and it is only a few pages
>>> long.
>>> I hope this gets you started.
>>> Cheers.
>>> Andrew
>>> On Sep 12, 2017 11:57 PM, "R. Varsha" <varsharani.0909@...24...> wrote:
>>>> Hello everyone,
>>>> I want spc/e water model for my simulation. I have created a water box
>>>> in VMD but it is TIP3P by default.
>>>> Is there a way to create spc/e water model in vmd.?
>>>> Thanks,
>>>> Regards
>>>> Varsha
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites,!
>>>> _______________________________________________
>>>> lammps-users mailing list
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites,!
>>> _______________________________________________
>>> lammps-users mailing list