delete atoms that has non-numeric coordinates

Hi all,

My apologise if you are upset just by reading the title… As ludicrous as it sounds, is there a way to get rid of atoms which has non-numeric coordinates during the simulation?

Thanks,
Quang

I don’t know of any. You would end up having to write your own code for that. Could you explain why you need/want this? Perhaps there is another way to achieve the outcome you want.

I’m using the USER-SPH package to try and develop some multiphase flows (i.e. working upon the currently available package in the latest repository of LAMMPS: https://github.com/quang-ha/lammps). Sometimes, even though the simulation looks sane (when check with visualisation tools like ovito) the error of non-numeric coords still show up. Close inspection reveals like one or two atoms may have caused the whole mess. Which leads me to wanting to delete those and carry on the simulations (or even give out a warning.)

Thanks,
Quang

I’m using the USER-SPH package to try and develop some multiphase flows (i.e. working upon the currently available package in the latest repository of LAMMPS: https://github.com/quang-ha/lammps). Sometimes, even though the simulation looks sane (when check with visualisation tools like ovito) the error of non-numeric coords still show up. Close inspection reveals like one or two atoms may have caused the whole mess. Which leads me to wanting to delete those and carry on the simulations (or even give out a warning.)

​this is a bad idea. you don’t solve problems by removing the atoms that cause them. you have to understand why the problem is happening. most likely it is a programming issue. it is rather straightforward to debug this. you can use features of the gcc compiler (undefined behavior sanitizer) which will print warning messages during the run of instructions resulting in all kinds of undefined behavior, and you can enable floating point exceptions​ (conveniently done through compiling LAMMPS with -DLAMMPS_TRAP_FPE) and then inspect the resulting core dump, or directly run inside a debugger, so you can inspect in detail, when and where your calculation is doing a computation resulting in a non-representable number.

axel.