I’m using the latest LAMMPS release, April 2024, on an Ubuntu Machine.
I’m trying to simulate a colloidal model by trying to utilise experimental Hamaker constants and applying them to a model system of similar scales.
I’m writing here for suggestions on how to handle the minimisation and equilibriation of the system. I observe that as the particles enter the region of influence of each other, the system blows up (when potential energy drops below 0).
I’ve tried smaller timesteps, but this just seems to delay the process. Analysing the trajectories shows me that many particles collide as the system blows up. I would like any ideas on how I can equilibriate such a system.
Your description is extremely vague, so you cannot expect any specific suggestions.
I would suspect that the problem is not so much in the equilibration workflow but rather in the system setup and particularly the choice of geometry and potential parameters and simulation settings.
Apologies for not attaching more information, my input script was convoluted with a lot of unnecessary information and needed to be cleaned up.
Please find a simplified version of my input script attached below:
units cgs
dimension 3
atom_style sphere
boundary p p p
neighbor 5e-6 multi
comm_modify vel yes mode multi
newton off
region box block -0.001 0.001 -0.001 0.001 -0.002 0.002 units box
create_box 2 box
create_atoms 1 random 9894 34875 NULL overlap 3.5e-05 maxtry 5000 units box
create_atoms 2 random 1010 79285 NULL overlap 3.5e-05 maxtry 5000 units box
set type 1 diameter 2e-06 density 2.05
set type 2 diameter 3.5e-06 density 13.49
pair_style hybrid/overlay colloid 8.785e-06 #&
# yukawa/colloid ${kappa_am} ${rc_yuk} &
# lubricate/poly 1.0e-3 1 1 ${rc_inn} ${rc_yuk} 1 1 &
# brownian/poly 1.0e-3 1 1 ${rc_inn} ${rc_yuk} 300.0 65482 1 1
pair_coeff 1 1 colloid 3e-12 4e-07 2.002e-06 2.002e-06 5.02e-06
pair_coeff 2 2 colloid 3e-12 8e-07 3.5035e-06 3.5035e-06 8.785e-06
pair_coeff 2 1 colloid 3e-12 6e-07 3.5035e-06 2.002e-06 9.75e-06
variable tim_step equal 1E-9
timestep ${tim_step}
variable tdamp equal 100*${tim_step}
variable pdamp equal 5000*${tim_step}
minimize 1e-150 1e-150 5000000 10000000
velocity all create 300.0 406659 mom yes rot yes dist gaussian loop geom
thermo 1
fix thermostat all langevin 300 300 ${tdamp} 65481 omega yes
fix const_baro all press/berendsen aniso 0 1.013e6 ${pdamp}
fix NP all nve/sphere
run 1000000
unfix NP
unfix const_baro
unfix thermostat
I picked a sigma that’s 5 times smaller than that of particle type 2, as I intend to use an explicit LJ fluid in the future. The order of the Hamaker constant was obtained from
Schunk, Peter Randall, et al. “Performance of mesoscale modeling methods for predicting rheological properties of charged polystyrene/water suspensions.” Journal of Rheology 56.2 (2012): 353-384.
I seem to have overlooked something very important. I was running the simulations with GPU acceleration in all of my tests, causing the pressure and temperature to be computed as “nan”.
With GPU acceleration turned off, the simulations seem to be running alright (bug?). I’m using CUDA version 12.3.107 on a ADA89 generation RTX3500 GPU, with the LAMMPS GPU library built for the corresponding architecture
Meanwhile, I’ll be extremely grateful if anyone with experience in colloidal simulations can comment on the physical (in)validity of the above script.
You are not likely to find this kind of information here. This forum can help with syntax errors and semantic issues in how to enable or use a feature, but when it comes to the choices that are relevant to your specific research, you have to look to your adviser or tutor first for assistance. If that is not sufficient, you or your adviser may have to look for a sufficiently experienced collaborator.
To give an example: I can copy your input example and determine that I cannot run this input at all, which makes your claims about only the GPU package giving garbage results questionable. I can also empirically find that using fix press/berendsen is the primary cause for problems and something that seems a bit superfluous since the pressure values are “normal”. I can also empirically find that your timestep seems to be too large, since I am getting errors of large/large particle overlaps. But those are things that you could be and should be testing just as well, and not really telling you anything about the validity of your model. The only thing that I can tell you about this is that when people use hybrid pair styles and particularly hybrid/overlay, there is a good chance that the model is bogus, because they just slap together things that are not designed to be used together. Again, this requires significant in-person assistance from somebody familiar with this area of research and thus not something easily accessible in a public forum, since the application you are trying out is rather exotic.
I’m using these set of force fields as they’ve been listed to work together in the LAMMPS documentation and on
Bolintineanu, Dan S., et al. “Particle dynamics modeling methods for colloid suspensions.” Computational Particle Mechanics 1 (2014): 321-356.
I derived the model and force field parameters and time step based on this paper (albeit with different particle sizes) where @sjplimp was a co-author. Hence I was hoping he’d be able to weigh in on the model.
Schunk, Peter Randall, et al. “Performance of mesoscale modeling methods for predicting rheological properties of charged polystyrene/water suspensions.” Journal of Rheology 56.2 (2012): 353-384.
I’ve spent the past week trying to recheck all the calculations and validating the methods and fixes used, by incrementally applying them in the script, with very little luck.
Hence I’m reaching out on the mailing list to hopefully see if anyone else using these pair styles have faced similar issues, and how they overcame them.
Please note that @sjplimp has retired from Sandia and doesn’t follow the forum (anymore).
As I already pointed out, chances for this are extremely small, basically non-existent.
You can see from the user activity page of the forum at Materials Science Community Discourse who is responding, and you can infer from their responses what their expertise is.
It is a normal situation, especially at the beginning of a project, that things don’t work as expected and everything takes a long time. This is because you have not fully understood all relevant details. Once you have understood it, which may take a long time depending on your personal skills of figuring out things and training yourself, it will go fast until you hit the next barrier. Thus, being able to handle this level of frustration (often 80-90% of the time) is an important skill for any person doing research.