5
$\begingroup$

When you are using Monte Carlo scheme to simulate equilibrium phases of convex hard-core molecules, namely, whose energy is infinite when in contact and 0 otherwise in a standard, cubic simulation box, all upscaling box moves are guaranteed not to introduce overlaps - the distances between all shapes are increased, and since they are convex, they cannot overlap. Of course this is not true for concave shapes.

I am interested in generalizing skipping the overlap check to general moves in a general, triclinic box. To put it more precisely, consider a box given by 3 vectors $\mathbf{m}_1, \mathbf{m}_2, \mathbf{m}_3$ with a common origin coinciding with coordinate system origin, which span parallelpiped describing the simulation box. Each convex shape is described by its relative coordinates $a_i \in [0, 1), i=1,2,3$, so the absolute position is

$$ \mathbf{r} = a_1 \mathbf{m}_1 + a_2 \mathbf{m}_2 + a_3 \mathbf{m}_3 $$

Now, most general box move is just choosing different box vectors $\mathbf{m}'_1, \mathbf{m}'_2, \mathbf{m}'_3$ by some perturbations of the old ones and redefining all absolute positions as

$$ \mathbf{r}' = a_1 \mathbf{m}'_1 + a_2 \mathbf{m}'_2 + a_3 \mathbf{m}'_3 $$

without any changes in relative coordinates or orientations of shapes.

The question is: how can I, just by comparing $\mathbf{m}_i$ and $\mathbf{m}'_i$ in some way, determine that the move is guaranteed not to introduce any overlaps for some arbitrary convex shapes, like it can be easily done for cubic box (for orthorhombic box it is also easy)?

When I dove into it, it is harder than is looks. First thought would be to make sure that the box transformation increases all distances, so we take a transformation matrix, subtract identity matrix and check if the resulting matrix is positive-definite. But that is incorrect - take for example cubes with almost-touching walls and perform a rotation of the box. Of course the distances now are the same, but the box rotated and cubes orientations didn't rotate with it (because of how I defined a box move), so they start overlapping.

Any ideas? I can also accept some estimated solutions - the ones that may not detect all cases, but the definitely don't skip moves that can introduce overlaps.

$\endgroup$

1 Answer 1

4
$\begingroup$

Thank you for the interesting question, that was definitely some food for thought. I think I am on the right track but couldn't manage to find an analytical solution so I am giving you a numerical procedure that should work and you could follow up with an analytical simplification if it exists!

My first observation was that in your case you want all possible distances to be always increased or unchanged, but never decreased. That is to say, for a squared distance between any two points we have $\Delta r^2=\sum_{i,j}\Delta a_i \Delta a_j\bf{m}_i.\bf{m}_j$ for $0 \leq \Delta a_i^2 \leq 1$ for each $i$, and the scaled squared distance will be $\Delta {r'}^2=\sum_{i,j}\Delta a_i \Delta a_j\bf{m'}_i.\bf{m'}_j$ and we always have a good move if $f(\bf{\Delta a}) = \Delta {r'}^2 - \Delta {r}^2 \geq 0$ for all $0 \leq \Delta a_i^2 \leq 1$.

Now you can define a matrix $\bf{M}$ with entries $M_{i,j} = \bf{m'}_i.\bf{m'}_j - \bf{m}_i.\bf{m}_j$ and you can turn this into an optimisation problem: if you minimise $f(\bf{\Delta a}) = \bf{\Delta a}^T\bf{M}\bf{\Delta a}$ w.r.t. $\bf{\Delta a}$ subject to the above constraints and the resulting minimised value is still greater than or equal to 0, then you will never shrink any distances. This is a fairly simple inequality constraint problem so it should be readily soluble numerically. There might be a closed-form solution but I don't have the time to figure it out so I am going to leave it to you. I hope that helps!

$\endgroup$
12
  • $\begingroup$ Unfortunately, I don't think it solves the problem - rotation of the box does not change distances, but it can introduce overlap (like in the example with near-touching cubes I gave in my post). Transformations that do not shrink any distances are the ones with singular values $\ge 1$ - SVD decomposition: $M = U S V$ gives $U, V$ rotation matrices which do not change distances and $S$ diagonal matrix performing stretching and shrinking. So it would be an analytic solution, however, as I said, I don't think its enough. $\endgroup$
    – PKua
    Nov 19, 2022 at 14:34
  • $\begingroup$ Sorry I guess I didn't completely understand your question then. I thought that you had a unit cell with some $N$ particles in it, which is part of some infinite crystal and you were looking at changing the unit cell shape (for all cells of course), as in e.g. a barostat move. In this case I thought this result would be correct? How is your case different to that? $\endgroup$
    – Godzilla
    Nov 20, 2022 at 14:05
  • $\begingroup$ I think you understood me correctly. However, let me use a 2D example. We have 2 axis-aligned squares with sides' length 1 with $a_1 = (0.5, 0.5), a_2 = (0.61, 0.5)$ in a box $m_1 = (10, 0), m_2 = (0, 10)$. Absolute positions are $r_1 = (5, 5), r_2 = (6.1, 5)$, so they don't overlap. We rotate the box (which preserves distances) by 45 degrees giving $m'_1 = (10/\sqrt{2}, 10/\sqrt{2}), m'_2 = (-10/\sqrt{2}, 10/\sqrt{2})$. The absolute positions are now $r'_1 = (0, 10/\sqrt{2}), r'_2 = (1.1/\sqrt{2}, 11.1/\sqrt{2})$, so they do overlap ($1.1/\sqrt{2} < 1$). $\endgroup$
    – PKua
    Nov 21, 2022 at 16:02
  • $\begingroup$ But as you said, rotation is distance preserving, so if you take the coordinates of the four corners of each square and apply the rotation transform on them you'll see there is no overlap. If there was, then you'd be able to find a pair of points within each of the squares whose distance to each other is nonzero before the transformation and zero after, which contradicts the distance preservation property of rotation. $\endgroup$
    – Godzilla
    Nov 21, 2022 at 21:41
  • $\begingroup$ The point is that box moves should be independent of particle moves, so they should not alter particles' orientations - rotation of the box should not alter the corners of squares. Rotation is only an example. We can do sheers, etc. - I cannot apply them to a shape, since it would deform it. And it is possible to construct sheer-like transformations with singular values >= 1 which introduce overlaps. $\endgroup$
    – PKua
    Nov 22, 2022 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .