Action: INVERT_MATRIX
Module | matrixtools |
---|---|
Description | Usage |
Calculate the inverse of the input matrix | |
output value | type |
the inverse of the input matrix | 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 | matrix | the input matrix |
Further details and examples
Calculate the inverse of the input matrix
This action allows you to calculate the inverse of a real symmetric matrix. If the matrix is not symmetric then the dgetrf and dgetri functions from the LAPACK library are used. If the matrix is symmetric then we use dsyevr to find the eigenvalues. The inverse matrix of the input matrix M with eigendecomposition.:
M=QΛQ−1
is then found as:
M−1=QΛ−1Q−1
where Λ−1 is the inverse of the (diagonal) matrix of eigenvalues Λ and Q is the matrix of eigenvectors.
The following example shows how this action is used in practise:
cDISTANCE_MATRIXCalculate a matrix of distances between atoms. This action has hidden defaults. More details ATOMSthe atoms for which you would like to calculate the adjacency matrix=1-4 : ci : INVERT_MATRIXCalculate the inverse of the input matrix More details ARGthe input matrix=c PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=ci FILEthe name of the file on which to output these quantities=colvar
Syntax
The following table describes the keywords and options that can be used with this action
Keyword | Type | Default | Description |
---|---|---|---|
ARG | input | none | the input matrix |
MATRIX | optional | not used | the input matrix (can use ARG instead) |