Issue in implementing fenewca

64 views
Skip to first unread message

Isha Malhotra

unread,
Jan 6, 2023, 11:00:37 AM1/6/23
to hoomd...@googlegroups.com
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)


sim.operations.integrator=hoomd.md.Integrator(dt=0.0005,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

unread,
Jan 6, 2023, 11:18:38 AM1/6/23
to hoomd...@googlegroups.com
Hi

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.
 
Best
Russell

--
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 hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/CA%2BdjDeUoFE-WRrjpm_1ETBzNzguS5FZtaVQpC9DsarEbK01hmw%40mail.gmail.com.

Nivedina Sarma

unread,
Mar 23, 2023, 8:14:58 PM3/23/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!
Nivedina

Isha Malhotra

unread,
Mar 24, 2023, 7:00:49 AM3/24/23
to hoomd...@googlegroups.com
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. 

snapshot.bonds.group[0]=[1,2]



I hope it helps. 


Best regards, 

Isha Malhotra





Nivedina Sarma

unread,
Mar 28, 2023, 7:40:11 AM3/28/23
to hoomd...@googlegroups.com
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 https://groups.google.com/d/topic/hoomd-users/vjJ_0qFT8F4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/CA%2BdjDeXGj7fAiiY8oCnrz2yMYsPitK5C6mPTnF8%2BT1Sc%2BBe_ew%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages