LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How do I generate a file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] How do I generate a file?

From: Rajesh <creativeidleminds@...24...>
Date: Fri, 22 Sep 2017 12:56:38 +0530

Dear Andrew,
Thank you for such a nice response. Actually, I dont want force fields parameters to be includes except box dimensions and required atom style.

On Fri, Sep 22, 2017 at 7:47 AM, Andrew Jewett <jewett@...1937...> wrote:
On Sep 20, 2017 12:07 AM, "Rajesh" <creativeidleminds@...24...> wrote:
I have a pdb file to convert to lmpdata but I dont understand what to write in file in command below?  -xyz  -atomstyle "full"

Hi Rajesh

   This comes up fairly often.  Here are some links to discussions on this topic: 

   Generally speaking a PDB or XYZ file only contains coordinates for the atoms in your system.  (Thats all moltemplate reads, anyway.  Moltemplate ignores anything else in these files.)  The "" file (and the other files it refers to, "") defines (nearly) everything else that goes on in your simulation: bonds, atom types, force field parameters and rules, groups, constraints, rules for breaking and forming bonds during the simulation (if applicable), ...
    Learning moltemplate requires looking at the examples that come with it.  Start by reading the short 2-line example in the email I forwarded to you below.  Then  read chapter 4 (and 6) of the moltemplate manual (about 7 pages each).  Then take a look at the "examples/all_atom" directory which comes with moltemplate and choose a system similar to what you are interested in. There are "" files that come with each of these examples.  If you installed moltemplate using "pip" then visit and download the complete package (it includes all of the examples).
    The ATB database might also be a good source for definitions of molecules you want to put in your simulations.  It creates files which moltemplate can read for almost any small organic molecule.  Then you just need a "" file to link them together

Hope this gets you started.


---------- Forwarded message ----------
From: "Andrew Jewett" <jewett@...1937...>
Date: Sep 14, 2017 8:24 PM
Subject: Re: [lammps-users] SPC/e water model
To: "R. Varsha" <varsharani.0909@...24...>
Cc: "Steve Plimpton" <sjplimp@...24...>, "lammps" <>

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



One more random link that might be relevant: