Skip to content

Action: INVERT_MATRIX

Module matrixtools
Description Usage
Calculate the inverse of the input matrix used in 0 tutorialsused in 0 eggs
output value type
the inverse of the input matrix matrix

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 with eigendecomposition.:

is then found as:

where is the inverse of the (diagonal) matrix of eigenvalues and is the matrix of eigenvectors.

The following example shows how this action is used in practise:

Click on the labels of the actions for more information on what each action computes
tested on2.11
c: DISTANCE_MATRIXCalculate a matrix of distances between atoms. This action has hidden defaults. More details ATOMSYou should use GROUP instead of this keyword which was used in older versions of PLUMED and is provided for back compatibility only=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

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

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 input matrix

deprecated keywords

The keywords in the following table can still be used with this action but have been deprecated

Keyword Description
MATRIX You should use ARG instead of this keyword which was used in older versions of PLUMED and is provided for back compatibility only