2questions

Dear all,

I have two questions. It would be very kind of you if you help me.

  1. I need to save my simulation till a specific time step and start from that time step to run different simulations. I mean all of the simulations of mine are the same till a specific time step. So I would like to save time by starting from that step. Is it possible to do this by lammps?

  2. About the periodic boundary condition, I want to see “ ONLY ” the initial atoms of the box by visualizing the dump. The box is defined by: region box block 0 30 0 30 0 90 units box
    And another group inside this box is defined as box2: region box2 block 1 28 1 28 1 88 units box
    I dump out the group box2 by: dump 3 box2 atom 1000 dump3h.indent . But when I apply loads during simulation, I can see other atoms out of the group box2 ( they are not only the initial atoms that I want to see).

Thanks in advance,
Nazanin

Comments below.

Dear all,
I have two questions. It would be very kind of you if you help me.

1. I need to save my simulation till a specific time step and start from
that time step to run different simulations. I mean all of the simulations
of mine are the same till a specific time step. So I would like to save time
by starting from that step. Is it possible to do this by lammps?

See the restart command to save on a timstep, and the read_restart command
to start up from that file.

2. About the periodic boundary condition, I want to see “ ONLY ” the initial
atoms of the box by visualizing the dump. The box is defined by: region
box block 0 30 0 30 0 90 units box
And another group inside this box is defined as box2: region box2
block 1 28 1 28 1 88 units box
I dump out the group box2 by: dump 3 box2 atom 1000 dump3h.indent . But
when I apply loads during simulation, I can see other atoms out of the group
box2 ( they are not only the initial atoms that I want to see).

Groups and regions are not the same thing. With a dump command
you can specify a group, and you can specify a region (with the
dump_modify region
option). By using those in combination you should be able to output
most any subset of atoms you want.

thanks for you help,steve.
regarding to the first problem of my previous email, I use these two input scripts as an example of using restart and read_restart:

#cutoff=4.2

restart 50 tmp.restart

units metal
boundary p p p
lattice bcc 3.015

variable lx equal 30
variable ly equal 30
variable lz equal 90
variable lz2 equal {lz}-10 variable lx2 equal {lx}-10
variable ly2 equal ${ly}-10

region box block 0 {lx} 0 {ly} 0 ${lz} units box
region box2 block 1 28 1 28 1 88 units box

create_box 2 box
create_atoms 1 region box basis 2 2

group box2 region box2

#Foils EAM
pair_style eam/fs
pair_coeff * * NiTi.FS Ni Ti
timestep 0.001

thermo_style custom step temp pe press lx ly lz
thermo 100

initial velocities

velocity all create 400.0 5812775 units box
fix 1 all npt temp 400 400 0.01 aniso 0.0 0.0 10 drag 0.2

dump a box2 atom 1000 dump.indent
dump t box2 atom 5000 dump-box2-total.indent
dump k all atom 5000 dump-all-total.indent

equilibrium

run 1000

unfix 1

undump a

dump 2 box2 atom 4000 dump2c.indent

fix 3 all npt temp 300 300 0.01 aniso 0.0 0.0 10 drag 0.2
run 1000
unfix 3

undump 2

dump 3 box2 atom 1000 dump-l.indent

Store final cell length for strain calculations

variable tmp equal “lz”
variable L0 equal {tmp} print "Initial Length, L0: {L0}"
fix 1 all nvt temp 10 10 1.0
variable srate equal 1.0e9
variable srate1 equal “v_srate / 1.0e12”
fix 2 all deform 1 z erate ${srate1} units box

variable strain equal “(lz - v_L0)/v_L0”
variable stress equal “-pzz/10000”
fix fprint1 all print 100 “{strain} {stress}” file S_S.data screen no

run 5000

and the other input is:

#just for test
read_restart tmp.restart.50

fix 3 all npt temp 400 400 0.01 aniso 0.0 0.0 10 drag 0.2
run 5000

But I got this error: atom sorting has been size=0.0

I have not been able to resolve the problem by reading the documentation.
I am Sorry whether my problem is so elementary!!

But I got this error: atom sorting has been size=0.0
I have not been able to resolve the problem by reading the documentation.

See doc/Section_errors.html and look for that message. It explains
what to do.

This is happening b/c in your restart script you have not
defined a pair potential. So there is no cutoff defined, and you
will not be able to evolve the atoms further, even if you fix the
error message. EAM potentials are not stored in the restart
file b/c their data is in a file. So you need to specify a pair_coeff
command in the restart script to re-read that file (which will
set your cutoff), then you won't get the error, even w/out using
atom_modify.

Steve

Dear Steve,

The important thing to me is dumping out the whole initial atoms, whether or not they leave the specified region. Also I want to visualize “ONLY” those atoms not the atoms enter to the box later.

To clarify my main problem, I briefly describe the whole procedure ( my major problem is when I bend the system ):
At first I have boundary p p p. after equilibration at 400 K, I cool the system down to T=10 K. Now I want to bend it. So I change the boundary condition to non-periodic one by the command “change_box all boundary s s s “. After bending, I convert it again to boundary p p p by the command “change_box all boundary p p p “. Now I would like to heat the system to see whether it is able to recover its original shape and size ( what is called SHAPE MEMORY EFFECT ). HERE I have problem in visualizing the system because of PBC.

Thanks,
Nazanin

Hi,

QUESTION to Nazanin : In a MD simulation If you bend the system by applying a force, and then you remove the force, will the system recover its original shape? Think about it …

Oscar G.

hi Oscar,
I think, it will recover a part of strain that is elastic strain at the time the force is removed. But some materials which have shape memory property recovers a part of the plastic strain by special thermomechanical cycles. my problem is in visualizing these loaded-atoms after unloading to see if this shape recovery happens when some other atoms enter to the dump and annoy!!!

If you want only a certain set of atoms in the dump file,
and they never change, then that is what the "groups" in
LAMMPS are met to do. Put the right atoms in the group
initially and you can dump only them, wherever they are.

Steve