Closed YunxingZuo closed 2 years ago
Hi YunxingZuo. Here is a picture of ethene:
h11 h21
\ /
c1 == c2
/ \
h12 h22
Unless the angles, dihedrals, and impropers are explicitly listed in the molecule definition (see spce.lt, for example), the dihedral interactions will be generated automatically by looking for every possible way that 4 atoms in your molecule can be directly connected by covalent bonds. In this molecule, there are 4 ways:
h11 -- c1 == c2 -- h21
h11 -- c1 == c2 -- h22
h12 -- c1 == c2 -- h21
h12 -- c1 == c2 -- h22
so moltemplate.sh will generate all 4 of them. I think nearly all molecular simulation preparation programs do something similar to this.
If you are curious, the type of the dihedral interaction is named "@dihedral:046_047_047_046" (because the H and C atom types belong to the the 046 and 047 bond type groups, which are defined by "replace" statements). For details, see lines 1974, 1975, 7082 of the oplsaa.lt file. (Incidentally, the "replace" statement used in that is explained here and demonstrated in a more simple version of the "oplsaa.lt" file here. Download the "oplsaa_simple.lt" file located there and open it up in a text editor to see how it works. Moltemplate users don't necessarily need to understand these messy details to use moltemplate. But you seemed a little bit more interested in how things work, so I thought I'd add some links in case they help.)
1) There's an example using ethene with the OPLSAA force field here (named ethylene.lt). It is very similar to your file, but the $atom names are easier to understand. 2) Incidentally, after you build your system using "moltemplate.sh system.lt", there are many different atom types (and bond types, etc...). This is because (by default) the files that moltemplate.sh generates (including system.data, system.in.settings) will contain all of the atom types and force-field parameters in the entire OPLSAA force field, even if you only need a few of them. To clean this up, you can try running:
cleanup_moltemplate.sh
(documented here to simplify your system.data and system.in.* files. Your new files will only have 2 atom types, 3 bond types, 2 dihedral types, and 1 improper type (I think).
(I should warn you that I have very limited time to provide technical support at the moment. I just started a new job. But hopefully, this gets you started. I appreciate your efforts to contact me to report bugs in moltemplate.sh. If you find more bugs in moltemplate or its examples, I will definitely respond. Thanks for doing that!)
Hi Andrew,
Attached are the
chemical.lt
for a simple ethene molecule and the correspondingsystem.lt
. When I followed the guideline and usedpath/moltemplate.sh system.lt
, I found 4 dihedrals insystem.data
, which doesn't seem make sense as all the atoms in ethene lie in one plane. Please let me know what you think about this. Thanks!chemical.lt
system.lt
system.data