LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] information needed to make an LT (moltemplate) file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] information needed to make an LT (moltemplate) file


From: Andrew Jewett <jewett@...1937...>
Date: Tue, 31 Oct 2017 08:36:12 -0700

On Tue, Oct 31, 2017 at 3:18 AM, MD Simulation
<mdsimulationgroup@...24...> wrote:
> Thanks for the detailed reply!
> My main question was, how do you typically generate your moltemplate input
> files?  Do you have a set of scripts to convert xyz coordinates to input
> files?  It looks like it would take a long time to type out all the bonds,
> angles and dihedrals from an input file.

Hi Carrie

    All of the .LT files that come with moltemplate were generated by
hand. However it is not usually that much information.  They tend to
be short.  The coordinates can often be omitted (see below).

   As an alternative to writing LT files by hand, I suspect in the
future, a significant number of moltemplate users will download .LT
files from the ATB database.  They have what appears to be an
extremely large database of molecules already in moltemplate format
https://atb.uq.edu.au/

   If you are building these files by hand only things you usually
need to list are 1) the atom types, 2) a list of bonds between atoms
(3, atom charges, in some cases)

  Traditional molecule building software will attempt to infer this
information automatically from a PDB file.  Moltemplate was designed
to allow users to create coarse grained molecules where the number of
particles and bonds per molecule is typically much shorter than an
all-atom molecule, and PDB files are mostly irrelevant.  It might not
be the right tool for you if you have a lot of PDB files, and/or if
you are simulating large all-atom biomolecules.

   It's worth mentioning that you only have to specify this
information once for every -type- of molecule.  Suppose you have 1000
acetone molecules in your simulation.  Acetone has 10 atoms and 9
bonds, so the .LT file you need to write would contain approximately19
lines (plus a couple of additional lines to specify the number of
copies of acetone you want, and specify the simulation boundaries).

--- angles, dihedrals, impropers: ---

You almost never need to explicitly list the angles, dihedrals, or
impropers in a molecule.  The MARTINI lipid example I forwarded you
below omits them.  If you are using a force field (eg OPLSAA, GAFF,
COMPASS, MARTINI, etc...), then the force field generates those for
you.  However you can specify angles, dihedrals, and impropers
explicitly if you want to, and the interactions you specify will
augment or override the interactions generated by the force field.

--- charges: ---

You can usually omit the atom charges as well.  Force fields like
OPLSAA (before OPLSAA3) and COMPASS and PCFF (but not GAFF) specify
the atomic partial charges as well.  For these force fields, you can
leave the charges in your molecule (4th column) as 0, if you like.
moltemplate will generate a list of "set" commands which will assign
charges to the atoms after you read the data file.

--- coordinates: ---

If you have a PDB or XYZ file containing the atomic coordinates of
your system, you can run moltemplate.sh with the "-pdb" or "-xyz"
arguments to read these coordinates from a file. (And in your .LT file
describing the molecule you can set the x y z coordinates (5th, 6th,
7th columns) to 0 0 0, if you like)

Alternatively, you can make a crude guess at what the coordinates
should be and use LAMMPS' minimize command to relax the molecule.

If you think it would be useful to have a script which copies
coordinates from an XYZ file or a PDB file into an individual LT file,
I can add this functionality to moltemplate.

--- ATB database ---

If you don't want to generate LT files manually, then you can download
.LT files describing molecules from the ATB database.  (And these will
also include coordinates, charges, angles, dihedrals and impropers all
listed explicitly.)  Presumably, these molecules have been carefully
parameterized and are safe to use.

> Thank you again,

Your welcome.  I don't know if I helped.

Andrew

Here's the MARTINI lipid example again.
(In this example, the charges and coordinates were specified, however
in most cases, they can be set to 0.)

import "martini.lt"
DPPC inherits MARTINI {
  # atomID   molID  atomTyle  charge     X        Y          Z
  write('Data Atoms') {
    $atom:NC3 $mol:. @atom:Q0   1.0   0.485   0.515   2.472
    $atom:PO4 $mol:. @atom:Qa  -1.0   0.589   0.568   2.201
    $atom:GL1 $mol:. @atom:Na   0.0   0.509   0.536   1.838
    $atom:GL2 $mol:. @atom:Na   0.0   0.772   0.531   1.760
    $atom:C1A $mol:. @atom:C1   0.0   0.396   0.476   1.453
    $atom:C2A $mol:. @atom:C1   0.0   0.446   0.522   1.174
    $atom:C3A $mol:. @atom:C1   0.0   0.421   0.596   0.897
    $atom:C4A $mol:. @atom:C1   0.0   0.434   0.607   0.553
    $atom:C1B $mol:. @atom:C1   0.0   0.922   0.644   1.490
    $atom:C2B $mol:. @atom:C1   0.0   0.943   0.481   1.201
    $atom:C3B $mol:. @atom:C1   0.0   0.926   0.607   0.904
    $atom:C4B $mol:. @atom:C1   0.0   0.936   0.514   0.557
  }
  write('Data Bond List') {
    $bond:b1 $atom:NC3 $atom:PO4
    $bond:b2 $atom:PO4 $atom:GL1
    $bond:b3 $atom:GL1 $atom:GL2
    $bond:b4 $atom:GL1 $atom:C1A
    $bond:b5 $atom:C1A $atom:C2A
    $bond:b6 $atom:C2A $atom:C3A
    $bond:b9 $atom:C3A $atom:C4A
    $bond:b10 $atom:GL2 $atom:C1B
    $bond:b11 $atom:C1B $atom:C2B
    $bond:b12 $atom:C2B $atom:C3B
    $bond:b12 $atom:C3B $atom:C4B
  }
}



