CONTACTMAP

This is part of the colvar module |

Calculate the distances between a number of pairs of atoms and transform each distance by a switching function.

The transformed distance can be compared with a reference value in order to calculate the squared distance between two contact maps. Each distance can also be weighted for a given value. CONTACTMAP can be used together with FUNCPATHMSD to define a path in the contactmap space.

The individual contact map distances related to each contact can be accessed as components named `cm.contact-1`

, `cm.contact-2`

, etc, assuming that the label of the CONTACTMAP is `cm`

.

- Examples

The following example calculates switching functions based on the distances between atoms 1 and 2, 3 and 4 and 4 and 5. The values of these three switching functions are then output to a file named colvar.

Click on the labels of the actions for more information on what each action computes

f1:CONTACTMAPATOMS1=1,2the atoms involved in each of the contacts you wish to calculate.ATOMS2=3,4the atoms involved in each of the contacts you wish to calculate.ATOMS3=4,5the atoms involved in each of the contacts you wish to calculate.ATOMS4=5,6the atoms involved in each of the contacts you wish to calculate.SWITCH={RATIONAL R_0=1.5} PRINTcompulsory keywordThe switching functions to use for each of the contacts in your map.ARG=the input for this action is the scalar output from one or more other actions.f1.*FILE=colvarthe name of the file on which to output these quantities

The following example calculates the difference of the current contact map with respect to a reference provided. In this case REFERENCE is the fraction of contact that is formed (i.e. the distance between two atoms transformed with the SWITCH), while R_0 is the contact distance. WEIGHT gives the relative weight of each contact to the final distance measure.

Click on the labels of the actions for more information on what each action computes

cmap:CONTACTMAP ...ATOMS1=1,2the atoms involved in each of the contacts you wish to calculate.REFERENCE1=0.1A reference value for a given contact, by default is 0.0WEIGHT1=0.5A weight value for a given contact, by default is 1.0ATOMS2=3,4the atoms involved in each of the contacts you wish to calculate.REFERENCE2=0.5A reference value for a given contact, by default is 0.0WEIGHT2=1.0A weight value for a given contact, by default is 1.0ATOMS3=4,5the atoms involved in each of the contacts you wish to calculate.REFERENCE3=0.25A reference value for a given contact, by default is 0.0WEIGHT3=1.0A weight value for a given contact, by default is 1.0ATOMS4=5,6the atoms involved in each of the contacts you wish to calculate.REFERENCE4=0.0A reference value for a given contact, by default is 0.0WEIGHT4=0.5A weight value for a given contact, by default is 1.0SWITCH={RATIONAL R_0=1.5}compulsory keywordThe switching functions to use for each of the contacts in your map.CMDIST... PRINT( default=off ) calculate the distance with respect to the provided reference contact mapARG=the input for this action is the scalar output from one or more other actions.cmapFILE=colvarthe name of the file on which to output these quantities

The next example calculates calculates fraction of native contacts (Q) for Trp-cage mini-protein. R_0 is the distance at which the switch function is guaranteed to be 1.0 – it doesn't really matter for Q and should be something very small, like 1 A. REF is the reference distance for the contact, e.g. the distance from a crystal structure. LAMBDA is the tolerance for the distance – if set to 1.0, the contact would have to have exactly the reference value to be formed; instead for lambda values of 1.5–1.8 are usually used to allow some slack. BETA is the softness of the switch function, default is 50nm. WEIGHT is the 1/(number of contacts) giving equal weight to each contact.

When using native contact Q switch function, please cite [15]

Click on the labels of the actions for more information on what each action computes

# The full (much-longer) example available in regtest/basic/rt72/cmap:CONTACTMAP ...ATOMS1=1,67the atoms involved in each of the contacts you wish to calculate.SWITCH1={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.4059}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT1=0.003597A weight value for a given contact, by default is 1.0ATOMS2=1,68the atoms involved in each of the contacts you wish to calculate.SWITCH2={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.4039}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT2=0.003597A weight value for a given contact, by default is 1.0ATOMS3=1,69the atoms involved in each of the contacts you wish to calculate.SWITCH3={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.3215}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT3=0.003597A weight value for a given contact, by default is 1.0ATOMS4=5,61the atoms involved in each of the contacts you wish to calculate.SWITCH4={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.4277}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT4=0.003597A weight value for a given contact, by default is 1.0ATOMS5=5,67the atoms involved in each of the contacts you wish to calculate.SWITCH5={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.3851}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT5=0.003597A weight value for a given contact, by default is 1.0ATOMS6=5,68the atoms involved in each of the contacts you wish to calculate.SWITCH6={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.3811}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT6=0.003597A weight value for a given contact, by default is 1.0ATOMS7=5,69the atoms involved in each of the contacts you wish to calculate.SWITCH7={Q R_0=0.01 BETA=50.0 LAMBDA=1.5 REF=0.3133}compulsory keywordThe switching functions to use for each of the contacts in your map.WEIGHT7=0.003597A weight value for a given contact, by default is 1.0SUM... PRINT( default=off ) calculate the sum of all the contacts in the inputARG=the input for this action is the scalar output from one or more other actions.cmapFILE=colvarthe name of the file on which to output these quantities

(See also switchingfunction)

- Glossary of keywords and components

- Description of components

By default the value of the calculated quantity can be referenced elsewhere in the input file by using the label of the action. Alternatively this Action can be used to calculate the following quantities by employing the keywords listed below. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity | Description |

contact | By not using SUM or CMDIST each contact will be stored in a component |

- The atoms involved can be specified using

ATOMS | the atoms involved in each of the contacts you wish to calculate. Keywords like ATOMS1, ATOMS2, ATOMS3,... should be listed and one contact will be calculated for each ATOM keyword you specify.. You can use multiple instances of this keyword i.e. ATOMS1, ATOMS2, ATOMS3... |

- Compulsory keywords

SWITCH | The switching functions to use for each of the contacts in your map. You can either specify a global switching function using SWITCH or one switching function for each contact. Details of the various switching functions you can use are provided on switchingfunction.. You can use multiple instances of this keyword i.e. SWITCH1, SWITCH2, SWITCH3... |

- Options

NUMERICAL_DERIVATIVES | ( default=off ) calculate the derivatives for these quantities numerically |

NOPBC | ( default=off ) ignore the periodic boundary conditions when calculating distances |

SUM | ( default=off ) calculate the sum of all the contacts in the input |

CMDIST | ( default=off ) calculate the distance with respect to the provided reference contact map |

SERIAL | ( default=off ) Perform the calculation in serial - for debug purpose |

REFERENCE | A reference value for a given contact, by default is 0.0 You can either specify a global reference value using REFERENCE or one reference value for each contact.. You can use multiple instances of this keyword i.e. REFERENCE1, REFERENCE2, REFERENCE3... |

WEIGHT | A weight value for a given contact, by default is 1.0 You can either specify a global weight value using WEIGHT or one weight value for each contact.. You can use multiple instances of this keyword i.e. WEIGHT1, WEIGHT2, WEIGHT3... |