LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Regarding read_data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Regarding read_data


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 3 May 2018 07:55:59 -0400

On Thu, May 3, 2018 at 4:41 AM, bahman daneshian <bahmanpbamp@...24...> wrote:
> Dear Lammps experts,
>
> I am permanently facing with this error regarding read_data command:
> "cannot read_data without add keyword after simulation box is defined."
> Whereas, I have applied the command after the simulation box command. In
> addition, ,I have also no idea regarding the "add keyword" . Since, I would
> like to just read 2 input files and then add their atoms in 2 regions. So, I
> need not to use add keyword as per the documentation and instead I need to
> use "region keyword".

please read the read_data documentation more carefully. there is a
whole section explaining what you can and cannot do when using
read_data multiple times or after a create_box command. that also
explains the function of the add keyword.

in short, you *must* use the add keyword because you use create_box,
and there is no region keyword.

axel.

>
> By the way, any help is highly appreciated.
>
>
>
> 1- Lammps input file:
>
> dimension      2
> units   metal
> atom_style    atomic
> boundary        p p p # in 2d models z shall be periodic
>
>
>
> region         box     block     0 200 0 200 -0.5 0.5 units box        ###
> simulation box
> create_box     2         box # 2 is number of atom types
> read_data substrate.dat  group  substrate
> read_data  agglomerate.dat  group  agglomerate
> lattice sq2 3.61
>
>
> pair_style lj/cut 6.0 # cut off is usually 2.5 unitless in lj
> pair_coeff * * 0.32 2.23
> neighbor 2.0 bin
> neigh_modify delay 5
> #neigh_modify    delay 0 every 1 check yes
>
> reset_timestep 0
> timestep 0.005 # Achtung! in metal unit time-step is by default 1
> picoseconds scale
>
>
> velocity all create 300 12345 mom yes rot no
> fix 1 all nve
> fix 2 all   temp/rescale 100 300.0 300.0 10.0 1.0
> thermo 100
> thermo_modify lost ignore flush yes
> run 50000
>
>
> 2- atoms positions file 1(ID=1)
>
>  Lammps data.desription
>
>            3749  atoms
>            2   atom types
>
>            0  200 xlo xhi
>            0  200 ylo yhi
>          -0.5  0.5 zlo zhi
>
>  #Masses## must have one blank line
>  #
>  #          1   58.80000
>  #          2   58.80000
>  Atoms
>
>      1     1   0.00   0.00   0.00
>      2     1   0.00   1.94   0.00
>
>
>
> 3- atoms positions file 2(ID=2)
>  Lammps data.desription
>
>            12584   atoms
>            2   atom types
>
>            0  200 xlo xhi
>            0  200 ylo yhi
>          -0.5  0.5 zlo zhi
>
>  #Masses## must have one blank line
>  #
>  #          1   58.80000
>  #          2   58.80000
>  Atoms
>
>      1     2  30.31 101.10   0.00
>      2     2  30.31 103.04   0.00
>      3     2  30.31 104.98   0.00
>
> Yours Sincerely,
> Bahman Daneshian
>
> ------------------------------------------------------------------------------
> 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.