LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Problem with mapping atoms in custom LJ potential
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Problem with mapping atoms in custom LJ potential


From: Ankit Gupta <ankitgupta.mme@...24...>
Date: Tue, 27 Jun 2017 06:34:18 -0400

Dear LAMMPS users,

I am trying to implement a version of LJ potential for coarse grained simulation which doesn't have any corrugation artifact produced as a result of coarse graining a line into atoms. The basic algorithm is similar to pair_style line/lj  but  is implemented for atoms instead of lines.

In order to calculate lj potential between atoms i and j, I need orientation of each atom with respect to the adjacent atoms. It can be easily extracted if I can access the coordinates of adjacent atoms (i-1, i+1 & j-1, j+1).

I am implementing it as follows: 
1) get global id of local atom i by tag[i]. 
2) calculate global ids of adjacent atoms as tag[i]+1 and tag[i]-1
3) convert global ids to local ids, m and n, as atom->map(tag[i]+1) & atom->map(tag[i]-1).
4) obtain images of m and n  closest to i as domain->closest_image(i,m) & domain->closest_image(i,n).
5) repeat same process for atom j.

The code works fine in serial version. But it crashes after running for some time step in parallel implementation with exit code 11. I tried changing several parameters. The only thing that worked was changing neighbour skin distance from 2 to 20 A. But it increases the computation cost significantly. 

It will be very helpful if you can kindly let me know what might cause such error. I am using LAMMPS version dated 17Nov16. My system size is roughly 400,000 atoms. The cutoff for lj potential is 28 A and the style of atoms is angle with 10 A and 180 degrees as equilibrium bond length and angle.

Thanks & Regards,
Ankit Gupta