Making data file with a hybrid force-field

Dear all

I’m going to simulate a system comprised of diverse types of materials, such as crystal, protein, and ions.

But, I found it really tremendous to make a data file for a huge system based on a hybrid force-field (for example a combination of ClayFF and OPLS).

I already tried topotool in vmd, but, it lacks such general ability.

Is there any proper software or code for this task?

I’m really curious to understand how others deal with such systems as claimed in the literature !!

Bests

Sent with Mailtrack

Hi Robert, this can be done with the assistance of other tools, but oftentimes within LAMMPS itself:
http://lammps.sandia.gov/doc/pair_hybrid.html

Dear Giacomo

I’m aware of specifying force field styles in lammps. But, I’m seeking tools for generating data file conveniently
for a diverse system of various force fields!

It takes a long time (if be correct!) to write a data file in notepad!

Dear all

I'm going to simulate a system comprised of diverse types of materials,
such as crystal, protein, and ions.

But, I found it really tremendous to make a data file for a huge system
based on a hybrid force-field (for example a combination of ClayFF and
OPLS).

I already tried topotool in vmd, but, it lacks such general ability.

​you can still generate a data file, but just leave out the force field
information. it is the better approach anyway. ​just put your pair_coeff
statements into the input file or put them into a separate file and use
"include".

*Is there any proper software or code for this task? *

​the biggest problem here is that what you are trying to do is not "proper"
in the first place, but rather a crutch that people use, if they have no
other, better options.​

​since this is specific to your choice of force fields, there is little use
to try and generalize and automate that. this can be done for setups, where
you use only a single force field, but if you are mix and matching multiple
force field, the generation of the mixed term is ambiguous. so you'll first
have to decide how to do this. you most certainly will have to generate and
specify those mixed interactions explicitly.

the easiest way to deal with this is to write a script/program that
implements the "rules" that you decide on and then outputs the necessary
LAMMPS commands so they can be captured in a file.
​this at least takes away the risk of typos and violations of the expected
format. ​editing files that have to follow a specific format in a plain
text editor is something that you don't want to do anyway, except for the
simplest of cases. writing a script/tool/program to do this is almost
always preferred.

I'm really curious to understand how others deal with such systems as
claimed in the literature !!

​you should ask those people. that is why papers have "corresponding
authors" (at least in theory, that is).

axel.​

If you are going to use a hybrid force field, I recommend that you
remove all of the force field parameters from your DATA file, and put
them in a LAMMPS input script (such as "pair_coeff", "bond_coeff",
"angle_coeff",.... commands:
http://lammps.sandia.gov/doc/pair_coeff.html
http://lammps.sandia.gov/doc/bond_coeff.html
http://lammps.sandia.gov/doc/anble_coeff.html
http://lammps.sandia.gov/doc/dihedral_coeff.html
http://lammps.sandia.gov/doc/improper_coeff.html
(In fact, if you are using hybrid pair_styles, I don't think you have a choice.)
Actually, I recommend doing this anyway, just because it gives you so
much more control over the system, and it allows you to load in your
force field parameters independently from your starting geometry and
topology information. As Axel said, this way you can build the DATA
file independently with and then specify the force field parameters
later manually using these "_coeff" commands. You can do this in
topotools or any tool which creates LAMMPS DATA files.

For what it's worth, several moltemplate examples use hybrid force
fields and hybrid atom styles, including:
http://moltemplate.org/visual_examples.html#3bodyWater+hydrocarbons
https://github.com/jewettaij/moltemplate/tree/master/examples/coarse_grained/ELBAwater%2Bmethanol
http://moltemplate.org/visual_examples.html#membrane+protein

In addition to making DATA files, moltemplate can generate the
"pair_coeff" (and "bond_coeff", "angle_coeff", ...) commands for you.
(I believe topotools can do this too.) The OPLSAA force field
parameters are already included. (Although you must choose your OPLS
atom types carefully.) ClayFF has not been converted into moltemplate
format yet. Presumably you don't need the entire ClayFF force field,
only a few parameters for the atoms you care about. You can find
those numbers in the tools/msi2lmp/frc_files/clayff.frc)

The first example is a mixture of two different "molecule" types,
coarse grained alkane chain ("Cyclododecane"), and a coarse grained
water molecule("WatMW"):
Each molecule type is (typically) saved in a separate file so it can
be easily combined independently in any simulation:

http://moltemplate.org/examples/3bodyWater+hydrocarbons/cyclododecane.lt
http://moltemplate.org/examples/3bodyWater+hydrocarbons/watmw.lt

To combine them, you must create a file which "imports" both of them,
and then override the "pair_style" command located in those files.
The following file does this and then specifies how many copies of
each type of molecule you want, as well as where to put them:
http://moltemplate.org/examples/3bodyWater+hydrocarbons/system.lt

Excerpt:

write_once("In Init") {
  # -- Tell LAMMPS we want to use two different pair styles
  # -- (This overrides earlier settings.)
  pair_style hybrid sw lj/charmm/coul/charmm 9.0 11.0 9.0 11.0
}

...Since (Lorentz-Berthelot) automatic mixing rules do not work for
atoms which use different pair_styles, you must also provide a list of
"pair_coeff" commands to define interactions between the atoms which
use different pair_styles. That happens here in the "system.lt" file:

write_once("In Settings") {
  pair_coeff @atom:WatMW/mW @atom:TraPPE/CH2 lj/charmm/coul/charmm
0.11914784667210733 3.558
  pair_coeff @atom:WatMW/mW @atom:TraPPE/CH3 lj/charmm/coul/charmm
0.17390830404497651 3.458
  pair_coeff @atom:WatMW/mW @atom:TraPPE/CH4 lj/charmm/coul/charmm
0.21371654257637612 3.448
}

Again, you can also use hybrid bond styles, hybrid angle styles,
dihedral styles, improper styles and hybrid atom styles.
There are some examples which use OPLSAA force field parameters here:

https://github.com/jewettaij/moltemplate/tree/master/examples/all_atom/force_field_OPLSAA

Cheers

Andrew