[lammps-users] pair coeff for hybrid has invalid style problem

Dear all

I found a problem in simulation interaction

between one protein and one carbon nanotube by using LAMMPS, please
Help me because I’m confused and disappointed. I converted one protein
pdb file to datafile, then i created one carbon nanotube datafile, and
merge them to one another datafile manually. so that for protein is
used charmm force field, but for nanotube i plan to use tersoff
potential, as well as, between cnt atoms and protein atoms lj force
field was used. for use these potentials Simultaneously i got help of
the pair_style hybrid command. However, I encounter to problem and
error!
it is : Pair coeff for hybrid has invalid style
do the above method for this simulation is correct?
program and datafile is attached.

Thanks a lot for your help.
Farrokh

protein nanotube.tar.gz (191 KB)

Please post the pair commands that give the error. Note also
that if you are mixing force fields (CHARMM, Tersoff) you need
to use one consistent set of units.

Steve

Hi Dear Steve

Gives the following error :

LAMMPS (7 Jul 2009)
Lattice spacing in x,y,z = 2.5 2.5 2.5
Scanning data file …
4 = max bonds/atom
6 = max angles/atom
18 = max dihedrals/atom
2 = max impropers/atom
Reading data file …
orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
1 by 1 by 1 processor grid
ERROR: Pair coeff for hybrid has invalid style

and program :

units metal
neigh_modify delay 2 every 1

lattice fcc 2.5
region box1 block -120 120 -120 120 -120 120

atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic

pair_style hybrid tersoff lj/charmm/coul/long 8 10 lj/cut 2.5

read_data proteinnanotube.data

pair_coeff 33 33 /home/farrokh/Desktop/lammps-27Aug09/potentials/SiC.tersoff C C C
pair_coeff 132 132 lj/charmm/coul/long 8 10
pair_coeff 1*32 33 lj/cut 2.5

#pair_style lj/charmm/coul/long 8 10
#pair_modify mix arithmetic
kspace_style pppm 1e-4

group nanotube id > 3280
displace_atoms nanotube move 30 0 0

special_bonds charmm
fix 1 all nve
fix 2 all shake 1e-6 500 0 m 1.0
velocity all create 0.0 12345678 dist uniform

thermo 1
thermo_style multi
timestep 0.5

restart 10 2KOT_autopsf.restart1 2KOT_autopsf.restart2
dump 1 all atom 10 2KOT_autopsf.dump
dump 2 all xyz 100 proteinnanotube.xyz
dump_modify 1 image yes scale yes

run 20000

please help me to solve this problem.

Thanks a lot
farrokh

pair_coeff 33 33 /home/farrokh/Desktop/lammps-27Aug09/potentials/SiC.tersoff C C C

As the doc page for Tersoff states, you need one argument (at the end)
per atom type.
You have defined 33 atom types, so you need 33 args after the SiC.tersoff.

Steve

Since you are using pair_style hybrid, you will also need to add “tersoff” before the filename to let LAMMPS know what you want to do . . . .

–AEI

Dear Steve & Ahmed

I correct it, but it has the same ERROR again. probably I may be wrong in merging two files (protein and nanotube),initially I created only protein data file with 3280 atoms with CHARMM force field, Then open it and added nanotube data into it , so that, 1792 number atoms added to atoms in line 1, one atom type added to atoms type in line 9, atom type 33 assinged to carbon nanotube and added to masses with 12.011 in line 52, and 1792 atoms located at the end of protein atoms after line 3370. Do this merging method is correct? would you check it? data file is attached.

portion of Program :

pair_style hybrid lj/charmm/coul/long 8 10 tersoff lj/cut 2.5

read_data proteinnanotube.data

pair_coeff 132 132 lj/charmm/coul/long 8.0 10.0

pair_coeff * * tersoff SiC.tersoff NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1*32 33 lj/cut 2.5

Best Regards
Farrokh

proteinnanotube.data (1010 KB)

Dear Steve & Ahmed

I correct it, but it has the same ERROR again. probably I may be wrong in merging two files (protein and nanotube),initially I created only protein data file with 3280 atoms with CHARMM force field, Then open it and added nanotube data into it , so that, 1792 number atoms added to atoms in line 1, one atom type added to atoms type in line 9, atom type 33 assinged to carbon nanotube and added to masses with 12.011 in line 52, and 1792 atoms located at the end of protein atoms after line 3370. Do this merging method is correct? would you check it? data file is attached.

portion of Program :

pair_style hybrid lj/charmm/coul/long 8 10 tersoff lj/cut 2.5

read_data proteinnanotube.data

pair_coeff 132 132 lj/charmm/coul/long 8.0 10.0

pair_coeff * * tersoff SiC.tersoff NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1*32 33 lj/cut 2.5

Best Regards
Farrokh

proteinnanotube.data.tar.gz (190 KB)

