can not create random molecules inside region volume

Dear lammps users,
I am running a simulation that includes creating molecules or atoms on the boundary. I have tried many times, but all the adding molecules are not added as a whole molecules, but in the forms of separate atoms. Also, some of the atoms can not be added to the required region, but far outside the region.
I am using the current lammps-17Nov16 version with rigid and MISC package compiled.
I tried to run with fix deposit to create molecules,but only 2 out of 100 molecules are added, I don’t know what’s happened to the others.
So is there a specific algorithm that limit the coordinates of new atoms? Like the overlapped atoms will not be added? Or they will be added out side the region?
Attached the script that I use to calculate boundary region and conduct molecules adding. I appreciate you help in advance.

Best,
Dan

in-DPD_NV.block (3.99 KB)

1.script (1.32 KB)

Dear lammps users,
I am running a simulation that includes creating molecules or atoms on the
boundary. I have tried many times, but all the adding molecules are not
added as a whole molecules, but in the forms of separate atoms. Also, some
of the atoms can not be added to the required region, but far outside the
region.
I am using the current lammps-17Nov16 version with rigid and MISC
package compiled.

FYI, ​the *current* version of lammps is ​13 Apr 2017, the latest stable
version is 31 March 2017.

I tried to run with fix deposit to create molecules,but only 2 out of 100
molecules are added, I don't know what's happened to the others.
So is there a specific algorithm that limit the coordinates of new atoms?
Like the overlapped atoms will not be added? Or they will be added out side
the region?
Attached the script that I use to calculate boundary region and conduct
molecules adding. I appreciate you help in advance.

​your scripts are horribly complex, convoluted and near unreadable. i doubt
that anybody will even try to debug them.

i suggest you provide instead a minimal(!) small and self contained input
example that shows only the deposition process behaving unexpectedly. rule
of the thumb: the simpler and smaller the demo, the easier it is to figure
it out, the better your chances to get a helpful answer.

​axel.​

Dear Axel,
Thank you so much for your suggestion. Here is the brief input I want to do: I have a lipid bilayer system with height 5 Rc (-7 to -2), and I am adding lipid molecules to the boundary of it.

  1. I defined the lipid molecule with molecule command:(as in attached file)
    molecule lipidmolu lipidu.mol

  2. I defined a small region on bounday, at the top layer of the lipid bilayer
    region upper block 34 35 24 25 -5 0 side in units box

  3. Then two lipid molecules are added to this region
    create_atoms 0 random 2 49380 upper mol lipidmolu 67432

The problem is the lipid molecules were not added as molecules, but seems that they are adding as individual atoms. Since the lipid tail part of the bilayer was the most compact part, those lipid tail atoms were added very far beyond the bilayer and outside the defined region.
I read the document for create atoms carefully: the entire molecules will be added to the region with a random rotation and and they will be added on consistence with the region volume. I don’t know in which situation will I see the unexpected adding as I mentioned above. I understand the overlapping is expected, but seems that for my case, the overlapped atoms just got kicked off the region.

I also tried fix_deposit command with the same region defined and same molecule defined, but only 2 out of 100 molecules were added, others were ignored?

I am wondering how to solve the issue, I wish to add molecules in the defined region, regardless of any overlapping. Also, I am running with version lammps-17Nov16 on super conmupter with 24 cores.

Thank you!

Dan Ma

lipidu.mol (998 Bytes)

Dear Axel,
Thank you so much for your suggestion. Here is the brief input I want to
do: I have a lipid bilayer system with height 5 Rc (-7 to -2), and I am
adding lipid molecules to the boundary of it.

​this doesn't really help. you are still forcing people to fill in all the
blanks, i.e. come up with everything that is​ missing. that takes a lot of
time and thus your chances to get help will be essentially zero. let me
repeat the advice i have already given you:

i suggest you provide instead a minimal(!) small and self contained input
example that shows only the deposition process behaving unexpectedly. rule
of the thumb: the simpler and smaller the demo, the easier it is to figure
it out, the better your chances to get a helpful answer.

​axel.​

Dear Axel,
Thank you again for your reply. But I think the tricky issue is the bilayer structure, which I can not show how is it in a short demo. I attached two figures to show what I am trying to do, hope it works this time. Also attached a short version of my input script without bond and pair coefficient.

dimension 3

boundary p p p
units lj
atom_style full
timestep 0.006

#read_data 24HM_s70_density.data

read_restart RS1.restart
neighbor 0.5 bin

#neigh_modify delay 2
comm_modify vel yes

create initial velocities

velocity all create 0.8 2984 dist gaussian

Output

thermo 10
restart 10000 RS1.restart RS2.restart
dump 1 all atom 10000 dpd.*.lammpstrj
dump_modify 1 pad 5

molecule lipidmolu lipidu.mol
region upper block 34 35 24 25 -5 0 side in units box
delete_atoms porosity upper 1 32071 compress yes mol yes

create_atoms 0 random 2 49380 upper mol lipidmolu 67432

fix 1 all nve/limit 0.02
run 1000

I expected to add lipid molecules to the boundary region, with cross area 1*1 and height 5. The number density of the system is 3. So I deleted all the water molecules in region and then add lipid molecules (13 atoms per molecule) to that region. The result as you can see on the other figure was that the molecules were added individually and outside of the box.

Please let me know if you have any question understanding the script.

Thank you!
Dan

Capture.JPGCapture2.JPG

Dear Axel,
Thank you again for your reply. But I think the tricky issue is the
bilayer structure, which I can not show how is it in a short demo.

you are not paying attention. ​but it is *irrelevant* to have the *entire*
bilayer included. in fact, you don't even need the bilayer at all. i have
asked to you build a small test case. all this has to do is to demonstrate
that thing go wrong. this is you can do it with simple small chunk of a
lennard jones liquid or even an empty box.

I attached two figures to show what I am trying to do, hope it works this
time.

​no it doesn't.​

so i've put in some effort to into giving you an example for what i mean.
what i am seeing - before even worrying about depositing - is, that your
molecule file is bogus. the following input script creates an empty box and
then places a single molecule into the center and writes it out as an image
and data file (both are required to actually see your bonding pattern,
trajectory dumps don't carry that information, which is why you believe,
that there are no bonds. they *are* there, they are just bogus and VMD's
heuristic guessing doesn't see them).

so before anything else, you must correct your molecule file. in the
future, please make a better effort to make certain, that what you are
providing is meaningful and correct. having to find out that you have
provided bogus input data is extremely annoying (btw: also your molecule
file has no charge information, even though you are using atom style full).

then you can just try running fix deposit in a sub-region of the (otherwise
empty) box and continue to build a more complex mockup of your actual
target system step-by-step, checking at every step, whether things are
still working or when they fail. this is what you should have done yourself
from the beginning, and that is how you avoid embarrassing yourself in
front of the thousands of subscribers of this list.

please be aware that you have now exhausted my quota of good will and i
will not respond to further requests for help unless you make sure that the
provided information is proper and complete, you provide convincing
evidence for a fault in LAMMPS and it is easy to help.

axel

units lj
atom_style full
boundary p p p
region box block -10 10 -10 10 -20 20
create_box 10 box bond/types 5 angle/types 10 &
           extra/bond/per/atom 4 extra/angle/per/atom 4
extra/special/per/atom 20
mass * 1.0
molecule lipid lipidu.mol

create_atoms 0 single 0.0 0.0 0.0 mol lipid 887766

write_dump all image add.jpg type type
write_data add.data

Capture.JPG

Capture2.JPG