LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Use "read_dump" multiple times
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Use "read_dump" multiple times


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 27 Apr 2018 13:42:13 -0400

On Fri, Apr 27, 2018 at 12:53 PM, Yidong Xia <yidongxia@...24...> wrote:
> Thanks for pointing out my problem. But how to overcome this in
> "read_dump"? Thanks.

what you are asking for doesn't make sense. if you are reading the
same atoms, read dump should assign the data to the same atoms. that
is what it does and that is how it should work.
if you want to create new atoms from the same system, you can use,
e.g. replicate or read_data. no point in complicating read_dump as it
is already problematic to use it to import atoms.

axel.

>
> On Fri, Apr 27, 2018 at 10:48 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:
>>
>> On Fri, Apr 27, 2018 at 12:37 PM, Yidong Xia <yidongxia@...24...> wrote:
>> > Did anyone use "read_dump" multiple times to read a number of LAMMPS
>> > dump
>> > files where each file contain one snapshot?
>> >
>> > Recently I found that only the 1st "read_dump" added atoms into the
>> > system;
>> > the rest of "read_dump" did not add atoms even though I used "add yes"
>> > keyword. I've pasted one example here
>> >
>> >
>> > region          box block ${xlo} ${xhi} ${ylo} ${yhi} ${zlo} ${zhi}
>> > create_box      3 box
>> >
>> > read_dump       out.100.dump  100 x y z box no add yes
>> > read_dump       out.500.dump  500 x y z box no add yes
>> > ...
>> >
>> > Another situation is, if I have "read_data" before "read_dump" at first,
>> > then none of the "read_dump" could actually add atoms in the system
>> >
>> > # the simulation box is already large enough to include all atoms in
>> > dump
>> > files
>> >
>> > read_data       LAMMPS_data1.dat
>> > read_data       LAMMPS_data2.dat add append
>> >
>> > read_dump       out.100.dump  100 x y z box no add yes
>> > read_dump       out.500.dump  500 x y z box no add yes
>> >
>> > I
>> > wonder if my setup is not right? Thanks for any feedback
>>
>> no, you simply didn't read the documentation careful enough.
>>
>> with the add yes keyword included indeed new atoms are added, but
>> *only* if their atom id is different from one that already exists.
>> otherwise it will simply overwrite the the read in parameters, which
>> is exactly what it should be doing.
>>
>> axel.
>>
>>
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > lammps-users mailing list
>> > lammps-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/lammps-users
>> >
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
>
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.