If you're getting the same error with the pair coeff command as before,
then the problem has to do with that command, not the data file.
Make sure your long pair coeff line is actually one very long line
in your input script or that you use continuation chars at the end of
each line, else it won't work.

Steve

Dear Steve
I checked it, it is one very long line and not used continuation chars at the end of each line! what do your recommendation?

This line is not correct:

pair_coeff 1*32 33 lj/cut 2.5

It needs a sigma and epsilon.

Steve

Dear Steve

The error is still unresolved. Program seems quite correct. I’m puzzled
that what is the problem.

LAMMPS (7 Jul 2009)
Lattice spacing in x,y,z = 2.5 2.5 2.5
Scanning data file …
4 = max bonds/atom
6 = max angles/atom
18 = max dihedrals/atom
2 = max impropers/atom
Reading data file …
orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
1 by 1 by 1 processor grid
ERROR: Pair coeff for hybrid has invalid style

Program :

Created by charmm2lammps v1.8.1 on Sat Mar 13 19:52:04 IRST 2010

units metal
#neigh_modify delay 2 every 1

lattice fcc 2.5
region A block -120 120 -120 120 -120 120

atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic

pair_style hybrid lj/charmm/coul/long 8 10 tersoff lj/cut 2.5

read_data proteinnanotube.data

pair_coeff 132 132 lj/charmm/coul/long 100.0 2.0
pair_coeff * * tersoff SiC.tersoff NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL C
pair_coeff 1*32 33 lj/cut 1.0 1.0

#pair_modify mix arithmetic
kspace_style pppm 1e-4

group nanotube id > 3280
displace_atoms nanotube move 30 0 0

special_bonds charmm
fix 1 all nve
fix 2 all shake 1e-6 500 0 m 1.0
velocity all create 300.0 12345678 dist uniform

thermo 1
thermo_style multi
timestep 0.5

#restart 10 2KOT_autopsf.restart1 2KOT_autopsf.restart2
#dump 1 all atom 10 2KOT_autopsf.dump
dump 1 all xyz 100 proteinnanotube.xyz
dump_modify 1 image yes scale yes

run 20000

Actually, SiC.tersoff have been copied from /lammps-27Aug09/potentials/SiC.tersoff to my directory without change the information within it, Does need to modify its information? if yes, How to do it?

Thanks a lot for your response.

Best regards
Farrokh

Have you made sure that the pair_coeffs are properly represented in the data file? It’s quite likely that the error is in the proteinnanotube.data file, since LAMMPS will attempt to read in any pair coefficients given in the data file before it changes them using your commands.

–AEI

Dear Ismail

This is my first time that i merge two data file. probably, I take a mistake, but i don’t know it.
can you take a look in my data file? it’s attached.

Thanks for your vital help.
Farrokh

proteinnanotube.data (1010 KB)

Dear Ismail

This is my first time that i merge two data file. probably, I take a mistake, but i don’t know it.
can you take a look in my data file? it’s attached.

Thanks for your vital help.
Farrokh

proteinnanotube.data.tar.gz (190 KB)

You didn’t include anything in the LAMMPS data file to tell it which pair_style is being represented here. Therefore, LAMMPS doesn’t know what to do with the pair_style hybrid–it can’t assign the potentials, so it throws up an error and quits. You need to add the appropriate pair_style identification to each listed pair_coeff in the data file, or move all of those commands to the script file. (Or, if you don’t want to use those, you can delete them from the data file altogether.)

–AEI

Dear Ismail

I will add one appropriate pair_style identification to each listed pair_coeff in the data file, because data file has aone list of pair coeff.
As below :

Masses

1 1.008
2 1.008

32 32.06
33 12.011 # {this is for nanotube}

pair_style lj/charmm/coul/long 8 10 # appropraite pair_style
Pair Coeffs

1 0.046 0.4 135 0.046 0.40 135
2 0.046 0.4 135 0.046 0.40 135
3 0.022 2.3 51973 0.022 2.3 51973
4 0.03 2.4 20037 0.03 2.4 20037
5 0.022 2.3 51973 0.022 2.3 51973
6 0.046 1.6 3618 0.046 1.6 3618
7 0.0078 2.6 15679 0.0078 2.6 15679
8 0.11 3.5 63595 0.11 3.5 63595
9 0.07 3.5 50053 0.07 3.5 50053
10 0.02 4 53589 0.01 3.3 85415
11 0.055 3.8 75409 0.01 3.3 85415
12 0.08 3.6 70503 0.01 3.3 85415
13 0.05 3.2 7235 0.05 3.2 7235
14 0.05 3.2 7235 0.05 3.2 7235
15 0.09 3.2 7235 0.09 3.3 85415
16 0.07 3.5 50053 0.07 3.5 50053
17 0.02 4 53589 0.01 3.3 85415
18 0.055 3.8 75409 0.01 3.3 85415
19 0.055 3.8 75409 0.01 3.3 85415
20 0.07 3.5 63595 0.07 3.5 63595
21 0.2 3.2 96325 0.0001 3.2 96325
22 0.2 3.2 96325 0.2 3.2 96325
23 0.2 3.2 96325 0.2 3.2 96325
24 0.2 3.2 96325 0.2 2.7 61786
25 0.2 3.2 96325 0.2 3.2 96325
26 0.2 3.2 96325 0.2 3.2 96325
27 0.2 3.2 96325 0.2 3.2 96325
28 0.2 3.2 96325 0.2 3.2 96325
29 0.12 3 29056 0.12 2.4 94516
30 0.12 3 29056 0.12 3.0 29056
31 0.1521 3.1 53781 0.1521 3.1 53781
32 0.45 3.5 63595 0.45 3.5 63595

