## Bug #181

### Pressure scaling distorts dodecahedron boxes

**Description**

When doing long simulations of dodecahedron (and most likely truncated octahedron boxes) combined with isotropic pressure scaling the box looses its shape a little bit due to the fact that all the components of the box vectors are scaled with the same number. A solution would be to keep the angles constant and only scale the box axes.

### History

#### #1 Updated by Berk Hess almost 12 years ago

I assume this is only a very little bit, due to rounding errors,

right?

All easy fixes I can think of would destroy the binary reproducability.

Berk.

#### #2 Updated by Erik Lindahl almost 12 years ago

Hi,

Unfortunately not. David and I chatted about this on the flight back, and we've had hexagonal boxes where the angle between the vectors change several degrees during ~100ns.

#### #3 Updated by Berk Hess almost 12 years ago

I now see that I also have 3 degrees deviation after 800 ns.

I have been thinking about a solution.

One option would be to check if the box angles or relative

box vector components are close to "nice" values and then

fix the relative value by only scaling the length or the box

diagonal and then determining the other components "exactly".

This would still result in reproducable runs.

The only disadvantage is that one would need to check for

several "nice" values which would affect the performance somewhat,

although probably negligibly for most systems.

Berk.

#### #4 Updated by Berk Hess almost 12 years ago

I fixed this issue by storing and using box components

relative to box[XX][XX] when using (semi)isotropic pressure coupling.

Components that are affected by the deform option are not relative.

Berk.