Errors with hbond/dreiding/lj --- hydrogen bond analysis

Hi all,

I want to analyze the H-bonds, in simulation of a water-polymer system with class II FF. So, I use pair_style hbond/dreiding/lj and rerun command. My input file is as follows:

boundary p p p
units real
atom_style full
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
pair_style lj/class2/coul/long 10
pair_modify tail yes table 12
newton on

read_data PP.data

group P type 1 2 3 4 5 6 7 8

kspace_style pppm 1e-4
special_bonds dreiding
neighbor 1 bin
neigh_modify delay 0 every 1 check yes page 1000000
comm_modify mode single cutoff 10

minimize 1.0e-06 1.0e-06 100000 100000

velocity all create 200 492869

reset_timestep 0

fix sh all shake 0.000001 1000 0 b 13 a 28
fix M all npt temp 273 373 100 iso 1 1 1000
dump M P custom 500 dump.lammpstrj id mol type element mass q x y z ix iy iz

thermo 100
thermo_style custom step temp press vol density etotal ke pe time
thermo_modify lost warn flush yes
timestep 1
run 5000

reset_timestep 0

read_dump dump.lammpstrj 500 x y z ix iy iz format native

pair_style hbond/dreiding/lj 4 2.5 3.5 120
pair_coeff 6 9 hbond/dreiding/lj 3 i 9.5 2.75 4
pair_coeff 5 9 hbond/dreiding/lj 3 j 9.5 2.75 4
pair_coeff 5 6 hbond/dreiding/lj 3 j 9.5 2.75 4
pair_coeff 9 9 hbond/dreiding/lj 3 i 9.5 2.75 4

compute hb all pair hbond/dreiding/lj
variable n_hbond equal c_hb[1] #number hbonds
variable E_hbond equal c_hb[2] #hbond energy
thermo_style custom step temp epair v_n_hbond v_E_hbond
rerun dump-productionp.lammpstrj dump x y z box yes

However, I get the following error when it reaches pair_coeff part after rerun. The end lines of the log.lammps file are:




read_dump dump.lammpstrj 500 x y z ix iy iz format native
orthogonal box = (-0.956178 0.403877 -0.85569) to (63.1314 64.4915 63.2319)
27548 atoms before read
572 atoms in snapshot
0 atoms purged
572 atoms replaced
0 atoms trimmed
0 atoms added
27548 atoms after read

pair_style hbond/dreiding/lj 4 2.5 3.5 120
pair_coeff 6 9 hbond/dreiding/lj 3 i 9.5 2.75 4
ERROR: Numeric index is out of bounds (…/force.cpp:690)

If I use the coeffs available as examples in manual for this pair_style, I get this error:

pair_style hbond/dreiding/lj 4 9.0 11.0 90
pair_coeff 6 9 hbond/dreiding/lj 3 i 9.5 2.75 4 9.0 11.0 90.0
ERROR: Incorrect args for pair coefficients (…/pair_hbond_dreiding_lj.cpp:320)

Can someone help me about this error please? BTW, what are the limitations in the pair_style and pair_coeff numeric indexes?

data fiile is also attached.

Thanks

PP.data (3.38 MB)

The example was for pair style hybrid/overlay, but
you have defined pair_style hbond/dreiding/lj. So

you need to drop hbond/… from your pair_coeff command.

Steve

Steve, Thank you for your helpful response.

I modified it and I don’t get that error anymore.
I encountered several new points and problems that would like to mention it here:

1- ERROR: KSpace style is incompatible with Pair style (…/kspace.cpp:177):

For post processing by rerun, I changed the kspace_style command to comment, since it is a H-bond post processing and I don’t need it.

2-
ERROR on proc 1: Bond atom missing in image check (…/domain.cpp:625)
ERROR on proc 3: Bond atom missing in image check (…/domain.cpp:625)
ERROR on proc 2: Bond atom missing in image check (…/domain.cpp:625)
ERROR on proc 0: Bond atom missing in image check (…/domain.cpp:625)

I tried to solve this error based on the description of the manual and error sections, but was not successful. However, for post processing, by running in serial mode, I could successfully rerun it without getting the above errors.

3- The current serious problem that I cannot solve is that the rerun command does not print data for each snapshot to the log file. I only get the info for the first and the last step:

Step Temp E_pair n_hbond E_hbond
0 228.61051 877856.5 63 877856.5
5000 228.61051 -13.881837 26 -13.881837
Loop time of 0.693058 on 1 procs for 11 steps with 27548 atoms

With a more complete command, the output was the same.

rerun dump.lammpstrj first 0 every 500 last 5000 dump x y z box yes scaled yes

It seems that it calculates the data for each snapshot, but it does not print the whole 11 steps.

Can you please help me about this problem? Thank you very much. I’m using lammps version 31 March 14.

Comments below.

Steve

Thank you for your help.

When I run a rerun using my dump file and the restart file, I always get another error which is: ERROR: Dump file does not contain requested snapshot (…/read_dump.cpp:111)

In this simulation I tried to dump x y z ix iy iz data every 5000 step, e.g in this case from step 8500000 to 13000000. These data are afterwards requested every 5000 steps during rerun. Could you please help me where the problem is? The rerun input file is as follows:

boundary p p p
units real
atom_style full
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
pair_style soft 10
pair_style lj/class2/coul/long 10
newton on

comm_modify mode single cutoff 10 vel no

log log.rerun

read_restart restart.8500000

read_dump dump.lammpstrj 5000 x y z ix iy iz format native

pair_style hbond/dreiding/lj 4 2.5 3.5 30
pair_coeff 6 9 3 i 9.5 2.75 4 2.5 3.5 30
pair_coeff 5 9 3 j 9.5 2.75 4 2.5 3.5 30
pair_coeff 5 6 3 j 9.5 2.75 4 2.5 3.5 30
pair_coeff 9 9 3 j 9.5 2.75 4 2.5 3.5 30

compute hb all pair hbond/dreiding/lj
variable n_hbond equal c_hb[1] #number hbonds
variable E_hbond equal c_hb[2] #hbond energy

thermo 5000
thermo_style custom step temp epair v_n_hbond v_E_hbond

rerun dump.lammpstrj first 8500000 every 5000 last 13000000 dump x y z ix iy iz box yes scaled no

When you use read_restart, your timestep is set to 8500000. So maybe your dump.lammpstrj file does not contain information on the 8500000th step.

Ray

Dear Ray,
Thank you for your response. However, the dump file contains data from step 8500000 to steps more that 13000000. It begins with

ITEM: TIMESTEP
8500000
ITEM: NUMBER OF ATOMS
27548
ITEM: BOX BOUNDS pp pp pp
-1.75063 64.0735
-0.471175 65.353
-1.69966 64.1245
ITEM: ATOMS id mol type element mass q x y z ix iy iz
369 1 1 C 1.00797 0.053 -0.568762 5.67798 0.0151001 -1 0 0
368 1 8 C 12.0112 -0.106 -1.28285 6.17551 -0.659246 -1 0 0


I don’t understand what the problem is.