Relative path

../fullrmc/Examples/agitations/

Description

A box of water molecules is used to demonstrate how to use agitation move generators. This example was used to generate the agitation video example as seen in the online documentation. When running this example several files will be generated where all moved are saved. If VMD. is installed, the trajectory of all moves will be automatically visualized.

Files

  1. createWaterBox.py: The script used to create a box of \(10 \AA^{3}\) in size
  2. waterBox.pdb: The water box system
  3. run.py: The script file used to run the simulation

run.py explained

IMPORTING USEFUL DEFINITIONS:

All useful packages, modules and definitions are imported.

SHUT DOWN LOGGING:

Set logger minimum level to maximum possible integer value. This will mute all non-error logging.

CREATE ENGINE:

Create the engine and the needed bonds and bond-angles constraints.

DIFFERENT RUNS:

Define functions to run fitting engine. All of the following functions finish running the engine using Engine.run method. A trajectory of all moves is saved to the disk by setting XYZPath argument not to None.

  1. agitate_bonds: Groups are created by O-H pair of atoms using their indexes. DistanceAgitationGenerator is assigned to each group. A DefinedOrderSelector is used to make sure selecting every group. Number of engine steps is set to 250 * number of groups so each O-H group will be agitated 250 times.
  2. agitate_angles: Groups are created by O-H-H triplets of atoms using engine set_groups_as_molecules method. AngleAgitationGenerator is assigned to each group. A DefinedOrderSelector is used to make sure selecting every group. Number of engine steps is set to 250 * number of groups so each O-H-H group will be agitated 250 times.
  3. agitate_both: Groups are created by O-H-H triplets of atoms using engine set_groups_as_molecules method, then groups of O-H pair of atoms are also created and added to the engine. AngleAgitationGenerator is assigned to each group. A DefinedOrderSelector is used to make sure selecting every group. Number of engine steps is set to 250 * number of groups so each O-H-H and O-H group will be agitated 250 times.

RUN SIMULATION:

All three functions are called consecutively.

VISUALIZE SIMULATION:

Reset initial pdb to engine instance. Visualize engine along with all saved four trajectories “along0.xyz”, “along1.xyz”, “along2.xyz”, “random.xyz”.

Table of Contents