Chapter 5 Extending phase switch Monte Carlo to flexible molecular
5.5 Implementation for flexible molecular hard spheres
dimensions. It was written as a C front-end over a Fortran MC engine. The two phases are simulated concurrently and each move accepted in the active is immedi- ately applied to the passive. The MC moves available are:
Translation of a molecule:
For a randomly chosen chain, each component of the fractional coordinate of the first bead in the chain is changed by an amount randomly chosen uniformly from −1 → 1. This fractional displacement vector is then scaled by smax, a specified extrema. This change is then applied to all beads in the chosen chain.
Rigid rotation of a molecule:
For a randomly chosen molecule a random three dimensional axis of rotation and angle of rotation, between specified extrema ±φmax are generated. The entire molecule is rotated about the first bead by the chosen axis and angle
using quaternions.
Volume move, i.e. expansion/contraction of the simulation box:
Implements isotropic or anisotropic changes in the size of the simulation box. The fractional position of the first bead of each molecule is constant through- out the move. The relative position of all beads in a change to the first bead is conserved. The change in simulation box is chosen by uniform scal- ing (isotropic) or by perturbing a sub-diagonal element of the volume matrix (anisotropic). Due to the re-scaling of all particles a complete recalculation of the order parameter is needed
Internal rotation of a torsion bond:
For a randomly chosen molecule, a dihedral angle is chosen at random (for butane there is only one dihedral to choose) and altered by a random angle between ±θmax. The angle is chosen by generating a random rotation and choosing equally between each torsion well (equation 5.1).
Configuration-bias (cbmc) move, complete regrowth of a molecule segment:
For a randomly chosen molecule, a randomly chosen subsection of the molecule is regrown. A set number of attempted segments of molecule are regrown, their Rosenbluth factors found and used to randomly select a segment according to the appropriate weight [96].
Rigid molecule moves are made using the first bead of the molecule rather than the centre of mass since internal movement changes the centre of mass.
Due to the nature of the MC moves bond lengths and bond angles can never be broken or changed from those specified in the model. However, when applying torsion or configurational bias moves from the active to the passive, angles that are not allowed by the potential can occur. These internal violations are included in the overlap order parameter as internal overlaps; that is the bead overlaps with another bead in the molecule. Each torsion angle violation is only ever counted as one overlap.
Implementing the phase switch method via concurrent updates of both sys- tems can lead to a deviation between the two boxes due to floating-point errors. This deviation between the systems causes the equilibrium overlap value to drift; see Figure 5.5. In order to rectify this we must synchronise the two systems peri- odically, as first discussed in section 4.4.3. This involves a complete re-calculation of the generalised coordinates that have been applied to the active system from the
Figure 5.5: The equilibrium order parameter value drifts when no synchronisation is applied, withN = 768 beads at a pressure ofP σ3/kBT = 50.
reference. The generalised coordinates are then applied to the passive reference sys- tem and the resulting configuration is taken as the updated current configuration of the passive system.
When applying the rigid rotation we want this to be the same in both systems relative to their reference configurations. In order to achieve this we calculate the quaternion to rotate between the reference states, {rrefα } ↔ {rrefγ }. This is then combined with the generalised coordinate quaternion, which gives us the combined rotation from reference state of system i to the current state of system j (where i, j=α, γ (Equation 5.12). If we just applied the generalised coordinate quaternion we would be applying the exact same rotation to both systems, regardless of how differently they are oriented in space. By including the quaternion to rotate between the two systems we can take this into account. If our systems are very similar in orientation then this step is not necessary, however, it makes for a more generalisable method to include it.
q=q(rrefi →ri)·q(riref →rrefj ) (5.12) When the synchronisation procedure is applied periodically the system reaches equilibrium in the order parameter space as shown in Figure 5.6.
Figure 5.6: The equilibrium order parameter value is no longer drifts when synchro- nisation is applied, for a system withN = 768 beads at a pressure ofP σ3/kBT = 50.
5.5.1 Application of MC moves to passive system
In our implementation of phase switch Monte Carlo, we concurrently simulate both systems of interest. Moves are made and accepted based on the active system and then the resultant move is applied to the passive system. Care needs to be taken in how this is achieved to ensure the generalised coordinates remain the same in both systems.
Translation: The same fractional displacement of the first bead is applied to the
equivalent molecule in the passive system. The fractional displacement is cal- culated in the active and then transformed in the passive system to a cartesian displacement and then applied to all particles in the molecule. This preserves all bond length and angle constraints, and keeps both the orientation (q) and internal torsion (θ) constant.
Rotations: The same rotation quaternion plus the relative rotation between the
molecules, is applied to the equivalent molecule in the passive system. This preserves the relative fractional position of the first bead (δs), the internal torsion angle (θ) and all bond/angle constraints.
Torsion: The same angle of rotation about a bond in the equivalent molecule is applied to the passive system. A new quaternion is calculated using the bond in the passive system as the axis of rotation. This preserves the relative fractional position of the first bead (δs), and keeps rigid orientation (q) constant.