Go to the previous, next section.

Correlation Functions

The CORREL command is used to obtain a time series for a given property (`correlation-spec') and then manipulate it as required (`manip-spec') to plot the time series , correlation function, spectral density, etc. and determine the correlation times.

Reorienting a coordinate trajectory is possible using the COMPARE command. For details, see section Reorienting a Coordinate Trajectory.

N.B.: The documentation for correlation functions is not in the best of shape. Until there is an opportunity to go through all of the code and associated documentation in order to verify its accuracy, please use this command with especial care. Don't put all your faith in what you are about to read.

Overall Syntax of the CORREL Command

CORREL [COMPARE] FIRSTU unit [NUNIT integer] [BEGIN integer ]

       [STOP integer] [SKIP integer] [ ENERGY ]  [VELOCITY]
                                     [GEOMETRY]

       [loop-spec] [FRUNIT unit]

       correlation-spec deldel

       repeat(manip-spec del)

Specification of the Trajectory Files

The CORREL command reads a number of trajectory files whose Fortran unit numbers are specified sequentially. The first unit is given by the FIRSTU keyword and must be specified. NUNIT gives the number of units to be scanned, and defaults to 1.

BEGIN, STOP, and SKIP are used to specify which steps in the trajectory are actually used. BEGIN specifies the first step number to be used. STOP specifies the last. SKIP is used to select steps periodically as follows: only those steps whose step number is evenly divisible by STEP are selected. The default value for BEGIN is the first step in the trajectory; for STOP, it is the last step in the trajectory; and for SKIP, the default is 1.

Reorienting a coordinate trajectory is possible using the COMPARE command. For details, section Reorienting a Coordinate Trajectory.

Options for the CORREL command.

The VELOCITY option is specified if the correlation function is required for velocities. The program then expects the files in NUNIT's from FIRSTU to be velocity files from a dynamics run.

The ENERGY or GEOMETRY option applies only when the correlation-spec refers to internal coordinates. ENERGY causes the energies to be used; GEOMETRY refers to the geometries. The default is GEOMETRY.

Correlations on Normal Mode

The loop-spec is used in the calculation of correlation functions of atomic positions projected onto the normal modes. Unfortunately, documentation on this is very skimpy, and anyone who is interested will have to dive into the code to understand what is going on.

The loop-spec syntax is as follows:

LOOP-SPEC ::= LOOP [DIAG] [BRIEF]

              repeat([integer [integer [integer [integer]]]] del) deldel

BRIEF reduces the amount of output showing what calculations will be done.

Time Series Specifications

In this section, we describe what time series can be calculated for use by the correlation functions.

Syntax

                     { ATOM     atom-correl-spec              }
                     { BOND     bond-correl-spec              }
                     { ANGLE    angle-correl-spec             }
                     { TORSION  torsion-correl-spec           }
                     { IMPROPER improper-torsion-correl-spec  }
                     { VECTOR   vector-correl-spec            }
                     { SCP/VEC          vector-correl-spec    }
correlation-spec ::= { CRS/SCP/VEC      vector-correl-spec    }
                     { SCP/ATM          atom-correl-spec      }
                     { CRS/SCP/ATM      vector-correl-spec    }
                     { FLCT/ATM         atom-correl-spec      }
                     { SCP/FLCT/ATM     atom-correl-spec      }
                     { CRS/SCP/FLCT/ATM vector-correl-spec    }
                     { RSQ/ATM          atom-correl-spec      }
                     { GYRATION         real                  }
                     { DENSITY          real                  }
                     { MODE                                   }
                     { TEMP                                   }

Function

The correlation-spec option is required. This option specifies the property for which the time dependence is sought. The program determines whether the correlation function requested is auto or cross correlation. When a colon appears in the middle of correlation-spec, the program assumes that a cross correlation has been requested between the quantities on either side of the colon. (In special cases like SCP/ATM, SCP/VEC, SCP/FLCT/ATM, which are auto correlation quantities, a colon may be needed .)

The options in correlation-spec are the same for both coordinates and velocities . Those options that are exclusive to coordinates (c) or velocities (v) are thus noted. The Time series is determined for one (auto) or two (cross) quantities desired. If more than one quantity is specified, then the average of those quantities are determined as the time series. For example,

ATOM A 1 CA               ! auto correlation for first alpha carbon
ATOM A 1 CA : A 2 CA      ! cross correlation between first and second
                          ! alpha carbons.
ATOM A 1 CA : A 1 CB $ -
     A 2 CA : A 2 CB $    ! cross correlation between the average of
                          ! alpha carbons in residues 1 and 2 and the
                          ! average of beta carbons in residues 1 and 2.

The options are listed below with the property they represent.

ATOM atom-correl-spec
Positions of atoms or velocities.

BOND bond-correl-spec
Bond lengths (GEOMETRY) or energies (ENERGY).

ANGLE angle-correl-spec
Bond angles or bond angle energies.

TORSION torsion-correl-spec
Torsion angles or energies.

IMPROPER torsion-correl-spec
Improper torsion angles or energies.

VECTOR vector-correl-spec
Vectors joining pairs of atoms. (c)

SCP/VEC vector-correl-spec
Auto correlation for the scalar product of pairs of vectors. If the two vectors in each pair or not identical, the colon is used to distinguish the two vectors.

CRS/SCP/VEC vector-correl-spec
Cross correlation for the scalar product of two pairs of vectors. Note that even number of vectors are required on either side of the colon.

SCP/ATM atom-correl-spec
Auto correlation for the scalar product of the positions of atoms. If the atom pairs are not the same then a colon is used.

CRS/SCP/ATM vector-correl-spec
Cross correlation for the scalar product of the positions of atoms. Note that the atom pairs are described as vectors.

FLCT/ATM atom-correl-spec
Fluctuations of atom positions.

SCP/FLCT/ATM atom-correl-spec
Auto correlation for the scalar product of fluctuations of atoms. If the atom pairs are not the same then a colon is used.

CRS/SCP/FLCT/ATM vector-correl-spec
Cross correlation for the scalar product of the fluctuations of atoms. Note that the atom pairs are described as vectors.

RSQ/ATM atom-correl-spec
Square of the radial distance of the atom from the center. (c) Kinetic energy of the atom. (v)

GYRATION real
The radius of gyration of the molecule calculated using a cut-off given by the real number.

DENSITY real
The particle density of the molecule calculated using a cut-off given by the real number.

MODE
Projects the mass-weighted coordinates into the specified normal mode.

TEMP
The temperature of the molecule. (v)

The following are the syntax of the specifications used above.

atom-correl-spec ::= repeat(atom-spec [: atom-spec] del)

bond-correl-spec ::= repeat(atom-spec - atom-spec
                            [: atom-spec - atom-spec] del)

angle-correl-spec ::= repeat(atom-spec - atom-spec - atom-spec
                             [: atom-spec - atom-spec - atom-spec ] del)

torsion-correl-spec ::=
     repeat(atom-spec - atom-spec - atom-spec - atom-spec
            [: atom-spec - atom-spec - atom-spec - atom-spec ] del)

vector-correl-spec ::= repeat(atom-spec - atom-spec
                             [: atom-spec - atom-spec] del)

atom-spec ::= [segid] [resid] [iupac]

NOTE: The unnamed parts of an atom-spec default to those used previously in the individual correlation specification.

Manipulations of the Time Series and Correlation Functions

The manip-spec option is used to manipulate the time series without having to use the files again and to plot the desired data.

Manipulation Syntax

manip-spec ::= {PLOT [LP]  [PAGE [SAMPLE] ] [A]      }
               {     [TEX] [     [FIRST ] ] [B]      }
               {           [FULL          ]          }
               {                                     }
               {        [ DELTA           ]          }
               {        [ NORMAL          ]          }
               {MANTIME [ SQUARE          ]          }
               {        [ COS             ]          }
               {        [ COS2            ]          }
               {        [ AVERAGE integer ]          }
               {        [ SQRT            ]          }
               {        [ FLUCT           ]          }
               {        [ DELTAI          ]          }
               {        [ DELTAN integer  ]          }
               {        [ OSC             ]          }
               {        [ SAVE integer    ]          }
               {        [ ADD integer     ]          }
               {        [ PROB integer    ]          }
               {        [ LOG             ]          }
               {        [ MULT real       ]          }
               {        [ DELTAMIN        ]          }
               {        [ ABS             ]          }
               {        [ NORM            ]          }
               {                                     }
               {                       [P0]          }
               {CORFUN [ FFT  ] [LTC ] [P1] [NONORM] }
               {       [DIRECT] [NLTC] [P2]          }
               {                                     }
               {       [    INTEGRATE     ]          }
               {MANCOR [ INTEGRATE/SQUARE ]          }
               {       [       LOG        ]          }
               {       [ SPECTRAL/DENSITY ] [NRESET] }
               {       [ SQUARE           ]          }
               {       [ SAVE integer     ]          }
               {       [ ADD integer      ]          }
               {       [ DIV integer      ]          }
               {       [ NORM             ]          }
               {                                     }
               {RESET                                }

Making Plots of the Time Series or Correlation Functions

This PLOT option plots the time-series, correlation function or spectral density. There is no specific option to request any of these. But the program prompted by this command always plots the result of the last manipulation operation other than PLOT itself. As the first manipulation command it will plot the time series.

LP
LP is used to get the lineprinter plot.

TEX
TEX was once used to get the plot on a Tektronix 4662 printer. This code no longer works.

PAGE
PAGE is used for lineprinter plots to stay within a page.

FULL
FULL is used for lineprinter plots with a line per time interval.

SAMPLE
SAMPLE allows the whole plot to be plotted in a page by sampling.

FIRST
FIRST is to plot all points in the initial section of the plot in a page.

The defaults are LP, PAGE, SAMPLE.

Manipulating the Time Series

The MANTIME option takes the time series that is active and performs the operation requested by the option and leaves the resultant time series as the active time series. This helps in performing various permutations of manipulations to increase the options without increasing the number of option commands.

DELTA
Subtracts the average of the time series from all elements.

NORMAL
Normalizes the vectorial time series. (i.e. creates the unit vector).

SQUARE
Squares all the elements.

COS
Obtains the cosine of all elements.

COS2
Calculates 3*cos**2 - 1 for all elements.

AVERAGE integer
Calculates the average for every n consecutive points and increases the time interval by a factor of n where n is the specified integer.

SQRT
Obtains square root for all elements.

DELTAI
Subtracts the value of the first element from all elements.

DELTAN integer
Subtracts the value of the nth element from all where n is the specified integer. Q(I) = Q(I) - <Q(I)>, I from 1 to N, from N+1 to N+N etc. (Check code on this)

OSC
Counts the number of oscillations in Q(T).

SAVE unit
Save the time series into the given Fortran I/O unit.

ADD unit
Add the time series read in the file specified by `unit' to the existing time series.

PROB integer
Give the probability to find a specific value of the time series. The integer specifies the number of subdivisions of the time series are considered.

LOG
Q(T) = LOG(Q(T))

MULT
Q(T) = real * Q(T)

DELTAMIN
Q(T) = Q(T) - QMIN. QMIN being the minimum of the time series.

ABS
Q(T) = ABS(Q(T))

NORM
Computes the norms of the vectors in the time series. The new time series contains these norms (VECCOD is set to 1).

Calculating a Correlation Function

The CORFUN option takes the active time series and calculates the desired correlation function from it.

FFT
This option is to calculate the correlation function using the Fast Fourier Transform method.

DIRECT
This option is to calculate the correlation function using the direct multiplication method.

P0
This option gives the direct correlation function.

P1
This is to obtain the correlation function of first order Legendre Polynomial.

P2
This is to obtain the correlation function of second order Legendre Polynomial.

LTC
Long tail correction (subtracting the value of last element of the correlation function.)

NLTC
No long tail correction.

NONORM
Correlations are not normalized. This is useful for adding correlations computed in different trajectories.

The defaults are FFT, P0, LTC.

Manipulating the Correlation Functions

The MANCOR option takes the correlation function output from the CORFUN operation and performs the following operations.

INTEGRATE
Integrates the correlation function along time.

INTEGRATE/SQUARE
Integrates the square of the correlation function.

LOG
Takes the logarithm of the correlation function to see any apparent exponential decay.

SPECTRAL/DENSITY
Fourier transforms the correlation function to obtain the spectral density.

NRESET
When specified the latest series determined in MANCOR is considered, there is no-resetting to the original time series determined by CORFUN. This allows to do multiple treatments with MANCOR.

SAVE unit
The correlation time series is saved.

ADD unit
The correlation time series read in file `unit'. is added to the actual correlation time series.

DIV integer
The correlation time series are divided by the specified integer.

NORM
Correlations are normalized. Note that CORFUN is equivalent to CORFUN NONORM followed by MANCOR NORM.

Resetting Back to the Original Time Series

This RESET option resets the active time series to be the original time series.

Go to the previous, next section.