Moltemplate Home Page

(visualized using VMD and topotools )

Moltemplate 1.31 has been released on 2015-8-02. (change log) Please report bugs or broken examples (or questions) to or to the LAMMPS mailing list. (User-contributed examples and force-fields are welcome.)

DESCRIPTION

LAMMPS is an extremely flexible and customizable molecular dynamics engine. Moltemplate is a general cross-platform text-based molecule builder for LAMMPS. Moltemplate was designed for building complex coarse-grained toy molecular models, but it can be used to prepare realistic all-atom simulations as well. Nearly any kind of molecular model or force-field in LAMMPS can be represented as a moltemplate object. (This includes most user-created force-fields implemented by modifying the LAMMPS source-code). Molecule objects can be copied, combined, and linked together as building-blocks to define new molecule objects. Once built, individual molecules and subunits can be customized (atoms and bonds, and subunits can be moved and deleted). Typical objects contain atom coordinates, topology data (bonds), LAMMPS force-field data, and other LAMMPS settings (such as group definitions, constraints, fixes, and user-defined input files) for any type of molecule (or molecular subunit).

Existing LAMMPS input/data files can be converted into moltemplate (".LT") format using the "ltemplify.py" utility. (Additional manual editing may be required.)

Moltemplate requires the Bourne-shell, and a recent version of python (2.7 or 3.0 or higher), and can run on OS X, linux, or windows (if a suitable shell environment has been installed). Substantial memory required. (Between 3 and 12 GB of RAM needed per 1000000 atoms.)

Visual Examples/Tutorials:

(This is a partial list. Other examples are available for download. See menu bar at upper-left.)

Building a simple polymer (using the OPLSAA force field) (click below for input files)
Requirements: This example requires that LAMMPS is built with the optional USER-MISC package. You must also download and edit the oplsaa.prm file, and use it to create the oplsaa_subset.prm and oplsaa.lt files. (See README.TXT )
CH2 group CH2 group a simple polymer in a vacuum 1ns alkane chain in a vacuum. simulated with LAMMPS
ch3group.lt ch2group.lt alkane50.lt
system.lt
(Note: more complex shapes are possible)
README.TXT
run.in.min
run.in.nvt
Build Using:

 oplsaa_moltemplate.py oplsaa_subset.prm
 moltemplate.sh system.lt
 
Coarse-grained lipid bilayer (using the MARTINI force-field) (click below for input files)
Requirements: This example uses PACKMOL (For an alternative method, see system.lt )
MARTINI coarse-grained DPPC lipid MARTINI (2-body coarse grained) water model 13ns simulated with LAMMPS 13ns simulated with LAMMPS
README.TXT
lipid.lt
water.lt
system.lt
README_pm.txt
lipid.xyz
water.xyz
mix_lipids+water.inp
run.in.min
run.in.npt
run.in.nvt
(video)
Build Using:

 packmol < mix_lipids+water.inp 
 moltemplate.sh -xyz system.xyz system.lt

 
Translocation of a Short Polymer Through a Pore (Explicit LJ Solvent) (click below for input files)
Requirements: This example requires that LAMMPS is built with the optional RIGID package.
solvent (holes carved out for solutes) two walls (one with hole) short polymer complete system (solvent shrunk for ease of viewing)
solvent_single.lt,
solvent.lt
wall_single.lt,
walls.lt
monomer.lt,
polymer.lt
system.lt,
run.in.npt, ( video )
Build Using:

 moltemplate.sh system.lt
 
