Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for IntraTargetedSwap move #371

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

msoroush
Copy link
Collaborator

@msoroush msoroush commented Sep 3, 2021

Support for IntraTargetedSwap move in NVT, NPT, GCMC, GEMC simulation.

In this move, we randomly pick a box, subVolume, and a residue kind defined for subVolume to transfer from bulk (same box) to subVolume or vice versa.

  1. User can define multiple subVolumes region (static or dynamic).
  2. User can define specific molecule kind for each subVolume.
  3. Each subVolume must be tagged with an integer (subVolume index).
  4. For each subVolume, a molecule is transferred from bulk to subVolume or vice versa.
  5. User can decide to use rigid body or flexible molecule insertion/deletion.
  6. For each subVolume, user can to apply PBC in each axis or not.

Rigid body insertion/deletion:

  • Number of molecule in subVolume is based on geometric center (GC) of molecule.
  • CBMC algorithm for insertion/deletion: Multiple trials for GC (inside subVolume) and rigid body random rotation is performed

Flexible insertion/deletion:

  • GOMC automatically detect the centric atom in molecule (Using center of graph algorithm)
  • Number of molecule in subVolume is based on centric atom.
  • CD-CBMC algorithm for insertion/deletion: Multiple trials for centric atom (inside subVolume) is performed. Then, rest of the molecule is build using CD-CBMC.

subVolumePBC

  • If periodic boundary was not applied to any axis, GOMC will check the subVolume center and dimensions to make sure it is within simulation box.
  • Calculating number of molecules within subVolume is done by considering PBC.
  • IMPORTANT: atoms will interact with each other through XYZ PBC, even if user disables the PBC for subVolume.

To use this move, user must use the keyword IntraTargetedSwapFreq, with following parameters for each subVolume:

Static subVolume

Center of subVolume is defined by user, using SubVolumeCenter keyword. During the whole simulation, the center of subvolume will remain constant.

Here is an example of static subVolume:

  !Parameter      tag     variables
  SubVolumeBox     5       0         // sets subvolume 5 in box 0
  SubVolumeCenter  5       12 10 14  // sets center {12, 10, 14} for subvolume 5
  SubVolumeDim     5       8 8 8     // sets dimension {8, 8, 8} for subvolume 5
  SubVolumeResidueKind 5   ALL       // uses all molecule kind for subvolume 5
  SubVolumeRigidSwap   5   false     // uses flexible molecule insertion using CD-CBMC for subVolume 5
  SubVolumePBC       5   XY              // apply PBC in X and Y axis only for subVolume 5

Dynamic subVolume

Center of subVolume is calculated during the simulation. In this mode, user must define a list of atom indices (zero based), using SubVolumeCenterList keyword; the geometric center of the provided atom indices will be used as center of subVolume.
User must make sure that those defined atom list remain in simulation box (by setting the Beta value to 2 in PDB file).

Here is an example of dynamic subVolume:

  !Parameter      tag     variables
  SubVolumeBox     5       0         // sets subvolume 5 in box 0
  SubVolumeCenterList  5   0-5 10 14-16  // Coordinate of atom indices 0,1,2,3,4,5,10,14,15,16 is used to calculate the center for subvolume 5
  SubVolumeDim     5       8 8 8     // sets dimension {8, 8, 8} for subvolume 5
  SubVolumeResidueKind 5   ALL       // uses all molecule kind for subvolume 5
  SubVolumeRigidSwap   5   false     // uses flexible molecule insertion using CD-CBMC for subVolume 5
  SubVolumePBC      5   XYZ          // apply PBC in X, Y, and Z axis for subVolume 5

Note: User can specify the series of molecule kind to be used for each
subvolume. As an example:
SubVolumeResidueKind 5 Ar Kr // uses Ar and Kr for subvolume 5

Note: Every subvolume must have unique tag.

Note: User can use - to set a range of atom indices (e.g. 0-10). zero based atom indices must be used.

Note: For defining atom indices in the second box, user does not need to add the total number of atoms in first box to calculate the atom indices in second box. Simply, open the PDB file for second box and find the atom index - 1.

Note: If both IntraTargetedSwapFreq and TargetedSwapFreq are activated, they use the same subVolume parameters.

Validation

Here are the test results to validate the method using UA butane in graphen slit-pore at 360 K in liquid and gas phase.

Files

pore.tar.gz

Figures

Hist_Energy_Liq
Hist_Energy_gas
butane-pore

…from bulk

 to a picked subVolume and vice versa.
Add NVTX tracer for IntraTargetedSwap and TargetedSwap move.
Fix an issue for finding centric atom in small molecule (e.g. water).
Fix some issue with other moves, when new weigth is very small.
Copy link
Collaborator

@LSchwiebert LSchwiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks correct.

@GregorySchwing GregorySchwing merged commit 4c9b3a1 into GOMC-WSU:development Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants