[lammps-users] A little question about modifying the code

Hi all,

Recently I start to read the source code of LAMMPS and want to make some little change about it, however, I’m not very good at reading and writing code. Here is my question:
I want to make some adjustments about the coordinates of each atom during the simulation, that means, at the end of each calculation step, the coordinates of each atom will be adjusted.
However, I haven’t found where these modifications should be carried out in the source code.

I’m looking forward to your useful suggestions.

thanks,
Qingjie

Hi all,
Recently I start to read the source code of LAMMPS and want to make some
little change about it, however, I'm not very good at reading and writing
code. Here is my question:
I want to make some adjustments about the coordinates of each atom during
the simulation, that means, at the end of each calculation step, the
coordinates of each atom will be adjusted.
However, I haven't found where these modifications should be carried out in
the source code.

you should write a new fix class to do that.

axel.

Hi all,

Recently I start to read the source code of LAMMPS and want to make some
little change about it, however, I'm not very good at reading and writing
code. Here is my question:
I want to make some adjustments about the coordinates of each atom during
the simulation, that means, at the end of each calculation step, the
coordinates of each atom will be adjusted.
However, I haven't found where these modifications should be carried out
in
the source code.

I'm looking forward to your useful suggestions.

thanks,
Qingjie

To elaborate a bit more on what Axel said:
take a look for example at fix_recenter, that one is adjusting coordinates so that the center of mass of a group of atoms is kept constant.
You have to write a fix similar to that one (with another name) which does your desired modifications to the positions of atoms.

Cheers
Christian

also,

more useful information may be found in steve's presentation on
modifying lammps at the feb 2010 lammps workshop.

http://lammps.sandia.gov/workshops/Feb10/Steve_Plimpton/Plimpton_LAMMPS_modify_Feb10.pdf

axel.

Dear Axel and Christian,

Many thanks to you. I think it is very useful to me.

Best regards,
Qingjie