Carbon-Nanotube Capillary (all-atom, explicit water) (click below for input files)
unit cell for building graphene and nanotubes two graphene walls connected by a carbon nanotube (reader's comment: atoms near junction should be adjusted. Chiral nanotubes need special treatment.) rhombohedron of water combined system with periodic boundaries .... wetting after 300ps
graphene.lt
nanotube.lt,
graphene_walls.lt
spce.lt,
water_box.lt
system.lt,
run.in.nvt, ( video )
Build Using:

 moltemplate.sh system.lt
 
Many-Body Force-Field Example: mW Solvent + CG Hydrocarbon Mixture (Many-body force-fields can be combined with ordinary, pairwise-additive force-fields. Click below for input files.)
Requirements: This example requires that LAMMPS is built with the MANYBODY package.
mW water solvent (single particle) cyclododecane (before minimization) initial configuration 400 ps phase separation & pressure equilibration (LAMMPS simulation)
README
watmw.lt
cyclododecane.lt,
trappe1998.lt
system.lt run.in.npt ( video )
Build Using:

 moltemplate.sh -a "@atom:/WatMW/mW 1" system.lt
 
Coarse-Grained Membrane Protein click below for input files (apology)
Requirements: This example requires that LAMMPS is built with the optional USER-MISC package, before additional code is added (in that order)
coarse-grained DPPC lipid coarse-grained DLPC lipid coarse-grained protein (hydrophilic beads face inwards) initial configuration (periodic boundaries not shown) 3ns periodic boundaries and pressure equilibration
CGLipidBr2005.lt,
table_int.dat
1beadProtSci2010.lt,
system.lt run.in.npt
Build Using:

 moltemplate.sh system.lt
 
Multicomponent vesicle with protein inclusions click below for input files (apology)
Requirements: This example requires PACKMOL. LAMMPS must be built with the optional USER-MISC package, before additional code is added (in that order)
coarse-grained DPPC lipid coarse-grained DLPC lipid coarse-grained protein (hydrophilic beads face inwards) multicomponent vesicle
Moltemplate files:
README_mt.txt,
CGLipidBr2005.lt,
table_int.dat,
1beadProtSci2010.lt,
system.lt
PACKMOL files:
README_pm.txt,
DPPC.xyz,
DLPC.xyz,
protein.xyz,
step1_proteins.inp,
step2_innerlayer.inp,
step3_outerlayer.inp

LAMMPS files:
run.in.min,
run.in.nvt

This is a complex example requiring hours to set up. Please follow the instructions in the README files.
Build Using:
packmol < step1_proteins.inp    # requires 20 minutes
packmol < step2_innerlayer.inp  # at least 90 minutes
packmol < step3_outerlayer.inp  # at least 4 hours (creates system.xyz)
moltemplate.sh -xyz system.xyz system.lt

Coarse Grained Modeling

Coarse-grained molecular models often require more complex and unconventional force-fields, compared to traditional all-atom models. The LAMMPS and MOLTEMPLATE programs allow users extraordinary freedom to customize the forces acting on the atoms in a molecule (compared to older MD simulation software such as AMBER, CHARMM, GROMACS, and NAMD). This makes this software well suited for studies of coarse-grained molecules. Users can also combine radically different molecular representations together including point-like, rigid, and continuum-field/atomistic hybrids. The LAMMPS code is open-source and written in a modular style so that new force-fields and features can be easily added by end-users. (And moltemplate is written in a style to easily accommodate these changes.)
Unlimited levels of composition make it easy to build complex hierarchical assemblies frequently encountered in biology. (eg. atoms->residues->proteins->dimers->filaments->mircotubules...) CG microtubule

Force Fields

Moltemplate objects can also store force-fields for molecules whose topology has not yet been determined. Moltemplate automatically detects bonded many-body interactions (such as angles, dihedrals, and impropers), and can determine (the parameters of) the forces between them according to atom type, and bond type. (The user has complete control over how this is done.) Once a system's geometry and bonds have been specified, a user can apply different force fields to the existing system by loading a different file containing force-field parameters (and instructions for generating angle & dihedral topology) As of 2014-12-19, OPLSAA, AMBER GAFF, MARTINI(lipid example), and TraPPE(1998) are currently implemented. (Experimental. Please report problems.) Hopefully, with community support, more will be added. For usage details, download the examples, and look for the "force_field_OPLSAA" and "force_field_AMBER" directories (inside "all_atom_examples").

General Usage

 
moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-a assignments.txt] [-vmd] file.lt

Typical Usage

An LT-file containing molecule definitions can be converted to LAMMPS input files using moltemplate.sh:
moltemplate.sh system.lt
or
moltemplate.sh -xyz coords.xyz -atomstyle "full" -vmd system.lt
Either of these commands will construct a LAMMPS data file and a LAMMPS input script (and possibly one or more auxiliary input files), which can be directly run in LAMMPS with minimal editing. In the first example, the coordinates of the atoms in the system are built from commands inside the "system.lt" file. In the second example coordinates for the atoms are read from an XYZ-file, and then VMD is invoked to visualize the system just created. (PDB-files and simple 3-column coordinate files are also supported. The "full" atom style was used in this example, which is also the default. However other LAMMPS atom styles are supported, including hybrid style-lists, enclosed in quotes.)

License

Moltemplate is free and is available under the terms of the open-source 3-clause BSD license:
January 13, 2015
Andrew Jewett