Variable Cell Formalism
This derivation of this term can be found in Barrat2005, Villet2014 Appendix B, in unpublished notes by Kris Delaney or in Josh’s notes NB#2 p140-148.
Here we follow the notation of Kris Delaney.
Note: add bold math using pmb{}
Following Barrat2005 and GHF section 5.3.5 (p 252) we can conduct simulations in the constant tension ensemble. This ensemble is particularly useful for calculating the cell size of periodic mesophases, which can be found by adjusting the cell to minimize the internal stresses.
For a cell with box vectors , , , we define the cell shape tensor
The metric tensor is defined as
To find the optimum box size, we seek to minimize where is the intensive energy density.
This derivative is related to the internal stress operator .
For a general multi-chain Hamiltonian, . The stress operator is thus
For most of the polymer models described in GHF (i.e. without Coulomb interactions), and the calculation of involves the calculation of .
To derive this expression, one first shows that . Recalling that where satisfies the general PDE , one can derive
For a continuous Gaussian chain model, and so
Combining all terms, the final result for an unsmeared model is
In practice, the arguement of the integral can be efficiently computed in k-space
where we have now set .
For smeared models where , an addition term emerges since depends on . For smeared models the stress is
where the sum over i runs over each species, is the smearing range, and is the the density operator,
Once is obtained, can be minimized by updating using a forward Euler scheme
where is the timestep used to update the fields, adjusts the rate of the cell updates relative to the fields, and (as defined above).
LEGACY DOCUMENTATION
(This corresponds to notation from GHF and Barrat2005, above I use notation from Kris Delaney)
The only term in that depends on is the term. For these models
where is a symmetric tensor that for molecule p whose elements are given by
where the sum over repeated indicies is implied (i.e. Einstein notation).
Note
The prefactor in Barrat2005 Eq 36 is and the integral runs from 0 to 1. This comes from how the units are non-dimentionalized, but I never got to the bottom of what the precise prefactor should be. There’s a chance that the precise magnitude of is incorrect in the code. However, since we’re usually interested in where , it shouldn’t matter (at least for the moment).
Since involves and it is straightforward to calculate while solving the modified diffusion equation for the propagators.
Following a computation trick described by Kris Delaney, can efficiently be substituting the definition of the fourier transform of . Also recalling that in fourier space,
where we have used the identity . The term inside the integral is computed for each s during the solution of the propagator. Also note that only needs to be computed once for each call shape .
By switching to the Duchs2014 notation described in model_chi_ab.rst
for a system of many polymers
where in this equation the first (i.e. \sum_p) is the sum over each polymer p and the second (i.e. \Sigma_p) is a symmetric tensor related to the stress (yes, I realize this really isn’t the best notation).
Once is obtained, can be minimized by updating using a forward Euler scheme
where is the timestep used to update the fields, adjusts the rate of the cell updates relative to the fields, and (as defined above).
Finally, we define the “internal stress operator”