Shortcut: SELECT_COMPONENTS

Module valtools
Description Usage
Create a new value to hold a subset of the components that are in a vector or matrix used in 1 tutorialsused in 2 eggs
output value type
a vector containing the selected components vector

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 vector/matrix the value from which we are selecting components

Further details and examples

Create a new value to hold a subset of the components that are in a vector or matrix

Output a scalar or vector that contains a subset of the elements in the input vector or matrix. In the example below the value s is a scalar that contains the distance between atoms 3 and 4.

Click on the labels of the actions for more information on what each action computes
tested on2.11
d: DISTANCECalculate the distance/s between pairs of atoms. More details 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
s: SELECT_COMPONENTSCreate a new value to hold a subset of the components that are in a vector or matrix This action is a shortcut. More details ARGthe value from which we are selecting components=d COMPONENTSthe components in the input value that you woul like to build a new vector from=2

In this example the output z is a 2 dimensional vector containing the distances between atoms 3 and 4 and 7 and 8.

Click on the labels of the actions for more information on what each action computes
tested on2.11
d: DISTANCECalculate the distance/s between pairs of atoms. More details 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
s: SELECT_COMPONENTSCreate a new value to hold a subset of the components that are in a vector or matrix This action is a shortcut. More details ARGthe value from which we are selecting components=d COMPONENTSthe components in the input value that you woul like to build a new vector from=2,4

Lastly, in this example we calculate a matrix of distances. The scalar s that is output from the SELECT_COMPONENTS action contains the distance between atoms 1 and 3 and 3 and 4.

Click on the labels of the actions for more information on what each action computes
tested on2.11
d: DISTANCE_MATRIXCalculate a matrix of distances between atoms. This action has hidden defaults. More details GROUPthe atoms for which you would like to calculate the adjacency matrix=1-5
s: SELECT_COMPONENTSCreate a new value to hold a subset of the components that are in a vector or matrix This action is a shortcut. More details ARGthe value from which we are selecting components=d COMPONENTSthe components in the input value that you woul like to build a new vector from=1.3,3.4

Syntax

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

Keyword Type Default Description
ARG input none the value from which we are selecting components
COMPONENTS compulsory none the components in the input value that you woul like to build a new vector from