Pour poyhedrons?

Is there a way to add (pour, deposit) polyhedron particles from a script (like fix pour for granular) ?

I use the following snippet to add molecules built with aspherical particles, which are not (currently) supported by the fix deposit command.

variable mol equal 100 # Deposition events.
variable i loop ${mol}

# This is the deposition loop.
label deposition
print "cycle $i/${mol}"

# Insert a molecule, rotate, and move it to its initial location.
read_data molecule.data add append group m$i
displace_atoms m$i rotate 0 0 0 ${r1} ${r2} ${r3} ${a0}
displace_atoms m$i move ${x0} ${y0} ${z0}
velocity m$i create $(v_tf) 107699 dist gaussian

# Integration fixes, computes, etc.

# Close the loop.
group m$i delete
next i
jump SELF deposition

The data file molecule.data contains only one molecule, whose centre-of-mass is conveniently shifted to (0,0,0). The displace_atoms command depends on variables defined depending on your needs, e.g. random x0,y0 coordinates and fixed z0. You also want to add your own stuff, like walls, etc.

EDIT I found it useful to put the deposited molecule in a separate group with its own integration fixes.

1 Like

Thank you!