Giter Club home page Giter Club logo

Comments (2)

jewettaij avatar jewettaij commented on July 26, 2024

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.)

Other comments:

  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).

from moltemplate.

jewettaij avatar jewettaij commented on July 26, 2024

(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!)

from moltemplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.