RDF with special bonds

Hi. I am using LAMMPS to evaluate the energy of a system using the MOF-FF package. I am also wanting to compute the RDF many times over (and hence would like to avoid writing a dump file and then processing) for all pairs of atoms.

A summary of the pair styles used:

pair_style buck6d/coul/gauss/dsf     0.9000    12.0000
bond_style hybrid class2 morse harmonic
angle_style hybrid class2/p6 cosine/buck6d
dihedral_style opls
improper_style inversion/harmonic

special_bonds lj 0.00 0.00 1.00 coul 1.00 1.00 1.00

As suggested in the compute rdf command documentation, I tried setting the zero special_bonds values to a very small, non-zero value (1.0e-50), however setting the 1-3 weights to non-zero is incompatible with the angle style:

Exception: ERROR: Angle style requires special_bonds lj = x,0,x; otherwise buck6d 1-3 interaction are counted.

Is there any way around this? Thanks.

Not without modifying the source code. You could, for example, comment out or modify the check that is producing the error.

1 Like

A workaround is to dump the trajectory and use the rerun command to compute the RDFs. It’s pretty straightforward, and of course you don’t need to specify any pair style.

Thanks for the suggestion :slight_smile: I was hoping to avoid IO operations because I am carrying it out during the simulation, and modifying the “error” code worked quite well for this