It can be used to bring a system to equilibrium at the desired temperature and pressure (or stress) (like the initialize dynamics command in the Discover 2.9.5 program).
It can also be used to collect data and statistics (like the resume dynamics command in the Discover 2.9.5 program) or to continue an interrupted dynamics run (like the restart dynamics command in the Discover 2.9.5 program).
Path/Keyword Values Default Meaning
boltz*mann Boolean false Randomize velocities to Maxwell- Boltzmann distribution. initial*_temperature real target Initial temperature (in K) at temperature at which random velocities are generated. temp*erature real 298.0 Target temperature (in K). time or real 5000.0 Time for which dynamics is run duration (in fs). timestep real 1.0 Time for each dynamics step (in fs). integrat*ion_method Integrator to be used during Vel*ocity_verlet Velocity_verlet calculation. Abm4 Rung*e_Kutta continue_a*verage Boolean false If true, keep the running sum from the previous dynamics run. ensemble NVT NVT Thermodynamics ensemble desired. NVE NPT NPH temperature_cont*rol_method Method for controlling temperature. Velocity_scaling Velocity_scaling Nose Andersen collision_ratio real 1.0 Factor to multiply the collision frequency by when using the Andersen temperature control method. pressure_control_method Parrinello Parrinello Method for controlling pressure. Andersen_cp press_choice pressure pressure Indicate whether target pressure stress or stress is desired. press_unit GPa GPa Specify units for pressure. MPa bar press*ure real 0. Target pressure (used only if press_choice = pressure). stress list of six reals (0.0 0.0 0.0 0.0 0.0 0.0) Short form for setting sxx, syy, szz, syz, sxz, and sxy (respectively). sxx, syy and szz real 0.0 Target tensile stress. syz, sxz and sxy real 0.0 Target shear stress. temperature_w*indow real 10.0 Temperature difference between actual and target temperatures (K) allowed during temperature scaling. dev*iation real 5000.0 Energy difference allowed between successive steps (kcal mol-1). q_ratio real 1.0 Determine Q, the fictitious mass for Nosé dynamics; Q = q_ratio x program-calculated Q0. cell_mass real 20.0 Fictitious mass of unit cell, used in Parrinello method of constant- stress dynamics (in units of atomic mass). peek string peek BTCL command called after every iteration to write out .ipc and/or .pcar files to monitor the progress of a dynamics simulation. Value may be "" to turn off the peek mechanism.
cell_parm Pathname to cell parameters. save_i*nitial Boolean false Save initial cell parameters before the run starts. save_f*inal Boolean false Save final cell parameters after the run finishes. restore*_reference Boolean false Restore saved cell parameters as the reference values for calculating strain.
execute Pathname to execute structures (a separate execute structure is passed to the dynamics command for each occurrence of execute). command string "echo hello" A full BTCL command, enclosed in quotes (" ") or braces ({ }), to be executed during dynamics (e.g., print). before Boolean false Execute command before dynamics run begins. after Boolean false Execute command after dynamics run ends (ignored if the command was already executed in the last dynamics step). freq*uency real 0.0 Frequency (in fs) with which to execute command. first_step real 0.0 Start executing the command after this period of simulated time (fs). last_step real 0.0 Stop executing the command after this period of simulated time. 0.0 means to keep executing the command until the run is complete.
The dynamics command is used to start or to continue a dynamics run.
To start a new dynamics run, you can assign random velocities to atoms in the molecular system according to the Maxwell-Boltzmann distribution (by including the keyword boltzmann) at the initial temperature specified by initial_temperature. If the initial temperature is not specified, the target temperature is used as the initial temperature.
Once the system has been equilibrated at the desired temperature and pressure (or stress), you may want to start collecting data and statistics.
To clear the sums and averages of properties calculated during the equilibration phase, you issue a new dynamics command. If the boltzmann keyword is not used and if dynamics was run previously, the program uses the final coordinates and velocities of the previous run, which were written out in the dynamics restart data block, as the starting structure and velocities for the new dynamics run.
It is important to remember that, if the structure has been changed after a dynamics run (by minimization, for example), it is essential to randomize the velocities again, since the old velocities do not apply to the new coordinates. The program checks whether the current system structure is the same as in the dynamics restart data written out by the previous dynamics run. If differences are found, the current structure is used and the initial velocities are randomized.
When different dynamics stages are used in the same job, the accumulating sum for calculating running averages is zeroed out at the start of each stage. However, if you want to carry the sum from one dynamics stage to the next, you can use the continue_average keyword.
To continue a dynamics run from a previous job, the dynamics restart file (run_name.xdyn) must be read. This can be done by putting the readFile dynamics_restart command right before the dynamics command.
The Discover 95.0 program allows the choice of four different ensembles, namely:
The method of temperature control is selected by setting the temperature_control_method to Velocity_scaling, Nose, or Andersen. For the Andersen method, the collision frequency parameter is calculated automatically to a suitable value for the system. However, this can be scaled using the collision_ratio parameter by setting it to a value other than 1.0.
Q, the fictitious mass used in the Nosé method, can be controlled by the user-defined parameter q_ratio. The default for q_ratio is 1.0, indicating that the Q0 calculated by the program will be used. If q_ratio is any value other than 1.0, the actual Q used is q_ratio x Q0.
When the current temperature (calculated from the kinetic energy) and the target temperature (specified by temperature) differ by more than the amount specified by temperature_window, the velocities are rescaled so that the current and target temperatures are the same. Fluctuations in temperature are greater at larger values of temperature_window; however, the trajectory is disturbed less.
Control of pressure or stress is selected by setting the press_choice parameter to pressure or stress. If press_choice = pressure, then the pressure parameter is used to specify the target pressure for the system during the run.
When press_choice = stress, the Discover 95.0 program uses the Parrinello method of constant-stress dynamics. This method allows the cell to move by an amount that depends on the fictitious mass, defined by cell_mass. A heavier mass dictates a smoother change to the cell, but the run requires more time to attain the target stress.
The target stress is defined by the parameters sxx, syy, szz, syz, sxz, and sxy, which can be assigned individually or via the stress parameter, which takes a list of six values.
Nosé dynamics can also be used with the Parrinello method to produce constant-temperature/constant-pressure dynamics and the NPT ensemble. To do so, set ensemble to NPT and temperature_control_method to Nose. The methodology for applying the Nosé method to constant-stress dynamics is taken from Ray and Rahman (1985).
The cell_parm save_initial and cell_parm save_final keywords allow you to save the initial and/or final cell parameters of a periodic system internally, before or after a dynamics run. The cell parameters can then be restored as the reference values for calculating strain by using the keywords cell_parm restore_reference.
This is useful for calculating the stress-strain relationship--although the stresses may be increased during various dynamics stages, you may want to use only the original non-stressed state as the reference value for calculating the strain. Whether or not these keywords are used, the cell parameters for calculating energy and other quantities will still be the current cell parameters in the system or from the dynamics restart file.
To control for abrupt changes in the energy of the system, the energy difference between successive steps is checked at every step. If this difference is greater than the maximum energy deviation allowed, defined by the deviation keyword, program execution stops.
Note that, in contrast to early versions of the Discover program, the length of the dynamics run is input as the actual time in femtoseconds, rather than the number of steps. The run length is specified by either of the synonymous keywords time or duration. Combined with the duration of each timestep, specified by the timestep keyword, these keywords determine the number of dynamics steps.
The execute pathname keyword and its associated parameters are used to specify subcommands to be performed during a dynamics simulation and when they should be performed.
For the first execute structure, all the execute subparameters are set to the default values listed above, e.g., before = false. Parameter values in subsequent execute structures default to the values used in the previous execute structure. For example, if the first execute structure specifies +before, the next execute structure will assume +before unless -before is specified.
The execute structure typically contains the print command, to write out the instantaneous and average values that are calculated during a run (see the print command and the examples below). The frequency, beginning, and end of the subcommand execution are specified in femtoseconds and are automatically rounded off to the nearest multiple of the timestep parameter.
If execute print is not included on the dynamics command line, the only output is a summary table of the energy and thermodynamic state.
For dynamics, use of execute print structures enables the printing of up to 12 tables containing the total energies, energy components, thermodynamic state, cell geometry, stress and strain. This information can also be written to the table file that the Insight program uses for constructing graphs. In addition, coordinate, velocities, and energy derivatives (the negative of the forces) can be archived in archive files.
Here is information on the Dynamics database.
dynamicsThe command dynamics with no arguments uses the default values or values previously set by the user with the cdlConfig utility.
dynamics +boltzmann initial_temperature = 300.0 ensemble = NPT \ temperature = 300.0 press_choice = stress \ Sxx = 0.01 cell_mass = 40.0 deviation = 4000.0 \ temperature_window = 5.0This example of the dynamics command indicates that dynamics is to be done under conditions of constant stress and temperature (NPT), with initial randomization of velocities at a temperature of 300.0 K.
The target temperature is 300.0 K, and the target tensile stress (sxx) is 0.01 GPa. The fictitious cell mass (Parrinello method) is set to 40.0 atomic mass units, the maximum energy deviation between successive steps to 4000.0 kcal mol-1, and the temperature window for the direct velocity scaling method to 5.0 K.
cdlConfig dynamics execute +before +after frequency = 10 ... dynamics \ execute command = "print output +energy_summary +state +cell" \ execute command = "print archive coordinates = on" \ execute command = "print table +nonbond_energy" -beforeIn this example, a cdlConfig command is used to set default values for the dynamics execute parameters before, after, and frequency, so that subsequent dynamics execute commands are performed before, after, and every 10 fs during the dynamics run by default.
The subsequent dynamics command in the example includes three execute structures, to print properties to output, archive, and table files, respectively. The default parameter values are used in all three instances, except for the last print table command, where output is not written before (-before sets before to false) the dynamics run.
readFile dynamics_restart file = crn.restart ... cdlConfig dynamics temperature = 390.0 ... dynamicsThis example shows how the dynamics command is used to set up a dynamics run based on a previous run.
First, the dynamics restart file crn.restart is read. This causes the default values of dynamics parameters to be set to those used in the previous dynamics run.
Then the dynamics temperature is changed to 390 K for the new dynamics run. The order in which these two commands appear is important--the readFile dynamics_restart command overwrites any previous default parameter values.
dynamics peek = {peek iteration_step = 4 filename = look +carfile} \ execute command = "print output +energy_summary +state +cell"This command line performs the same dynamics simulation as in Example 3, while only printing to the output file. The peek parameter is used in this example to cause look.pek and look.pcar to be generated every 4 iterations. These files contain the energy and coordinates, respectively, of the system at that point in the simulation. (See the peek command for more information.
For example:
database handle sys_dbh System. $sys_dbh createColumn Atom.Consensus int 0 $sys_dbh print Atom for {set i 2} {$i <= 3} {incr i} { select set "*:$i:atom;*" $sys_dbh set $i Atom.Consensus $set } $sys_dbh print Atom #This would be followed by a normal dynamics run, e.g.: ... dynamics time = 1000In this example, the system database handle is assigned to sys_dbh. A column, Consensus, is then created in the MainCell/Atom table of the system database and initialized to 0. The for loop resets the numbers for atoms in monomers 2 and 3 to their corresponding monomer numbers. Thus, the atoms in monomers 2 and 3 will interact with atoms in the same monomer and with all the atoms labeled 0, i.e., there will be no interactions between monomers 2 and 3. The interactions between monomer 2 (or monomer 3) and the atoms that do not belong to these two monomers are scaled by 0.5.
List of BTCL commands
diffraction command
energy command
Copyright Biosym/MSI