Regarding C++code link to LAMMPS as a library

I was trying to LAMMPS as a library using simple.ccp program that given in lammps example file. It was working fine. Now I would like to modify this C++ code according to my work. Now I want to change the boxlength in all direction( i.e. volume change) and the back to intial position. How will i do such modification in the c++ code or what are the commands . I would greatly appreciate it if you kindly give me some suggestion on this.

Thanking You.

With best regards,

Atanu K Metya

I was trying to LAMMPS as a library using simple.ccp program that given in
lammps example file. It was working fine. Now I would like to modify this
C++ code according to my work. Now I want to change the boxlength in all
direction( i.e. volume change) and the back to intial position. How will i
do such modification in the c++ code or what are the commands . I would
greatly appreciate it if you kindly give me some suggestion on this.

just *look* at the simple.cpp example, which is giving you an example
for how to use the interface.

axel.

Not sure what you mean by “change the box length”.

There are all sorts of related Qs, like do you want the
atoms to scale with the box, do you want it to happen
all at once or during a simulation, what if atoms cross
boundaries, etc, etc. LAMMPS has entire commands
like change_box and fix deform that handle all these
issues. You can invoke these commands thru the lib
interface, just as you would in an input script. But if
you are hoping to perform all that logic in your external
program, then you’d have to duplicate all the code
in those commands.

Steve