Can the keyword remap in the command change_box be used to scale the molecules too?

Can the keyword remap that scales the atom coordinates when changing box length using LAMMPS command change_box be used to scale molecules like water too?

What do you mean by “scale molecules”?

As in when we change the box dimensions, we scale the atom coordinates in proportion.
For eg if I am expanding my system by 1.2 times its original size then I would use the scaling factor of 1.2 as shown below:

change_box all x scale 1.2 y scale 1.2 z scale 1.2 remap

My doubt is whether this can be done in a system with molecules too or is it to be used in systems with only atoms.

For scaling atoms we have to just multiply the initial coordinates with the scaling factor to get the new coordinates after box size has changed.

But to scale molecules we need to scale by multiplying the center of mass coordinate of the molecule with the scaling factor and then based on the vectors connecting each bond define coordinates for each atom in the bond.

So I wanted to know whether remap keyword does this.

The change_box command only looks at atom positions and that applies to all atoms in the group it operates on. It pays no attention to bonds, angles or similar. So molecules are just atoms, too.

1 Like

Oh okay got it. Thanks alot.