Fix deposit question

Dear all,

``

I am using the command of **fix deposit** to insert a single atom. As mentioned in the doc page: **fix deposit** is used to “Insert a single atom or molecule into the simulation domain every M timesteps **until N atoms** or molecules have been inserted``”


`But, In my case, **I want to insert N atoms every M step during a run.**`

`**Would you please give me some advice?**`

`For ex: I have tried with command bellow to insert 5 atoms every 100 step during a run. But only 5 atoms have inserted during a run even if I used **if command** (see last column: from 2701 to 2706 atoms).`

`*variable times_step equal step%100*`

`*if "${times_step}==0" then "fix add flow deposit 5 1 100 753479 region slab_addatoms near 1.5 units box”*`

``

`VU`

….

Reading restart file ...
restart file = 17 Nov 2016, LAMMPS = 17 Nov 2016

...

fix style: STORE, fix ID: layers_COMPUTE_STORE

fix style: STORE, fix ID: ccl_dm2ns_COMPUTE_STORE

Neighbor list info ...

1 neighbor list requests

update every 1 steps, delay 10 steps, check yes

max neighbors/atom: 2000, page size: 100000

master list distance cutoff = 5.5

ghost atom cutoff = 5.5

binsize = 2.75, bins = 7 7 41

Setting up Verlet run ...

Unit style : lj

Current step : 0

Time step : 0.005

Memory usage per processor = 4.73973 Mbytes

Step Time Temp PotEng TotEng Press Volume Atoms

0 0 0.9409541 -26.361013 -24.950104 -0.88415513 31410.765 2701

2000 10 0.92860307 -26.225806 -24.840086 -0.88854218 31410.765 2706

4000 20 0.93187283 -26.215475 -24.824876 -0.89704611 31410.765 2706

6000 30 0.94487668 -26.249573 -24.839569 -0.92969805 31410.765 2706

8000 40 0.93304073 -26.231946 -24.839605 -0.90708322 31410.765 2706

10000 50 0.93893441 -26.231227 -24.83009 -0.91185486 31410.765 2706

12000 60 0.95178871 -26.223367 -24.803048 -0.90363505 31410.765 2706

14000 70 0.95680503 -26.23586 -24.808056 -0.87401735 31410.765 2706

16000 80 0.94582382 -26.209286 -24.797868 -0.8959333 31410.765 2706

18000 90 0.94511809 -26.20556 -24.795196 -0.90611926 31410.765 2706

20000 100 0.97090165 -26.243346 -24.794506 -0.93536686 31410.765 2706

You can only deposit one particle on each deposition timestep. This is not a big deal, because you can still increase the deposition rate by:

  1. Decreasing the interval M between deposition steps
  2. Decreasing your timestep size

Aidan

Thank you **Aidan** *for your response* in this matter.

But I only want to insert N atoms every M step during a run, not just **until** N atoms have been inserted.

Thanks to any helpful reply.

With best wishes,

VU

Thank you *Aidan **for your response *in this matter.

But I only want to insert N atoms every M step during a run, not just
*until* N atoms have been inserted.

​when you insist on this, you should give at least a good reason, why you
need to insert N atoms every M steps instead ​of 1 atom every M/N steps.

axel.

Thank you Axel,

Why I need to insert N atoms every M steps instead of 1 atom every M/N steps, because I want to control the averaged density rho in a sub-zone (Muy) of the molecular region to density target rho_ target.

The difference between rho and the targeted density ρ_target is converted into a number of atoms abs(N) such that N = int[(rho_ target − rho )*V], here V is the volume of the sub-zone. The fix deposit can insert N atoms every M step until N atoms have been inserted during a run, but the rest atoms could move to the other sub-zone of the molecular region during a run. So, we could not obtain the density we want in the sub-zone Muy.

This is why I want to check every M times step if the density rho in the sub-zone Muy get to the density target or not.

Thanks a lot for your helpful reply.

VU

Thank you Axel,

Why I need to insert N atoms every M steps instead of 1 atom every M/N
steps, because I want to control the averaged density *rho* in a sub-zone
*(Muy)* of the molecular region to density target *rho_ target*.

The difference between rho and the targeted density *ρ_target* is
converted into a number of atoms *abs(N)* such that *N = int[(rho_ target
− rho )*V],* here V is the volume of the sub-zone. The *fix deposit*
can insert N atoms every M step *until* N atoms have been inserted during
a run, but the rest atoms could move to the other sub-zone of the molecular
region during a run. So, we could not obtain the density we want in the
sub-zone *Muy*.

​your logic doesn't make sense. if you insert single atoms more frequently,
rather than a larger number less frequently is no difference. more
importantly, if you check only every M steps, then that is violating your
requirements of maintaining density just as much.

This is why I want to check every M times step if the density *rho* in
the sub-zone *Muy *get to the density target or not.

​you cannot do this kind of insertion with fix deposit. fix deposit can
only insert atoms at a fixed rate. you will have to write your own fix, and
it will be more complex. since you mention molecules, have you considered
how difficult it is to insert a molecule into a (dense?) system without
overlaps? ​how are you going the "heal" the high potential energy due to
insertion and how do you think this will work, when you insert multiple
atoms/molecules at the same time, which will throw your system even further
off its equilibrium than when inserting a single atom/molecule?

axel.

Perhaps you should look at fix gcmc.