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

[lammps-users] How do I generate a system.lt file?


From: Andrew Jewett <jewett@...1937...>
Date: Thu, 21 Sep 2017 19:17:53 -0700

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 system.lt file in command below?
 moltemplate.sh  -xyz  system.xyz  -atomstyle "full"  system.lt

Hi Rajesh

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

https://sourceforge.net/p/lammps/mailman/message/36039567/

https://sourceforge.net/p/lammps/mailman/message/36044331/

https://sourceforge.net/p/lammps/mailman/message/36044400/

   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 "system.lt" file (and the other files it refers to, "spce.lt") 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 "system.lt" files that come with each of these examples.  If you installed moltemplate using "pip" then visit http://moltemplate.org/download.html 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 "system.lt" file to link them together

Hope this gets you started.

Andrew

---------- 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" <lammps-users@...42...e.net>

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 "system.lt" with these contents:

 ---- "system.lt" file: ----

import "spce.lt"

wat = new SPCE [260]

 ---- end of "system.lt" 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:

moltemplate.sh -pdb YOURFILE.pdb system.lt

That's all there is to it.

This works because several of the most popular force fields (like
"oplsaa.lt" and "gaff.lt") and water models ("spce.lt" and
"tip3p_2004.lt") are included in a subdirectory that moltemplate.sh
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
"spce.lt" file (in the "force_fields" subdirectory).  It includes the
settings that Steve mentioned.  For one thing you may need to modify
the "spce.lt" 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 spce.lt.
The "force_field_OPLSAA/waterSPCE+methane/moltemplate_files/"
directory has a customized version of "spce.lt" 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
option.

Cheers

Andrew

One more random link that might be relevant:

https://sourceforge.net/p/lammps/mailman/message/31090986/