Debian Codegraph @

examples/all_atom/force_field_OPLSAA/waterTIP3P+methane/README.md

raw
1 Methane, water mixture
2 ====================
3 This example contains a mixture of water(SPCE) and methane. The methane molecules use OPLSAA force-field, but the water molecules do not. The water molecules were initially arranged in a rectangular lattice. The methane molecules were also arranged in a lattice, and were shifted to avoid overlap with the water molecules. *(Alternatively, you can create a single lattice and specify the number of water and methane molecules you want in it using moltemplate's "new random([],[])" command, which is explained in [the manual](http://moltemplate.org/doc/moltemplate_manual.pdf#subsubsection.8.9.1). This gives you more control over the concentration of each ingredient. You can also use PACKMOL to create random mixtures of molecules.)*
4
5
6 ## Details
7
8 The methane molecules in this example use the OPLSAA force-field. This means that the database of force-field parameters in the [oplsaa2024.lt file](../../../../moltemplate/force_fields/oplsaa2024.lt) will be used to generate angles, dihedrals, and impropers. The [methane.lt file](moltemplate_files/methane.lt) contains these lines which refer to OPLSAA:
9 ```
10 import "oplsaa2024.lt"
11 Methane inherits OPLSAA { ... } # (see "methane.lt")
12 ```
13 However the "SPCE" (water) molecules does NOT use a database to look up the force-field parameters for this tiny molecule. Instead, the [spce.lt file](moltemplate_files/spce.lt) declares all of the angle interactions, atom properties and force-field parameters for water explicitly. (Consequently, it makes no mention of "OPLSAA".)
14
15 ### Instructions
16
17 More detailed instructions on how to build LAMMPS input files and
18 run a short simulation are provided in other README files.
19
20 1) To build the files which LAMMPS needs, follow the instructions in:
21 [README_setup.sh](README_setup.sh)
22
23 2) To run LAMMPS with these files, follow these instructions:
24 [README_run.sh](README_run.sh)
25
26 (The instructions in "README_remove_irrelevant_info.sh" are optional. *(If you notice a problem with this example, please [report it](../README.md).*)
27
28
29 ### Customizing atomic charges
30
31
32 LAMMPS provides two different methods to specify atomic charges:
33 1) Specify charges in a DATA file (eg "system.data")
34 2) Specify them using "set" commands
35
36 This is a complicated example because *both* methods were used.
37 This is because some of the atoms use the OPLSAA force field, and others do not.
38
39 Since the SPC/E water molecules do *not* use the OPLSAA
40 force field, their charges are specified in the ordinary way
41 (ie. in the "Data Atoms" section of the
42 ["spce.lt"](moltemplate_files/spce.lt) file).
43 (After running moltemplate.sh, this information will be written to the
44 "Atoms" section of the "system.data" file created by moltemplate.)
45
46 However the charges of atoms belonging to molecules that use the OPLSAA force
47 field (such as methane, in this example) are determined by their @atom types
48 *(according to a lookup table located at the beginning of the
49 ["oplsaa2024.lt"](../../../moltemplate/force_fields/oplsaa2024.lt) file)*.
50 After running moltemplate.sh, this information will be written to the
51 the "system.in.charges" file created by moltemplate.
52 For these OPLSAA atom types, we never bother to specify their charges in
53 the "Data Atoms" section. The information in the "system.in.charges"
54 file overrides it, since LAMMPS reads it after reading the "system.data" file.
55 (See the ["run.in.nvt"](run.in.nvt) file for details.)
56
57 **This can be overridden.**
58 See [here](../README.md#Customizing-atomic-charges-in-OPLSAA-molecules)
59 for instructions how to customize atomic charges.
60