Skip to content

Action: MATRIX_PRODUCT_DIAGONAL

Module refdist
Description Usage
Calculate the product of two matrices and return a vector that contains the diagonal elements of the ouptut vector used in 0 tutorialsused in 0 eggs
output value type
a vector containing the diagonal elements of the matrix that obtaned by multiplying the two input matrices together scalar/vector

Details and examples

Calculate the product of two matrices and return a vector that contains the diagonal elements of the ouptut vector

This action allows you to multiply two matrices and recover the diagonal of the product of the matrices. The following input shows an example where two contact matrices are multiplied together.

Click on the labels of the actions for more information on what each action computes
tested on2.11
c1: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPspecifies the list of atoms that should be assumed indistinguishable=1-100 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=0.1}
c2: CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More details GROUPspecifies the list of atoms that should be assumed indistinguishable=1-100 SWITCHthe input for the switching function that acts upon the distance between each pair of atoms. Options for this keyword are explained in the documentation for LESS_THAN.={RATIONAL R_0=0.2}
m: MATRIX_PRODUCT_DIAGONALCalculate the product of two matrices and return a vector that contains the diagonal elements of the ouptut vector More details ARGthe two vectors/matrices whose product are to be taken=c1,c2
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=colvar

As you can see from the documentation for the shortcut EUCLIDEAN_DISTANCE this action is useful for computing distances between vectors.

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 two vectors/matrices whose product are to be taken

Full list of keywords

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

Keyword Type Default Description
ARG input none the two vectors/matrices whose product are to be taken
SERIAL optional false do the calculation in serial. Further information about this flag can be found here.
USEGPU optional false run this calculation on the GPU. Further information about this flag can be found here.