activate rotational degrees of freedom with 2d rigid body simulations, modifying atoms for rigid body particles, time steps

353 views
Skip to first unread message

Michael Goytia

unread,
Sep 8, 2016, 8:07:56 PM9/8/16
to hoomd-users
Hello,

I am trying to run a 2d simulations with rigid bodies(molecular triangles). 

In my current simulation hoomd is not registering rotational degrees of freedom.

*Warning*: Integrator #0: Anisotropic integration requested, but no rotational degrees of freedom found for its group


 I read some earlier posts that the moment of inertia needs to be set so I just put some random values to make sure that makes a difference but it did not. Is there something else I need to initialize the rotational degrees for rigid bodies ? Also if I do need moments of inertia, am I calculating the moment of inertia for the triangular molecular which then is modeled by the central particle? 

I want to make sure I have the correct mass for constituent particles I construct the rigid body with. I see the default value it gives is 1 and I was wondering how I access the class in which the particle data is stored?  I can set the positions and diameters with set_param but did not see a mass option. is this in hoomd.data? 

My last question maybe connected to the first two in which I can only get my simulation to run with such small time steps (~0.05 fs) before hoomd spits out 

**ERROR**: Particle with unique tag 13 is no longer in the simulation box.

**ERROR**: Cartesian coordinates:
**ERROR**: x: -8.32536 y: -50.6027 z: 0

**ERROR**: Fractional coordinates:

**ERROR**: f.x: 0.15311 f.y: -1.60845 f.z: 0.5

**ERROR**: Local box lo: (-12, -12, -12)

**ERROR**:           hi: (12, 12, 12)



Which I believe to be loosing atoms. 

I believe a 5 fs time step conserves energy in another simulation software(lammps). Wondering what might be causing the difference? ( All my units are consistent between simulation platforms)

I have also attached a copy of my input file.

Thanks,

Michael Goytia
      
rand.py

Jens Glaser

unread,
Sep 8, 2016, 9:00:19 PM9/8/16
to hoomd...@googlegroups.com
Michael,

you’re almost there.


On Sep 8, 2016, at 8:07 PM, Michael Goytia <goy1...@gmail.com> wrote:
In my current simulation hoomd is not registering rotational degrees of freedom.

*Warning*: Integrator #0: Anisotropic integration requested, but no rotational degrees of freedom found for its group


 I read some earlier posts that the moment of inertia needs to be set so I just put some random values to make sure that makes a difference but it did not. Is there something else I need to initialize the rotational degrees for rigid bodies ? Also if I do need moments of inertia, am I calculating the moment of inertia for the triangular molecular which then is modeled by the central particle? 

Yes. They need to be assigned to the central particles.

from your script

s.particles.moment_intertia = [[10,10,10],[10,10,10],[10,10,10]]
^^^^^^^^^^
try correcting the typo?

I want to make sure I have the correct mass for constituent particles I construct the rigid body with. I see the default value it gives is 1 and I was wondering how I access the class in which the particle data is stored?  I can set the positions and diameters with set_param but did not see a mass option. is this in hoomd.data? 

the constituent particles do not need mass or moment of inertia. Only the central particle, because it is the only one being integrated.

My last question maybe connected to the first two in which I can only get my simulation to run with such small time steps (~0.05 fs) before hoomd spits out 
Which I believe to be loosing atoms. 

I believe a 5 fs time step conserves energy in another simulation software(lammps). Wondering what might be causing the difference? ( All my units are consistent between simulation platforms)

try the above :)

Jens

I have also attached a copy of my input file.

Thanks,

Michael Goytia
      

--
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 post to this group, send email to hoomd...@googlegroups.com.
Visit this group at https://groups.google.com/group/hoomd-users.
For more options, visit https://groups.google.com/d/optout.
<rand.py>

Michael Goytia

unread,
Nov 14, 2016, 8:17:27 PM11/14/16
to hoomd-users
Hello All,

I am still stuck on understand some concepts about setting up rigid bodies.

I have made two "center" particles which are surrounded by their constituent particles. 

I assumed the distances from the "center" particles be that the "center" particle is the center of mass and the distances are then the length from center of mass using the command 

rigid.set_param('7',positions=[(A[0],A[1],A[2]),(B[0],B[1],B[2]),(C[0],C[1],C[2])],types=['1','2','3'],diameters=[sig[0],sig[1],sig[2]])


where A,B, and C are just the arrays for distances of each particle from the center.


I then assume that the mass of the central particle is then equal to the mass of the overall mass of the rigid body I using. 


In this example case I am just modeling a rigid water molecule in two-dimensions.


Are the two assumptions I made , 1) constituent molecules distances are distances from the center of mass and 2) Mass of the rigid body is the total mass of the rigid body, in this case a water molecule or 16 atomic units, formulated correctly?


Secondly, even after all the proposed changes and specifying the correct moment of inertia, I still am getting no rotational motion, just translational.  I am wondering what I am doing wrong.


I attached all my scripts and I am using hoomd 2.0.2


Thanks


Michael Goytia

init2.xml
run.py

Michael Goytia

unread,
Nov 21, 2016, 1:20:25 AM11/21/16
to hoomd-users
Hello,

Does anyone have the slightest idea what might be going on? 
1) Even when I go from a 2d to 3d I still get same error and have no rotational degrees of freedom. 
2) I have even tried this on the latest version as well, 2.1.1
3) I changed the initialization from init to gsd

I really would like to use this version of hoomd as I have come to a wall in an earlier version, where I feel like this version will fix it. Does anyone have an idea what might be wrong. Or if you don't, can you just tell me you don't understand or that you are too busy to attend to this. 

Thanks,

Michael Goytia 

Jens Glaser

unread,
Nov 21, 2016, 9:09:37 AM11/21/16
to hoomd...@googlegroups.com
Michael,

you are initializing with XML version 1.4. This version still accepted full moment-of-inertia matrices. You should bump
the version of your XML file to 1.6, where only diagonal moment of inertia components are accepted. Plus, change
the XML category ‘inertia’ to ‘moment_inertia’.

Going forward, using .gsd would be a good idea, but you have to make sure that the moments of inertia are correct.

Jens

Michael Goytia

unread,
Nov 21, 2016, 12:05:53 PM11/21/16
to hoomd-users
Jens,

Thanks for getting back to me. I tried the suggested corrections for .xml approach and it works! I also got the .gsd to work !(typo of spelling inertia wrong.....)

I still have a question about the mass of the central particle that represents the rigid body. I am currently thinking of that mass as the total mass of the rigid body. Is this a correct assumption? I have noticed this affects my tilmestep.

Also once I get this all figured out would you mind if I write it all up in a tutorial for rigid bodies ? 

Thanks for all your patience and help,

Michael Goytia

Jens Glaser

unread,
Nov 21, 2016, 12:11:39 PM11/21/16
to hoomd...@googlegroups.com
Michael,

Thanks for getting back to me. I tried the suggested corrections for .xml approach and it works! I also got the .gsd to work !(typo of spelling inertia wrong.....)
Glad to hear!

I still have a question about the mass of the central particle that represents the rigid body. I am currently thinking of that mass as the total mass of the rigid body. Is this a correct assumption? I have noticed this affects my tilmestep.

Yes. It is the total mass as it affects the translational degrees of freedom.

Also once I get this all figured out would you mind if I write it all up in a tutorial for rigid bodies ? 


No, of course not. Please go ahead! We sorely need such a tutorial.
You can contribute to the documentation by submitting pull requests via bitbucket, https://bitbucket.org/glotzer/hoomd-blue

- Jens
Reply all
Reply to author
Forward
0 new messages