# How to create agents with rigid shape

**URL:** <https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666>\
**Category:** Modelling & Simulations\
**Tags:** question, agents\
**Created:** [February 15, 2023, 5:33am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666 "2023-02-15T05:33:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Thomas](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@John\_Thomas](https://discourse.julialang.org/u/John_Thomas)\
**Post date:** [February 15, 2023, 5:33am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/1 "2023-02-15T05:33:54Z")

</div>

Hello, recently I try to simulate the random walk movement of human cells.  
I need to make agents(cells) with certain radius and they have to move randomly.  
I want the cells to not overlap in their respective radii as they move.  
Is there related native function in Agents.jl?

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [February 15, 2023, 10:03am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/2 "2023-02-15T10:03:57Z")

</div>

Hello,

nope, at the moment agents with rigid size and shape are not supported. Would be very nice to have to so if you end implementing something like this please do consider a contribution!

---

<div class="post-metadata">

**Author:** ![jgreener64](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jgreener64/32/2483_2.png) [@jgreener64](https://discourse.julialang.org/u/jgreener64)\
**Post date:** [February 15, 2023, 11:51am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/3 "2023-02-15T11:51:36Z")

</div>

You could try [Molly.jl](https://juliamolsim.github.io/Molly.jl/stable) with a soft sphere potential.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [February 15, 2023, 11:58am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/4 "2023-02-15T11:58:27Z")

</div>

Good idea! One more ecosystem integration example would be amazing 🙂

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [February 15, 2023, 12:05pm UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/5 "2023-02-15T12:05:02Z")

</div>

Note that the integration example with CellListMap.jl is essentially that, just that each particle has a different radius, and the spheres are very soft (by increasing the k constants one can avoid overlapping of the circles).

[https://juliadynamics.github.io/Agents.jl/dev/examples/celllistmap/](https://juliadynamics.github.io/Agents.jl/dev/examples/celllistmap/)

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [February 15, 2023, 12:11pm UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/6 "2023-02-15T12:11:27Z")

</div>

Yes, but I think the user also wants to ensure that during _initialization of the model_ there is no agent overlap, which I think the Cell List Map integration does not do, right?

CU!

George (he/him)

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [February 15, 2023, 12:16pm UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/7 "2023-02-15T12:16:43Z")

</div>

Oh, no, there the initial positions of the agents are random. To avoid overlap at the initial point one can minimize the energy of the system, as defined there. In fact, that is exactly how [Packmol](https://m3g.github.io/packmol/) works, and it can be useful to build initial positions for random particles, without overlaps.

---

<div class="post-metadata">

**Author:** ![John\_Thomas](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@John\_Thomas](https://discourse.julialang.org/u/John_Thomas)\
**Post date:** [February 16, 2023, 2:25am UTC](https://discourse.julialang.org/t/how-to-create-agents-with-rigid-shape/94666/8 "2023-02-16T02:25:07Z")

</div>

Thank you so much for your replies!! I’ll take a look at the various methods you guys given me.
