fix_pyvelocity

Hi Dears
I want to add the new boundary processing method in LAMMPS running MD, so I need to reset the velocity of the atoms that hit the boundary. I refer to fix_wall_reflect.cpp. In this program, post_integrate() method is implemented during the execution. However, I found that it will only reset the velocity at the beginning of running MD with this method in my program. So I reset the velocity with the initial_integrate**()method** and found that my program is called normally every step in running MD. But I don’t know why?

Thank you in advance

Regards

ECNU

fix_pyvelocity.cpp (4.14 KB)

fix_pyvelocity.h (1.55 KB)

velocity.py (3.5 KB)

Hi Dears
I want to add the new boundary processing method in LAMMPS running MD, so I need to reset the velocity of the atoms that hit the boundary. I refer to fix_wall_reflect.cpp. In this program, post_integrate() method is implemented during the execution. However, I found that it will only reset the velocity at the beginning of running MD with this method in my program. So I reset the velocity with the initial_integrate**()method** and found that my program is called normally every step in running MD. But I don’t know why?

fixes are called according to the bitmask settings in the setmask() method. your fix sets the bit for initial_integrate(), but not post_integrate()

axel