[solved] read_dump - Or how to import the particle radius?

PaulWinkler's picture
Submitted by PaulWinkler on Thu, 02/11/2016 - 18:48

Hi all,

since we have some problems inserting particles in a container considering periodic boundaries (particles will not protrude the container wall), we wrote some code generating an initial assembly quite fast. Now we want to import the particle data (x, y, z, radius). Therefore we are using the LIGGGHTS-dumpfile format and the read_dump command. There is just one problem, read_dump seems not to support reading the particle radius. When I try I will get an illegal dump command. In the code the radius do not appear, so I guess, it is not implemented. After a quick view on read_data, it also seems not to support the radius.
I am dealing with restart files a lot, but since they are binary, editing is not a god idea.
Did I miss a way importing particle coordinates and radius into a LIGGGHTS simulation? Or have I to group the particles via ID-range and setting the radius with fix adapt (the particles are sorted by size) “by hand”?

Regards
Paul

richti83's picture

richti83 | Fri, 02/12/2016 - 09:08

Hi Paul,

I never used read_dump, but I'm using read_data a lot.
In older versions of the manuel there is a table in read_data.html section "Atoms Section" which discribes the line format:

sphere atom-ID atom-type diameter density x y z

In read data line 689 calls atom->data_atoms(..) which sets coords and calls AtomVecSphere::data_atom(..) and there the ID, type,diameter and density is set.
So you need a read.pour with the header discribed in read_data and an Atoms section

LIGGGHTS data file from restart file: timestep = 24000, procs = 12
#
5969 atoms
3 atom types
#
-1.5 0.835 xlo xhi
-0.31 0.31 ylo yhi
-0.855 0.5 zlo zhi
#
Atoms
# ID TYPE DIAMETER DENSITY X Y Z
3442 1 0.02 2500 -0.727265 -0.283047 -0.845027
3718 1 0.02 2500 -0.701244 -0.289514 -0.845027
....

(remove the # they are only for the forum code format tag which doesn't like spaces)
optionally there can be a velocity section after the atoms section.

Best,
Christian

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

PaulWinkler's picture

PaulWinkler | Wed, 02/17/2016 - 13:55

I was confused about the bunch of sections, but after your help and a second reading it is clear now. We will implement an output format the way like
"id type diameter density x y z" and keep the rest blank, works like a charm. But I ask myself why switching here to diameter? Regards from LAMMPS?
Again, thanks a lot!

Kind regards
Paul