Hi,
I wanted to simulate a single rigid rod with an active force working along the bond with version 21 Nov 2023. The rigid rod was made using the “fix rigid” command, and the active force was applied through “fix propel/self” with dipole, so that the active force directed along with the rod’s orientation. But, from the dump file I have found that the active force is not functioning as intended. I computed the Mean Squared Displacement (MSD) with lag-time which shows only diffusive behavior. I am not getting any ballistic behavior due to activity. Currently I am am unable to resolve the issue for the active force. Can you please help. Below is the LAMMPS script
dimension 2
units lj
atom_style hybrid molecular sphere dipole
region simbox block 0 35 0 35 -0.01 0.01
create_box 2 simbox
molecule rod rod.txt
create_atoms 0 random 1 67865 simbox mol rod 32332
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
mass * 1.0
set mol * dipole/random 76848 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
comm_modify cutoff 5
fix 1 all rigid molecule langevin 1.0 1.0 0.001 564302
fix 2 all propel/self dipole 10.0
fix 3 all enforce2d
timestep 0.0001
compute T1 all temp/sphere
thermo_modify temp T1
thermo 1000
dump 10 all atom 1000 single_active_rod.dump
dump 20 all custom 100 Single_rod_pos_F10_Sim1.dat id type xu yu zu
run 100000000
the rod.txt file
5 atoms
Coords
1 0.0 0.0 0.0
2 1.0 0.0 0.0
3 2.0 0.0 0.0
4 3.0 0.0 0.0
5 4.0 0.0 0.0
Types
1 1
2 1
3 1
4 1
5 2
This is an incorrect assumption. The “dipole” option uses per-atom point dipoles to determine the orientation of the force, not a molecular dipole. In fact, since you do not assign charges to atoms, there is no dipole that is aligned with the geometry of the rod.
This command assigns random directions to the per-atom point dipoles which explains the unaligned assignment of the forces.
I’ve been taking a closer look and this seems to be a quite practical approach to construct active objects from multiple individual particles by leveraging the existing functionality originally intended only for individual extended particles.
But this requires that the individual point dipoles are created with the molecule and oriented accordingly. This requires extending the “molecule” command to support a “Dipoles” section and then generate the point dipoles according to the molecule orientation which may be random or prescribed externally.
I have implemented this and submitted it for inclusion in the next LAMMPS feature release as a pull request on GitHub: Add support for Dipoles section to molecule files by akohlmey · Pull Request #4046 · lammps/lammps · GitHub
Update:
Here are the modified input files and an animation of the run
Input:
dimension 2
units lj
atom_style hybrid molecular sphere dipole
region simbox block 0 35 0 35 -0.01 0.01
create_box 2 simbox
molecule rod rod.txt
create_atoms 0 random 30 67865 simbox mol rod 32332 overlap 1.0
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
mass * 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
comm_modify cutoff 5
fix 1 all rigid/small molecule langevin 1.0 1.0 0.001 564302
fix 2 all propel/self dipole 10.0
fix 3 all enforce2d
timestep 0.0001
compute T1 all temp/sphere
thermo_modify temp T1
thermo 10000
#dump 20 all custom 10000 Single_rod_pos_F10_Sim1.dat id type xu yu zu mux muy muz
dump 20 all image 100000 rods*.png type type size 800 800 zoom 1.5 fsaa yes ssao yes 324323 0.8
run 10000000
Molecule file:
Title
5 atoms
Coords
1 0.0 0.0 0.0
2 1.0 0.0 0.0
3 2.0 0.0 0.0
4 3.0 0.0 0.0
5 4.0 0.0 0.0
Types
1 1
2 1
3 1
4 1
5 2
Dipoles
1 1.0 0.0 0.0
2 1.0 0.0 0.0
3 1.0 0.0 0.0
4 1.0 0.0 0.0
5 1.0 0.0 0.0
1 Like
Excuse me, I have been working on a similar problem recently. Similar to what you described, my molecular rigid body is composed of three spheres, and I also want to add a self propulsion force. However, my sphere itself requires a dipole moment along the z-axis direction, and particles have dipole interactions with each other(pair_style lj/cut/dipole/cut). Therefore, it seems that my system is not very suitable for using fix prop/self dipole. I would like to inquire if there are any more specific methods to add self propulsion
What is available in LAMMPS is described in the manual. If you need something else, you will have to either implement it into LAMMPS (as C++ code) or look for a different software that has the ability you need.
Please keep in mind that most of the code in LAMMPS is contributed code from people that wanted to solve a problem where some piece was missing in LAMMPS and so they implemented and contributed it.
Thanks for your effort. But I tried to run the script provided by you for molecular dipole with active force with the version 29Aug-2024. But your script is not running for the lammps version 29-Aug2024. If you have already implemented and tested it, then could you please provide the src files so that I can recompile the lammps with these files and run your script.
This script does work for me with version 29Aug2024. The change in the pull request that you are referring to was added to the LAMMPS main development tree on January 18th 2024. You can see the confirmation also in the documentation. The description of the molecule file format in the documentation of the molecule command mentions that support for the Dipoles section was added in LAMMPS version 7Feb2024.
I also copied the two posted files and could run them without a problem with the 29Aug2024 LAMMPS version. So if it is not working for you (how?), then it must be due to something that you changed in addition or didn’t apply correctly when copying the two files.