> Carrie
>
> On Tue, Oct 31, 2017 at 12:53 AM, Andrew Jewett <jewett@...1937...> wrote:
>>
>> Hi Carrie
>>
>>
>> Generally speaking, all of these files were converted from files
>> available at this web site
>> http://cgmartini.nl/index.php/downloads
>>
>>    The "lipid.lt" file was paintstakingly generated by hand by Saeed
>> Momeni Bashusqeh.  This is a model of the DPPC lipd.  However the
>> Martini force field supports many lipid types, cholesterol, and amino
>> acids.
>>
>> Saeed and David Stelter and I attempted to convert more MARTINI
>> molecule files into moltemplate, however I have not tested them yet to
>> see if they work well.
>>
>> There are newer versions of these files in the "examples" directory
>> that is included with moltemplate, and is currently online at:
>>
>>
>> https://github.com/jewettaij/moltemplate/tree/master/examples/coarse_grained/MARTINI_examples/MARTINI_lipid_files
>> There's an example of one of these files at the end of this email.
>> (All of the force field information was left out.)
>>
>>   David made an attempt to convert cholesterol as well, but we haven't
>> tested it.  All of these files require the "martini.lt" force field
>> file which was generated by David Stelter (who wrote a script to
>> convert force field parameters from the EMC .prm file format).  The
>> "martini.lt" file is in the "moltemplate/force_fields" subdirectory
>> bundled with moltemplate.
>>
>>    This is much more general than the example you found, but I worry
>> all of these files could be buggy.
>>    I have not had time to make more examples that use these new files
>> or test them.  If you are brave enough to try using these files, I
>> will help you if you get stuck.
>>
>>
>> DPPC inherits MARTINI {
>>
>>   # atomID   molID  atomTyle  charge     X        Y          Z
>>   write('Data Atoms') {
>>     $atom:NC3 $mol:. @atom:Q0   1.0   0.485   0.515   2.472
>>     $atom:PO4 $mol:. @atom:Qa  -1.0   0.589   0.568   2.201
>>     $atom:GL1 $mol:. @atom:Na   0.0   0.509   0.536   1.838
>>     $atom:GL2 $mol:. @atom:Na   0.0   0.772   0.531   1.760
>>     $atom:C1A $mol:. @atom:C1   0.0   0.396   0.476   1.453
>>     $atom:C2A $mol:. @atom:C1   0.0   0.446   0.522   1.174
>>     $atom:C3A $mol:. @atom:C1   0.0   0.421   0.596   0.897
>>     $atom:C4A $mol:. @atom:C1   0.0   0.434   0.607   0.553
>>     $atom:C1B $mol:. @atom:C1   0.0   0.922   0.644   1.490
>>     $atom:C2B $mol:. @atom:C1   0.0   0.943   0.481   1.201
>>     $atom:C3B $mol:. @atom:C1   0.0   0.926   0.607   0.904
>>     $atom:C4B $mol:. @atom:C1   0.0   0.936   0.514   0.557
>>   }
>>
>>   write('Data Bond List') {
>>     $bond:b1 $atom:NC3 $atom:PO4
>>     $bond:b2 $atom:PO4 $atom:GL1
>>     $bond:b3 $atom:GL1 $atom:GL2
>>     $bond:b4 $atom:GL1 $atom:C1A
>>     $bond:b5 $atom:C1A $atom:C2A
>>     $bond:b6 $atom:C2A $atom:C3A
>>     $bond:b9 $atom:C3A $atom:C4A
>>     $bond:b10 $atom:GL2 $atom:C1B
>>     $bond:b11 $atom:C1B $atom:C2B
>>     $bond:b12 $atom:C2B $atom:C3B
>>     $bond:b12 $atom:C3B $atom:C4B
>>   }
>>
>> }
>> DPPC.scale(10)  #(coords from cgmartini.lt use nanometers, not angstroms)
>>
>> Cheers
>>
>> Andrew
>>
>> On Sat, Oct 28, 2017 at 5:32 AM, MD Simulation
>> <mdsimulationgroup@...24...> wrote:
>> > Hi Andrew,
>> >
>> > I've been looking over the Moltemplate manual and examples (trying to
>> > learn
>> > to use it), and had a small question about the .lt files.  How are those
>> > made?  For instance, the lipid.lt
>> > (http://www.moltemplate.org/examples/martini_DPPC_bilayer/lipid.lt) file
>> > has
>> > a bunch of text so I can't imagine someone typing that out.  How are
>> > bonds,
>> > angles, dihedral (force field interactions) determined?
>> >
>> > Thanks for the help!
>> > Carrie
>
>