The "moltemplate" molecule builder can be used to quickly create
LAMMPS data files and input-scripts for arbitrary small organic
molecules.
It already automatically generates force-field parameters according to
AMBER GAFF conventions. However, thanks to Jason Lambert, moltemplate
can automatically assign force-field parameters and charges using
OPLSAA conventions (in addition to automatically generating angle,
dihedral, and improper interactions, as before). This is a relatively
simple process:
1) Create a file which defines a molecule in moltemplate (.lt) format.
The atoms in that file should use OPLSAA atom name conventions. (See
"ethylene.lt" file attached for a simple example.)
2) Edit "oplsaa.txt" file to delete atoms (lines beginning with the
word "atoms") which you don't need in your simulations. Then save the
new file as "oplsaa_subset.txt"
3) Run Jason Lambert's "oplsaa_moltemplate.py" script:
./oplsaa_moltemplate.py oplsaa_subset.txt
4) Run moltemplate:
moltemplate.sh system.lt
I have attached a complete example of how to set up a simulation ethylene gas.
I also attached the latest version of moltemplate.sh (v1.19), which
you will need. (Copy that file to the "src" directory where you
currently have moltemplate.sh.) In the near future, all of these
files will be included automatically with moltemplate. (Newer
versions will contain corrections, so in the future, please look in
the moltemplate/tools directory instead of using the files attached
this post.)
Note: The OPLSAA implementation in moltemplate currently uses
pair_style lj/cut/coul/long 10.0 10.0
If this is not appropriate for OPLSAA, please let me know...
Disclaimer: This code, and this example was just created recently and
(apart from a short simulation which did not crash), we have not
tested it rigorously for accuracy.
As always, please let us know if there are bugs.
Cheers!
(Thanks to Jason for volunteering his code!)
Andrew
ethylene_2013-4-01.tar.bz2 (147 KB)
moltemplate.sh.bz2 (12.5 KB)
ethylene.lt (1.5 KB)
system.lt (511 Bytes)