Hello,
below I attach MWE (Minimal working example) along with the data file. How can I make that those four spheres will be perceived (in the subsequent simulation steps) as one body?
MWE.in (893 Bytes)
rigid_body.dat (208 Bytes)
Hello,
below I attach MWE (Minimal working example) along with the data file. How can I make that those four spheres will be perceived (in the subsequent simulation steps) as one body?
MWE.in (893 Bytes)
rigid_body.dat (208 Bytes)
What about fix rigid command — LAMMPS documentation ?
I might be missing something, but I could not apply any fix rigid command that would provide the desired result.
Then you have to explain in more detail how the desired results will manifest themselves.
The issue might be caused as I am, somehow, providing an improper syntax… So the principal idea is to combine, de facto, four objects (rigid_body.dat) into one. All four differ solely in diameter. As I get it right, after
read_data rigid_body.dat
I should provide a command that “unites” imported objects. Thus, according to the manual, the most suitable would be
fix 1 all rigid single
but it yields
ERROR: Temperature compute degrees of freedom < 0 (src/compute_temp.cpp:100)
This is because of an inconsistency or error in your input.
You are using atom style sphere (which is pointless, BTW, since your pair style lj/cut only considers point particles), but the temperature compute used by the thermodynamic output only considers point particles.
When you then apply fix rigid, it will subtract 6 DOFs per atom instead of the usual 3 for point particles and add 6 DOFs per rigid body. Thus you have:
4*3 - 4*6 + 6 = -6
The compute temp command rightfully refuses to compute a temperature for a negative number of DOFs.
if however you replace fix npt/sphere with:
compute rtemp all temp/sphere
thermo_modify temp rtemp
fix 1 all rigid single
The input should run without stopping prematurely.
Thank you very much for an in-depth comment and comprehensive hints. In accordance with your advice, I have substituted the relevant piece of code and it works fine. However, what I noticed, is that adding:
Replicate X Y Z
where X, Y, and Z stand for any (positive) integer, creates a one, big rigid object instead of, e.g., six independent. Nevertheless, after an instant second thought, it is quite obvious due to the fix that makes all things rigid. Thus, in order to have a group of objects (independent, i.e., separately time-integrated) I presume that the data, i.e. positions loaded from read_data, should be set as a separate and standalone group, add Replicate X Y Z and set, e.g., fix rigid/npt/small on the aforementiond group’s ID?
Fix rigid has multiple options for selecting how to group atoms into rigid objects. The rigid/small versions only accept the molecule ID. This is all explained in the documentation. I suggest that rather than presuming you give it a thorough read.