Write_coeff with lj/long

Hi all,

I have a question regarding write_coeff which I have written at the end of the data file.

I have a solution in the box I specified the pair_coeff of ii (1 1, 2 2 and …) and the rest would be calculated using mix geometric. The pair style that I used is lj/long/coul/long

When I opened the written pair_coeffs generated by lammps, I realised that they are entirely wrong. Please see below the generated pair coeffs (I specified the coefficient shown in bold in the data file).

pair_coeff 1 1 0 0 12
pair_coeff 1 2 0 0 1.8231e-321
pair_coeff 1 3 0 0 2.31779e-310
pair_coeff 1 4 0 0 2.31779e-310
pair_coeff 1 5 0 0 2.54639e-313
pair_coeff 1 6 0 0 1.6976e-313
pair_coeff 2 2 0 0 12
pair_coeff 2 3 0 0 1.6976e-313
pair_coeff 2 4 0 0 3.39519e-313
pair_coeff 2 5 0 0 1.2732e-313
pair_coeff 2 6 0 0 4.24399e-314
pair_coeff 3 3 0.17 3.25 12
pair_coeff 3 4 0 0 8.48798e-314
pair_coeff 3 5 0 0 4.24399e-314
pair_coeff 3 6 0 0 5.09279e-313
pair_coeff 4 4 0.17 3.15 12
pair_coeff 4 5 0 0 1.01856e-312
pair_coeff 4 6 0 0 2.122e-314
pair_coeff 5 5 0.21 2.86 12
pair_coeff 5 6 0 0 0

pair_coeff 6 6 0.1553 3.166 12

I had the same problem with lj/long/tip4p/long. No issue when I used lj/cut

Would you please tell me should I specify all the pair coeffs specifically in my input file or everything is fine just the write_coeff command does not support the lj/long?

I appreciate your feedback.

Regards,
Sara

this looks like a bug in the corresponding pair styles. they do provide the necessary functions, but their output is not always consistent depending on whether you turn on long-range handling for the lennard jones part or not.
you can just remove the bogus 5th column in the pair_coeff statements. they would contain the pairwise lj cutoff, but only if there is no long-range handling for lj interactions. in the latter case, they must not be present, anyway.

axel.

oh, and best you submit an issue at https://github.com/lammps/lammps/issues detailing which pair styles exactly are affected.

thanks,
axel.

Hi Axel,

Thanks for that.
Also, it calculated all the pair_coeff ij ZERO, some of them should not be zero.
Does it resolve my problem meanwhile if I specified all the pair -coeffs in my data file?

Thanks,
Sara

i don’t know. i have no time to debug this right now and i cannot know without debugging.
so you have to debug/test yourself.

Ok, thanks.