Replies: 5 comments
-
Add:
to include the diameters in your output. |
Beta Was this translation helpful? Give feedback.
-
Thank you, Joshua. Where exactly should I insert the command line? Like this? Configuration of GSD outputgsd_writer = hoomd.write.GSD( Also, do I need to include the following at the beginning of the code? import gsd.hoomd Finally, my code does assign the diameters of both the colloids and the depletants: snapshot.particles.diameter[:N_coll] = D_coll # Colloids However, regardless of the values I assign, another script I use to read the trajectory.gsd file always outputs: I'm not sure what I'm doing wrong — the simulation itself behaves as expected, which makes this even more confusing. I just can't seem to get the correct diameters written to the GSD file. Thanks again for your help (and for HooMD, which is truly a fantastic tool!). |
Beta Was this translation helpful? Give feedback.
-
You can place You do not need to |
Beta Was this translation helpful? Give feedback.
-
Thank you so much, Joshua! I followed your approach and it worked perfectly. I also fixed an issue in the GSD reading script that was causing problems. Everything is running smoothly now. My next step is figuring out how to display particles in Ovito with the specific diameters I defined in my simulation. |
Beta Was this translation helpful? Give feedback.
-
Everything appears to be working correctly in Ovito now. The diameter being written in the GSD trajectory file, the particles are properly sized in the Ovito viewer. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm using HOOMD to simulate the behavior of large spheres (colloids) in a bath of smaller spheres (solvent). A DPD framework is used along with a Lennard-Jones potential. I specified a diameter of 1.2 for the colloids and 0.08 for the solvent particles.
The simulation runs correctly, and I can read the outcome (trajectory.gsd) in Ovito.
However, using Ovito is annoying because I have to specify the diameters of the two types of particles every time I read the GSD file with Ovito. If my understanding is correct, this is because Ovito reads radius, not diameter.
Before switching definitely to another viewer like ChimeraX, I started examining the content of my GSD file to see if I could change something to make Ovito read a radius.
I noticed that the diameters I specified in my HOOMD Python code are overwritten in the trajectory.gsd file. All the diameter data are set to 1.0 (not 1.2 and 0.08).
I must be doing something wrong, but I don't know what.
Here is the part of the code dedicated to the gsd outcome :
I’m not copying the entire code to keep this message clear, but I can if necessary.
Many thanks for your help.
Damien
Beta Was this translation helpful? Give feedback.
All reactions