[lammps-users] Combine potential pair formats in input script and data file

Estimated LAMMPS Users

I am simulating a system (water-protein-metal oxide) and I want to use 3 types of potential pairs, in the input script I wrote the following:

pair_style hybrid buck/coul/long 13.0 lj/cut/coul/long 13.0 lj/charmm/coul/long 8.0 13.0 lj/cut 13.0
pair_modify mix arithmetic

kspace_style pppm 1.0e-6

##======= Potential (Matsui and Akaogi)-Metal Oxide========================================
pair_coeff 34 34 buck/coul/long 717653.9571 0.154 120.9967 #
pair_coeff 33 34 buck/coul/long 391052.7442 0.194 290.3920 #
pair_coeff 33 33 buck/coul/long 271718.8311 0.234 696.9407 #

##=======Lennard Jones Potential (coulombic long-range)-Water ====================================
pair_coeff 36 36 lj/cut/coul/long 0.15535 3.166 #
pair_coeff 35 35 lj/cut/coul/long 0.04600 0.400 #
pair_coeff 35 36 lj/cut/coul/long 0.0000 0.0000 #

##=======Lennard Jones Potential (Metal-water) ======================================================
pair_coeff 34 36 lj/cut 7.72528 2.3431 #
pair_coeff 33 36 lj/cut 0.22784 3.1306 #
pair_coeff 34 35 lj/cut 0.00000 0.000 #
pair_coeff 33 35 lj/cut 0.00000 0.000 #

Is it possible to use the pair_modify mix arithmetic command only for the protein atom group? Since for other atoms I want to apply coefficients calculated manually (as indicated above). I put the coefficients for the lj/charmm/coul/long in the data.file for LAMMPS to mix automatically, however I get the following error: Must define pair_style before Pair Coeffs (…/read_data.cpp:585).

Pair Coeffs # lj/charmm/coul/long
1 0.046 0.400013524445 0.046 0.400013524445 # H
2 0.046 0.400013524445 0.046 0.400013524445 # HC
3 0.03 2.42003727796 0.03 2.42003727796 # HP
4 0.022 2.35197261589 0.022 2.35197261589 # HB1
5 0.028 2.38760856462 0.028 2.38760856462 # HB2
6 0.045 2.38760856462 0.045 2.38760856462 # HA1
7 0.034 2.38760856462 0.034 2.38760856462 # HA2
8 0.024 2.38760856462 0.024 2.38760856462 # HA3
9 0.11 3.56359487256 0.11 3.56359487256 # C
10 0.07 3.55005321205 0.07 3.55005321205 # CA
11 0.032 3.56359487256 0.01 3.38541512893 # CT1
12 0.056 3.58141284692 0.01 3.38541512893 # CT2
13 0.056 3.58141284692 0.01 3.38541512893 # CT2A
14 0.078 3.63486677001 0.01 3.38541512893 # CT3
15 0.099 3.31414323148 0.099 3.31414323148 # CPT
16 0.073 3.5457768982 0.073 3.5457768982 # CY
17 0.02 4.05358916754 0.01 3.38541512893 # CP1
18 0.055 3.87540942391 0.01 3.38541512893 # CP2
19 0.055 3.87540942391 0.01 3.38541512893 # CP3
20 0.07 3.56359487256 0.07 3.56359487256 # CC
21 0.073 3.5457768982 0.073 3.5457768982 # CAI
22 0.2 3.29632525712 0.0001 3.29632525712 # N
23 0.2 3.29632525712 0.2 2.76178602624 # NH1
24 0.2 3.29632525712 0.2 3.29632525712 # NH2
25 0.2 3.29632525712 0.2 3.29632525712 # NH3
26 0.2 3.29632525712 0.2 3.29632525712 # NC2
27 0.2 3.29632525712 0.2 3.29632525712 # NY
28 0.2 3.29632525712 0.2 3.29632525712 # NP
29 0.12 3.02905564168 0.12 2.49451641079 # O
30 0.12 3.02905564168 0.12 3.02905564168 # OC
31 0.1521 3.15378146222 0.1521 3.15378146222 # OH1
32 0.45 3.56359487256 0.45 3.56359487256 # S

Is there any way that LAMMPS can help me by calculating the mixture of the potential coefficients lj/charmm/coul/long but at the same time I can place coefficients manually for other atoms? I understand that you can define the coefficients either in the inputscript or in the data.file, but I don’t know which would be a proper trick.

Sincerely

Eduardo

Estimated LAMMPS Users

I am simulating a system (water-protein-metal oxide) and I want to use 3 types of potential pairs, in the input script I wrote the following:

pair_style hybrid buck/coul/long 13.0 lj/cut/coul/long 13.0 lj/charmm/coul/long 8.0 13.0 lj/cut 13.0
pair_modify mix arithmetic

kspace_style pppm 1.0e-6

##======= Potential (Matsui and Akaogi)-Metal Oxide========================================
pair_coeff 34 34 buck/coul/long 717653.9571 0.154 120.9967 #
pair_coeff 33 34 buck/coul/long 391052.7442 0.194 290.3920 #
pair_coeff 33 33 buck/coul/long 271718.8311 0.234 696.9407 #

##=======Lennard Jones Potential (coulombic long-range)-Water ====================================
pair_coeff 36 36 lj/cut/coul/long 0.15535 3.166 #
pair_coeff 35 35 lj/cut/coul/long 0.04600 0.400 #
pair_coeff 35 36 lj/cut/coul/long 0.0000 0.0000 #

##=======Lennard Jones Potential (Metal-water) ======================================================
pair_coeff 34 36 lj/cut 7.72528 2.3431 #
pair_coeff 33 36 lj/cut 0.22784 3.1306 #
pair_coeff 34 35 lj/cut 0.00000 0.000 #
pair_coeff 33 35 lj/cut 0.00000 0.000 #

Is it possible to use the pair_modify mix arithmetic command only for the protein atom group? Since for other atoms I want to apply coefficients calculated manually (as indicated above). I put the coefficients for the lj/charmm/coul/long in the data.file for LAMMPS to mix automatically, however I get the following error: Must define pair_style before Pair Coeffs (…/read_data.cpp:585).

There are three problems here:

  1. to read a Pair Coeffs section you must have a pair style defined before the read_data command (hence the error).
  2. the Pair Coeffs section has to follow the syntax of the pair_coeff command, only that you only specify one atom type instead of two. For pair_style hybrid that requires to provide the specific pair style the settings are referring to. thus fixing issue 1) will lead to this error
  3. there have to be exactly as many entries in the Pair Coeffs section as you have atom types (which seems to be 36 and not 32). Thus fixing issue 2) will lead to another error.

The easiest way to let LAMMPS do the mixing for you would be to read in the protein system only and then use the write_coeff command to output all mixed parameters in a file that can be used with include. Then you can add custom pair_coeff statements for the missing atom types from there on. Please note that you will need to provide pair_coeff setting for all permutations of atom types. there is no automatic mixing possible across different pair styles.

As an alternative you can also replace the Pair Coeffs section with a PairIJ Coeffs section that would contain all pairwise settings for the pair style explicitly.

For details on the restrictions in data file, please see the documentation for the read_data command.
To debug missing settings, please check out the info coeffs command.

Axel.