Issue in implementing fenewca

Skip to first unread message

Isha Malhotra

Jan 6, 2023, 11:00:37 AMJan 6
Hello everyone, 

I am trying to implement fenewca on a system consisting of a rigid body R as shown in the attached image. 

Blue ones are the constituent particles and green ones are the bonded particles to constituent particles. 

fenewca.params['AB'] = dict(k=7.5, r0=1.5, epsilon=1.0, sigma=1.0, delta=0.0),methods=[brownian],forces=[fenewca],rigid=rigid)

I am getting the following error: 

RuntimeError: Error in bond calculation

As soon as I remove fenewca, everything works fine. Please let me know the possible issues. 

Thanks a lot for your help. 

Isha Malhotra

Screenshot 2023-01-06 at 9.54.22 AM.png

Russell Kajouri

Jan 6, 2023, 11:18:38 AMJan 6

If there is a bond between the giant bead and the other beads, you should consider the exact distance between them,
Let's assume the giant bead's diameter is 10 \sigma, where \sigma is the unit of the length in your system, and the diameter of the other tiny beads is \sigma,
then the stable distance between every bond should be ( 10 + 1 ) / 2 \sigma. Therefore, you need to do a bit of algebra!

The other possible issue could be due to the stability of the bonds, is the distance between all bonds around  \sigma?
People usually simulate a few steps with a small timestep (dt = 0.001) to overcome the issue.

You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Nivedina Sarma

Mar 23, 2023, 8:14:58 PMMar 23
to hoomd-users
Hi Isha,

I'm also trying to implement a bond between a particle and a constituent particle of a rigid body. However, I'm getting stuck where we specify the particle IDs in the bond. I'm only able to create bonds with the center particle of the rigid body - not with constituent particles. When I indicate the particle IDs for the constituent particle and the other particle, I get the error that "particle tag out of bounds when attempting to add bond:..." This error goes away only if the particle IDs correspond to the center beads of the rigid body. Could you share how you made yours work?

Thank you!

Isha Malhotra

Mar 24, 2023, 7:00:49 AMMar 24
Hi Nivedina, 

You have to be careful with the index of the particles. 

I do the following:

1. snapshot.particles.types = ['R','B','A']

In the first stage, I specify the position of rigid centers and B particles which are free in my simulation. Let's say you have one R and one B particle, so their index would be 0 and 1. 

2. In the second step I specify the position of the constituent particle. Let's say I have one constituent particle. rigid.body['R']={"constituent_types":['A'],"positions":.....}

This particle would have index 2. 

R: 0
B: 1
A: 2

3. In this step you have to specify the bond between B and A so it would be between 1 and 2.[0]=[1,2]

I hope it helps. 

Best regards, 

Isha Malhotra

Nivedina Sarma

Mar 28, 2023, 7:40:11 AMMar 28
Hi Isha,

Thanks for explaining. Could you show me how you set up snapshot.bonds.groups so you can index it?

- Nivedina

You received this message because you are subscribed to a topic in the Google Groups "hoomd-users" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages