Action: VSTACK

Module valtools
Description Usage
Create a matrix by stacking vectors together used in 1 tutorialsused in 1 eggs
output value type
a matrix that contains the input vectors in its columns matrix

Input

The arguments that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
ARG scalar/vector the values that you would like to stack together to construct the output matrix

Further details and examples

Create a matrix by stacking vectors together

This action takes 2 or more vectors with the same number of elements as input and outputs a matrix. This output matrix is constructed stacking the input vectors vertically. The first row of the output matrix thus contains the first elements of all the input vector, the second row contains the second elements and so on. In other words, the first input vector is in the first column of the output matrix, the second input vector is in the second column and so.

The following shows an example of how this action operates in practise. The DISTANCE command below calculates the vectors containing four pairs of atoms. The VSTACK command is then used to construct a 4×3 matrix that contains all the vectors. The 1,1, 1,2 and 1,3 components in this matrix contain the x, y and z components of the vector connecting atoms 1 and 2. The 2,1, 2,2 and 2,3 contain the x, y and z components of the vector connecting atoms 3 and 4 and so on.

Click on the labels of the actions for more information on what each action computes
tested on2.11
d1: DISTANCECalculate the distance/s between pairs of atoms. More details ...
   COMPONENTS calculate the x, y and z components of the distance separately and store them as label
   ATOMS1the pair of atom that we are calculating the distance between=1,2 ATOMS2the pair of atom that we are calculating the distance between=3,4
   ATOMS3the pair of atom that we are calculating the distance between=5,6 ATOMS4the pair of atom that we are calculating the distance between=7,8
...
m: VSTACKCreate a matrix by stacking vectors together More details ARGthe values that you would like to stack together to construct the output matrix=d1.x,d1.y,d1.z

PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=m FILEthe name of the file on which to output these quantities=matrix.dat

Syntax

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
ARG input none the values that you would like to stack together to construct the output matrix
SERIAL optional false do the calculation in serial