Atoms

1 1 26 -0.3 6.902 17.015 7.319
2 1 2 0.33 6.849 17.585 6.499

(Is there no other way to add?)
But gives an error as below:

LAMMPS (7 Jul 2009)
Lattice spacing in x,y,z = 2.5 2.5 2.5
Scanning data file …
ERROR on proc 0: Unknown identifier in data file: pair_style lj/charmm/coul/long 8 10
[0] MPI Abort by user Aborting program !
[0] Aborting program!
p0_5803: p4_error: : 1

Cheers,
Farrokh

The pair coefficients listed in the file don’t match any of the styles you’re using in the input script! You might as well go ahead and delete the whole section (or at least save it to a different file).

–AEI

Dear Ismail

Thanks a lot for your response.
now, the simulation gives Error as below:

LAMMPS (7 Jul 2009)
Lattice spacing in x,y,z = 2.5 2.5 2.5
Scanning data file …
4 = max bonds/atom
6 = max angles/atom
18 = max dihedrals/atom
2 = max impropers/atom
Reading data file …
orthogonal box = (-0.5 -0.5 -0.5) to (0.5 0.5 0.5)
1 by 1 by 1 processor grid
5072 atoms
3300 bonds
6014 angles
9088 dihedrals
502 impropers
Finding 1-2 1-3 1-4 neighbors …
4 = max # of 1-2 neighbors
9 = max # of 1-3 neighbors
19 = max # of 1-4 neighbors
21 = max # of special neighbors
1792 atoms in group nanotube
System init for displace_atoms …
PPPM initialization …
WARNING: System is not charge neutral, net charge = -2
G vector = 0.3842
grid = 3 3 3
stencil order = 5
RMS precision = 1.15138e-06
WARNING: Reducing PPPM order b/c stencil extends beyond neighbor processor
G vector = 0.351098
grid = 3 3 3
stencil order = 4
RMS precision = 1.31306e-05
WARNING: Reducing PPPM order b/c stencil extends beyond neighbor processor
G vector = 0.331086
grid = 5 5 5
stencil order = 3
RMS precision = 5.14324e-05
WARNING: Reducing PPPM order b/c stencil extends beyond neighbor processor
G vector = 0.323305
grid = 27 27 27
stencil order = 2
RMS precision = 8.5563e-05
WARNING: Reducing PPPM order b/c stencil extends beyond neighbor processor
G vector = 0.321204
grid = 11250 11250 11250
stencil order = 1
RMS precision = 9.80162e-05
ERROR: PPPM grid is too large

and script :

Created by charmm2lammps v1.8.1 on Sat Mar 13 19:52:04 IRST 2010

units metal
#neigh_modify delay 2 every 1

lattice fcc 2.5
region A block -53 53 -33 33 -33 33

atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
improper_style harmonic

pair_style hybrid lj/charmm/coul/long 8 10 tersoff lj/cut 2.5

read_data proteinnanotube.data

pair_coeff 132 132 lj/charmm/coul/long 100.0 2.0

pair_coeff * * tersoff SiC.tersoff NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL C

pair_coeff 1*32 33 lj/cut 1.0 1.0

#pair_modify mix arithmetic
kspace_style pppm 1e-4

group nanotube id > 3280
displace_atoms nanotube move 20 0 0

special_bonds charmm
fix 1 all nve
fix 2 all shake 1e-6 500 0 m 1.0
velocity all create 300.0 12345678 dist uniform

thermo 1
thermo_style multi
timestep 0.5

#restart 10 2KOT_autopsf.restart1 2KOT_autopsf.restart2
#dump 1 all atom 10 2KOT_autopsf.dump
dump 1 all xyz 100 proteinnanotube.xyz
#dump_modify 1 image yes scale yes

run 20000

regards,
Farrokh

Dear Ismail

Thanks a lot for your response.
now, the simulation gives Error as below:

please open your eyes. MD strictly adheres to
the "garbage in, garbage out" principle.

you are trying to fit 5000 atoms in to a 1x1x1 box!!
how should this work???

no wonder pppm barfs on you.

axel.