specifying angles, diherals, impropers explicitly in miltemplate

Dear Dr. Jewett,

I am trying to use Moltemplate to create LAMMPS input files for hexafluorophosphate (PF₆⁻) but am having an issue with the angle parameters. Because the molecule has an octahedral geometry, there are two types of angles, one at 90 degrees and the other at 180 degrees, but both types of angles are between the same atom types (F-P-F). I have the force field parameters for both of these angles, but since they involve the same atom types I do not know how to distinguish them in the force field file. I am currently only able to generate LAMMPS data files with all 15 angles being classified as the same type.

Is there some way to get Moltemplate to distinguish between the 90 and 180 degree angles in the molecule and assign them different parameters?

Firstly I’m typing this on my phone quickly during a break so I worry the message doesn’t get garbled by the spelling “correction” features of the mail app.

Regarding your question, yes. I can think of two ways:

  1. You are not required to use force field angle-generation rules. (Such as the rules in the “Data Angles By Type” section of the “oplsaa.lt” file.) You can provide a list of the angles (and dibedrals and impropers) that you want in your molecule by including a write(“Data Angles”) section within the definition of the hexafluorophosphate molecule. (In a similar way you can list the dihedrals and impropers explicitly as well, by listing them in a “Data Dihedrals” or “Data Impropers” section.)
    This is demonstrated on the “lipid.lt”, “CGLipidBr2005.lt,” and “spce.lt” files included with the lipid and water examples here:

http://moltemplate.org/visual_examples.html

Note: You can use a combination of atom type force-field rules and explicit angle lists in your definition of a molecule. In other words you could use force field rules to define all the angles in the rest of your molecule and provide explicit angles for the 90 degree and 189degree F-P-F triplets. These explicit rules will override any implicit rules for those atoms, …unless the “-overlay-angles” argument is used in which case multple angles will be defined for those triplets. Probably not what you want…)

This is what I would do in your case. But for completeness, here’s an alternate approach:

  1. Alternately, you could create two different types of “F” atoms with “Data Angles By Type” section with 3 rules. Two rules for angles containing 180 degree parameters for these interactions:

F1-P-F1

F2
P
F2

… and a rule containing g 90-degree parameters for F1-P-F2 interactions, as in:

F1
P-F2

Just make sure that the same masses and lennard-jones parameters are defined for the F1 and F2 atom types. If they are involved in Dihedrals or improper interactions then you can avoid having to define extra rules for them by using wildcards characters *).

There’s a simple heteropolymer example that uses a simple user-created force field on this web page:

http://moltemplate.org/examples/force_fields/index.html

(click on the “forcefield.lt” file and open it with a text editor.)

In your case, you could either write your own force field for this molecule from scratch as in that example, or augment an existing force field (such as “oplsaa.lt”) to add your own custom rules as was done with the “loplsaa.lt” file here:

https://github.com/jewettaij/moltemplate/blob/master/moltemplate/force_fields/loplsaa.lt

https://github.com/jewettaij/moltemplate/blob/master/moltemplate/force_fields/oplsaa.lt

(It’s complicated because I had to use the “replace” command and some wildcard tricks to avoid having having to redefine all of the Dihedrals and impropers for the new atom types we added in “loplsaa.lt”.)

Again, this is not what I would do. I would use solution 1 in your case.

I hope this helped.

Andrew