Questions about KSPACE

Hiya,

My name is Alexander Petkov, I am a PhD student and have recently started using LAMMPS. I’ve been trying to do runs calculating bulk gallium oxide’s thermal conductivity, followed by plans to extract TBR between gallium oxide and other materials.
I’ve been using [pair_style buck/coul/long] for bulk gallium oxide, which includes coulombic interaction. This, however, requires me to use KSPACE and define a kspace_style. That’s all fine and good, until the calculation starts running. First, it becomes significantly more expensive computationally (unlike runs with equivalent code, say for bulk silicon or diamond). Also, the calculation crashes at the very end (again, unlike my runs for silicon or diamond, which have the same code safe for the KSPACE inclusion (and, of course, a different crystal structure)). At the point where the code should calculate the temperature gradient across the simulated box, I receive the error: [ERROR: Thermo and fix not computed at compatible times (…/thermo.cpp:288)]. So far, no matter how much I tweak my fix commands for gallium oxide, I can’t seem to remove this error. Conversely, no matter how I tweak my fix commands for diamond or silicon, I can’t seem to get that error, which is why I assume there’s some incompatibility with KSPACE going on.
Does anyone know more about this error or what it might stem from? Does anyone know how to avoid it? Is there a way to still include coulombics while avoiding using KSPACE? Do you have any other suggestions?
Thank you very much in advance - I’m looking forward to see what you think.

All the best,

Alexander Petkov

Hiya,

My name is Alexander Petkov, I am a PhD student and have recently started using LAMMPS. I’ve been trying to do runs calculating bulk gallium oxide’s thermal conductivity, followed by plans to extract TBR between gallium oxide and other materials.
I’ve been using [pair_style buck/coul/long] for bulk gallium oxide, which includes coulombic interaction. This, however, requires me to use KSPACE and define a kspace_style. That’s all fine and good, until the calculation starts running. First, it becomes significantly more expensive computationally (unlike runs with equivalent code, say for bulk silicon or diamond).

that is not a surprise. coulomb interactions are much longer ranging and thus must be more time consuming than for molecular crystals with short cutoffs.
the cost of long-range coulomb can be optimized by using the most suitable kspace style and adjusting the coulomb cutoff, so that the total consumed time is minimized.

Also, the calculation crashes at the very end (again, unlike my runs for silicon or diamond, which have the same code safe for the KSPACE inclusion (and, of course, a different crystal structure)). At the point where the code should calculate the temperature gradient across the simulated box, I receive the error: [ERROR: Thermo and fix not computed at compatible times (…/thermo.cpp:288)].

this has nothing to do with using kspace style. this message is caused by requesting some thermo output from a fix that is invoked only periodically.
this most commonly happens when not using reset_timestep 0 after a minimization or other action that changes the initial timestep number before the crashing run part so that the timestep number is not commensurate with the thermo output frequency and the affected fix’s periodicity.

So far, no matter how much I tweak my fix commands for gallium oxide, I can’t seem to remove this error. Conversely, no matter how I tweak my fix commands for diamond or silicon, I can’t seem to get that error, which is why I assume there’s some incompatibility with KSPACE going on.

you are assuming wrong. just remove all unneeded commands from your input to only run the force computation and then you can add them one by one to identify which is giving you the cause for the crash.

Does anyone know more about this error or what it might stem from? Does anyone know how to avoid it? Is there a way to still include coulombics while avoiding using KSPACE? Do you have any other suggestions?

you can replace full long-range treatment of coulomb with hard truncation (coul/cut) or one of multiple form of a smooth shifted force method. depending on the method and the properties of your system, it can induce a significant error, though.

axel.