[lammps-users] Tabular potential for bond_style

Hi,

I am using “lammps-29Sep10” windows binary executable to test the use of tabular potentials.
when I followed the manual and created the potential file for a simple harmonic function for two atom model.
I am getting unusual errors as given.

Step Temp E_pair E_mol TotEng Press 0 0 0 -1.#IND -1.#IND -1.#IND **I could not figure out want went wrong.** **Your help is greatly appreciated.**

The details are give below the files (a) in.test (b) test.lammps © potential tabular file (d) output

(a) in.test file

units real
atom_style full
boundary p p p
bond_style table linear 10000
atom_modify sort values 1.0
read_data test.lammps
neighbor 2.0 bin
neigh_modify delay 5
timestep 1.0
thermo 100
fix 1 all nvt temp 293.0 293.0 100.0
dump 1 all atom 2000 dump.lammpstrj
run 25000

(b) test.lammps file

2 atoms

1 bonds
0 angles
0 dihedrals
0 impropers

1 atom types
1 bond types
0 angle types
0 dihedral types
0 improper types

0.0 5.0 xlo xhi
0.0 5.0 ylo yhi
0.0 5.0 zlo zhi

Masses

1 15.0

Bond Coeffs

1 bond.table bond

Atoms

1 1 1 0.0000 1.00 5.00 4.00
2 1 1 0.0000 2.00 5.00 4.00

Bonds

1 1 1 2

creating the table in Matlab

r=0:1e-3:10.0;
U = 0.5 * 899.95759 * (r-1.54).^2;
F = - 0.5 * 899.95759 * 2 * (r-1.54);

gives the table
© bond.table

bond Potential for butane

bond_butane
N 10001

1.0000000e+000 0.0000000e+000 1.0671697e+003 1.3859347e+003
2.0000000e+000 1.0000000e-003 1.0657842e+003 1.3850347e+003



9.9980000e+003 9.9970000e+000 3.2182865e+004 -7.6109413e+003
9.9990000e+003 9.9980000e+000 3.2190477e+004 -7.6118413e+003
1.0000000e+004 9.9990000e+000 3.2198089e+004 -7.6127413e+003
1.0001000e+004 1.0000000e+001 3.2205702e+004 -7.6136412e+003

(d) When I run (output)

Scanning data file …
1 = max bonds/atom
Reading data file …
orthogonal box = (0 0 0) to (5 5 5)
1 by 1 by 1 processor grid
2 atoms
1 bonds
Finding 1-2 1-3 1-4 neighbors …
1 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
WARNING: Resetting reneighboring criteria during minimization
Setting up minimization …
Memory usage per processor = 2.09904 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 0 -1.#IND -1.#IND -1.#IND

Thanks
srinivas

this happens when your table file is wrongly formatted.
the first column has to be an integer, for example.

cheers,
    axel.

Hi Dr. Axel,

Thank you very much for your reply.
Yes I tried by making it as integer as follows. Still my error remains same.
I would appreciate if you can provide me with any sample file which worked.
May there is any space requirement between the columns.

Best regards
Srinivas

Hi Dr. Axel,
Thank you very much for your reply.
Yes I tried by making it as integer as follows. Still my error remains same.

your energies and forces are very strange. you must have truncated
them. not sure what effect that has on the tabulation.

I would appreciate if you can provide me with any sample file which worked.

is attached, as well as a little perl script to generate it.

May there is any space requirement between the columns.

no. you can check the sources. it reads the columns using sscanf
and first column with %d and the rest with %g format.

cheers,
     axel.

bond.table (346 KB)

genbondtable.pl (250 Bytes)