Skip to content

Commit

Permalink
Added more links in documentation for these actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Oct 22, 2024
1 parent 2cc0655 commit 4b6e41c
Show file tree
Hide file tree
Showing 35 changed files with 69 additions and 72 deletions.
4 changes: 2 additions & 2 deletions new-manual/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PLUMED ignores any text in comments. Consequently, if you provide the input for
# d1: DISTANCE ATOMS=1,2 COMPONENTS
```

a DISTANCE command is not created. Similar behaviour is observed when you use the ENDPLUMED comand. For example, if your
a [DISTANCE](DISTANCE.md) command is not created. Similar behaviour is observed when you use the [ENDPLUMED](ENDPLUMED.md) comand. For example, if your
input is as follows:

```plumed
Expand All @@ -50,7 +50,7 @@ PLUMED will evaluate the distance between atom 1 and 2 but will not evaluate the

## Using INCLUDE files

If, for some reason, you want to spread your PLUMED input over a number of files you can use INCLUDE as shown below:
If, for some reason, you want to spread your PLUMED input over a number of files you can use [INCLUDE](INCLUDE.md) as shown below:

````
INCLUDE FILE=filename
Expand Down
6 changes: 3 additions & 3 deletions new-manual/parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ The lepton library is able to interpret any of thse following constants:
| `sqrt1_2 ` | $\sqrt(0.5)$ |

Notice that this functionality cannot be used when the keyword takes integer numbers in input
(e.g.: the PACE argument for METAD).
(e.g.: the PACE argument for [METAD](METAD.md)).

## Special replica syntax

PLUMED provides a number of ways to prepare the multiple replicas with almost identical PLUMED files that are required to run a multiple replica simulation:

* You can repare input files for such calculation using cut-and-paste but that is is very error prone.
* You can write a smart bash or python script to generate all the inputs.
* You can use different inputs for the various replicas that all contain an INCLUDE directive to include a file that contains the parts of the input that are common to all replicas
* You can use different inputs for the various replicas that all contain an [INCLUDE](INCLUDE.md) directive to include a file that contains the parts of the input that are common to all replicas

We think, however, the best option is to use features that have been available from PLUMED 2.4 onwards that allow you
manipulate multiple replica inputs that have only tiny differences in the the input. The following example illustrates how the syntax
Expand All @@ -86,7 +86,7 @@ If you prepare a single `plumed.dat` file like this one and feeds it to PLUMED w
the 3 replicas will see PLUMED input files that are the same except for the `AT` keyword, that sets the position of the restraint.
Replica 0 will see a restraint centered at 1.0, replica 1 centered at 1.1, and replica 2 centered at 1.2.

The `@replicas:` keyword is not specific to RESTRAINT and the `AT` keyword. Any keyword in PLUMED can accept that syntax.
The `@replicas:` keyword is not specific to [RESTRAINT](RESTRAINT.md) and the `AT` keyword. Any keyword in PLUMED can accept that syntax.
For instance, the following single input file can be used to setup a bias exchange metadynamics simulations:

```plumed
Expand Down
2 changes: 1 addition & 1 deletion new-manual/shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ d1: DISTANCES ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 ATOMS4=7,8 ATOMS5=9,10 LESS_THAN=
PRINT ARG=d1.* FILE=colvar2
```

The values `d1_lessthan` and `d1_mean` will be output in the colvar2 file as these are the components of the DISTANCES shortcut that are defined in the manual. `d1_lt` is not output as this is an intermediate value that is not defined in the manual.
The values `d1_lessthan` and `d1_mean` will be output in the colvar2 file as these are the components of the [DISTANCES](DISTANCES.md) shortcut that are defined in the manual. `d1_lt` is not output as this is an intermediate value that is not defined in the manual.

The same result can be obtained using the following input:

Expand Down
12 changes: 6 additions & 6 deletions new-manual/specifying_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ scalars, vectors, matrices or functions evaluated on a grid.
## Single component actions

If an action outputs only one value it is referenced later in the input using the label of the action that calculated it.
For example, in the input below, the DISTANCE action calculates one scalar every MD time step. This scalar is then reused
by the PRINT action, which the time-series of scalars to a file called colvar1.
For example, in the input below, the [DISTANCE](DISTANCE.md) action calculates one scalar every MD time step. This scalar is then reused
by the [PRINT](PRINT.md) action, which the time-series of scalars to a file called colvar1.

```plumed
d1: DISTANCE ATOMS=1,2
Expand Down Expand Up @@ -204,10 +204,10 @@ for inputs that use shortcuts to not have regular expressions that match the lab
There may be cases where it is useful to access a particular element of a vector or matrix or to combine multiple scalars or vectors into a new value. The following
actions allow you to complete operations of this type:

- SELECT_COMPONENTS - take $n$ of the elements from the input vector/matrix and output an $n$-dimensional vector that contains these components only.
- CONCATENATE - combine all the input scalar/vectors/matrices into a single output vector/matrix.
- FLATTEN - vectorise a matrix
- VSTACK - construct a matrix by stacking multiple input vectors together
- [SELECT_COMPONENTS](SELECT_COMPONENTS.md) - take $n$ of the elements from the input vector/matrix and output an $n$-dimensional vector that contains these components only.
- [CONCATENATE](CONCATENATE.md) - combine all the input scalar/vectors/matrices into a single output vector/matrix.
- [FLATTEN](FLATTEN.md) - vectorise a matrix
- [VSTACK](VSTACK.md) - construct a matrix by stacking multiple input vectors together

You can then use these outputs from these actions in the input to later actions in your input file.

Expand Down
16 changes: 8 additions & 8 deletions new-manual/specifying_atoms.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Many of the actions in PLUMED take a list of atom positions in input. Within PL
atoms are specified using their numerical indices in the molecular dynamics input file.

In PLUMED lists of atoms can be either provided directly inside the definition of each action, or
predefined as a GROUP that can be reused multiple times. Lists of atoms can be written as:
predefined as a [GROUP](GROUP.md) that can be reused multiple times. Lists of atoms can be written as:

- comma separated lists of numbers (`g1: GROUP ATOMS=10,11,15,20`)
- numerical ranges. So `g2: GROUP ATOMS=10-20` is equivalent to `g2: GROUP ATOMS=10,11,12,13,14,15,16,17,18,19,20`
Expand All @@ -28,7 +28,7 @@ A few other wasys of using groups in the input to actions are also available:

## The MOLINFO command

You can access many useful shortcuts for specifying atomic positions to PLUMED by using the MOLINFO, which takes
You can access many useful shortcuts for specifying atomic positions to PLUMED by using the [MOLINFO](MOLINFO.md), which takes
a PDB structure file in input. This command allows you to access the following list of shortcuts.

{:#browse-table .display}
Expand All @@ -54,7 +54,7 @@ d1: DISTANCE ATOMS=11,com1
```

If you don't want to calculate CVs from the virtual atom. That is to say you just want to monitor the position of a virtual atom
(or any set of atoms) over the course of your trajectory you can do this using DUMPATOMS.
(or any set of atoms) over the course of your trajectory you can do this using [DUMPATOMS](DUMPATOMS.md).

The list of the virtual atoms defined in PLUMED can be obtained by using the command `GROUP ATOMS=@allatoms REMOVE=@mdatoms`.

Expand All @@ -66,7 +66,7 @@ you are using involve some property of a molecule. These codes allow the atoms
periodic boundaries, a fact which PLUMED could only deal with if the topology is passed from the MD code to PLUMED. Doing this
work would involve a lot laborious programming and goes against our original aim of having a general patch that can be implemented
in a wide variety of MD codes. Consequentially, we have implemented a more pragmatic solution to this problem - the user specifies
in input any molecules (or parts of molecules) that must be kept in tact throughout the simulation run using the WHOLEMOLECULES command.
in input any molecules (or parts of molecules) that must be kept in tact throughout the simulation run using the [WHOLEMOLECULES](WHOLEMOLECULES.md) command.

The following input computes the end-to-end distance for a polymer of 100 atoms and keeps it at a value around 5.

Expand All @@ -76,7 +76,7 @@ e2e: DISTANCE ATOMS=1,100 NOPBC
RESTRAINT ARG=e2e KAPPA=1 AT=5
```

Notice that NOPBC is used to in the DISTANCE action so as to ensure that if the end-to-end distance is larger than half the simulation box the distance
Notice that NOPBC is used to in the [DISTANCE](DISTANCE.md) action so as to ensure that if the end-to-end distance is larger than half the simulation box the distance
is compute properly. Also notice that, since many MD codes break molecules across cell boundary, it might be necessary to use the
WHOLEMOLECULES keyword (also notice that it should be before distance).

Expand All @@ -93,9 +93,9 @@ DUMPATOMS FILE=dump.xyz ATOMS=1-20

Notice that there are other ways to manipulate the coordinates stored within PLUMED:

- FIT_TO_TEMPLATE aligns atoms to a template structure.
- WRAPAROUND brings a set of atom as close as possible to another set of atoms.
- RESET_CELL rotates the periodic cell.
- [FIT_TO_TEMPLATE](FIT_TO_TEMPLATE.md) aligns atoms to a template structure.
- [WRAPAROUND](WRAPAROUND.md) brings a set of atom as close as possible to another set of atoms.
- [RESET_CELL](RESET_CELL.md) rotates the periodic cell.

<script>
$(document).ready(function() {
Expand Down
6 changes: 3 additions & 3 deletions src/adjmat/BridgeMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ namespace adjmat {
/*
Calculate a matrix with elements equal to one if there is a bridging atom between the two atoms
This adjacency matrix is used to implement the BRIDGE shortcut. The action outputs a adjacency matrix
in the same way as CONTACT_MATRIX. However, the $j,k$ element of the adjacency matrix is calculated
This adjacency matrix is used to implement the [BRIDGE](BRIDGE.md) shortcut. The action outputs a adjacency matrix
in the same way as [CONTACT_MATRIX](CONTACT_MATRIX.md). However, the $j,k$ element of the adjacency matrix is calculated
using:
$$
M_{jk} = \sum_i s_A(r_{ij})s_B(r_{ik})
$$
In this expression, the sum runs over all the atoms that were specified using the BRIDGING_ATOMS keyword, $s_A$ and
In this expression, the sum runs over all the atoms that were specified using the `BRIDGING_ATOMS` keyword, $s_A$ and
$s_B$ are switching functions, and $r_{ij}$ and $r_{ik}$ are the distances between atom $i$ and $j$ and between atoms
$i$ and $k$. Less formally, this formula ensures that $j,k$ element of the output matrix is one if there is a bridging
atom between atom $j$ and $k$.
Expand Down
6 changes: 3 additions & 3 deletions src/adjmat/ContactMatrixShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ PRINT ARG=cc FILE=colvar
Implmenting the coordination number this way is useful as there are many different ways to define whether two atoms/molecules and to construct a "contact" matrix based on
the result. For example:
* You could say that two molecules are connected if they are within a certain distance of each other and if they have the same orientation (see TORSIONS_MATRIX).
* You could say that two water molecules are connected if they are hydrogen bonded to each other (see HBOND_MATRIX).
* You could say that two atoms are connected if they are within a certain distance of each other and if they have similar values for a CV (see OUTER_PRODUCT).
* You could say that two molecules are connected if they are within a certain distance of each other and if they have the same orientation (see [TORSIONS_MATRIX](TORSIONS_MATRIX.md)).
* You could say that two water molecules are connected if they are hydrogen bonded to each other (see [HBOND_MATRIX](HBOND_MATRIX.md)).
* You could say that two atoms are connected if they are within a certain distance of each other and if they have similar values for a CV (see [OUTER_PRODUCT](OUTER_PRODUCT.md)).
When the coordination numbers is implemented in the way described above (by doing the matrix-vector multiplication) you have the flexibility to define the contact matrix that
is used in the multiplication in whatever way you choose. In other words, this implementation of the coordination number is much more flexible. For example, suppose you want
Expand Down
4 changes: 2 additions & 2 deletions src/adjmat/DistanceMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you would like to calculate the matrix of distances between the atoms in two
d2: DISTANCE_MATRIX GROUPA=1-7 GROUPB=8-20
```
Once you have calculated your distance matrix in this way you can do many of the operations that were discussed for CONTACT_MATRIX with the output.
Once you have calculated your distance matrix in this way you can do many of the operations that were discussed for [CONTACT_MATRIX](CONTACT_MATRIX.md) with the output.
For example, you can use the COMPONENTS flag to calcuate the $x$, $y$ and $z$ components of the vectors connecting the atoms in your two groups by using
an input like that shown below:
Expand All @@ -57,7 +57,7 @@ d3: DISTANCE_MATRIX GROUP=1-7 CUTOFF=1.0
This command will only store those distances that are less than 1 nm. Notice, however, that the cutoff implemented here is __not__ a continuous function.
You should thus be careful when commands such as this one above to ensure that any quantities that are forced have continuous derivatives. If you use
the CUTOFF keyword, however, many of the features that are used to optimise CONTACT_MATRIX are used for this action.
the CUTOFF keyword, however, many of the features that are used to optimise [CONTACT_MATRIX](CONTACT_MATRIX.md) are used for this action.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/adjmat/HbondMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Adjacency matrix in which two atoms are adjacent if there is a hydrogen bond bet
A useful tool for developing complex collective variables is the notion of the
so called adjacency matrix. An adjacency matrix is an $N \times N$ matrix in which the $i$th, $j$th element tells you whether
or not the $i$th and $j$th atoms/molecules from a set of $N$ atoms/molecules are adjacent or not. As detailed in the documentation
for CONTACT_MATRIX there are then a range of further analyses that you can perform on these matrices.
for [CONTACT_MATRIX](CONTACT_MATRIX.md) there are then a range of further analyses that you can perform on these matrices.
For this action the elements of the adjacency matrix are calculated using:
Expand All @@ -53,7 +53,7 @@ is a switching function that acts on the angle between the vector connecting ato
It is important to note that hydrogen bonds, unlike regular bonds, are asymmetric. In other words, the hydrogen atom does not sit at the
mid point between the two other atoms in this three-center bond. As a result of this adjacency matrices calculated using HBOND_MATRIX are not
symmetric like those calculated by CONTACT_MATRIX.
symmetric like those calculated by [CONTACT_MATRIX](CONTACT_MATRIX.md).
The following input can be used to analyze the number of hydrogen bonds each of the oxygen atoms in a box of water participates in. Each
water molecule can participate in a hydrogen bond in one of two ways. It can either donate one of its hydrogen atom to the neighboring oxygen or
Expand Down
6 changes: 3 additions & 3 deletions src/adjmat/Neighbors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@
/*
Build a matrix with ones in for the N nearest neighbours of an atom
The following input illustrates how to use this action in tandem with DISTANCE_MATRIX to find the six
The following input illustrates how to use this action in tandem with [DISTANCE_MATRIX](DISTANCE_MATRIX.md) to find the six
nearest atoms to each of the first 100 atoms in the input file:
```plumed
d1: DISTANCE_MATRIX GROUP=1-100
n: NEIGHBORS ARG=d1 NLOWEST=6
```
Alternatively, if you would like to use a CONTACT_MATRIX to do something similar you would do the following:
Alternatively, if you would like to use a [CONTACT_MATRIX](CONTACT_MATRIX.md) to do something similar you would do the following:
```plumed
c1: CONTACT_MATRIX GROUP=1-100 SWITCH={RATIONAL R_0=0.5}
n: NEIGHBORS ARG=c1 NHIGHEST=6
```
This command is useful for implementing alternatives to the symmatry functions that are defined by the shortcuts
in the module symfunc. For example, suppose that you want to calculate a variant on the TETRAHEDRAL symmetry function.
in the module symfunc. For example, suppose that you want to calculate a variant on the [TETRAHEDRAL](TETRAHEDRAL.md) symmetry function.
In this variant on the CV the coordination sphere around each central atom is not defined using a switching function. Instad
this coordination sphere contains only the four nearest atoms. You can implement this CV by using the following input:
Expand Down
2 changes: 1 addition & 1 deletion src/adjmat/TopologyMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Adjacency matrix in which two atoms are adjacent if they are connected topologic
The functionality in this action was developed as part of a project that attempted to study
the nucleation of bubbles. The idea was to develop a criterion that would allow one to determine
if two gas atoms $i$ and $j$ are part of the same bubble or not. This criterion would then be used
to construct a adjacency matrix, which could be used in the same way that CONTACT_MATRIX is used in other
to construct a adjacency matrix, which could be used in the same way that [CONTACT_MATRIX](CONTACT_MATRIX.md) is used in other
methods.
The criterion that was developed to determine whether atom $i$ and $j$ are connected in this way works by
Expand Down
8 changes: 4 additions & 4 deletions src/adjmat/TorsionsMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
/*
Calculate the matrix of torsions between two vectors of molecules
This action was implemented to ensure that we can calculate the SMAC collective variable that is discussed in
This action was implemented to ensure that we can calculate the [SMAC](SMAC.md) collective variable that is discussed in
[this paper](https://www.sciencedirect.com/science/article/abs/pii/S0009250914004503?via%3Dihub). This particular action
tracks the relative orientations for all the pairs of molecules in a set much like the variables described in the crystdistrib module.
The orientations of molecules can be specified using either PLANE or DISTANCE. The example below shows how you can use
The orientations of molecules can be specified using either [PLANE](PLANE.md) or [DISTANCE](DISTANCE.md). The example below shows how you can use
internal vectors connecting two atoms in the molecules to define the orientation of that molecule. Three of these internal
vectors are calculated using a DISTANCE command in the input below. The matrix of torsional angles between these various
vectors is then computed:
Expand All @@ -46,7 +46,7 @@ PRINT ARG=m FILE=matrix
In this example, the torsional angle in element $(1,2)$ of the matrix with label `m` is the angle between the plane containing atoms 1,5 and 10 and the plane
connecting atoms 1,10 and 15. In other words, the elements in this matrix are the torsional angles between the vectors in the input matrices
around the vector connecting the corresponding atomic positions that are specified using the POSTIONS keyword.
around the vector connecting the corresponding atomic positions that are specified using the `POSTIONS` keyword.
You can also calculate a matrix of torsional angles between two different groups of molecules by using an input like the one below:
Expand All @@ -60,7 +60,7 @@ m: TORSIONS_MATRIX ARG=sA,sBT POSITIONS1=1,11 POSITIONS2=21,31,41
PRINT ARG=m FILE=matrix
```
In this example, the orientations of the molecules are specified using the PLANE action and is given by a normal to the plane containing the three atoms from the molecule
In this example, the orientations of the molecules are specified using the [PLANE](PLANE.md) action and is given by a normal to the plane containing the three atoms from the molecule
that was specified. The final output is $2 \times 3$ matrix that contains all the torsional angles between the molecules defined by the two PLANE actions.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/clusters/ClusterDiameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
Print out the diameter of one of the connected components.
An example input that determines the diameter of the second largest cluster that is identified by
analysing the connected components of a CONTACT_MATRIX using DFSCLUSTERING is shown below:
analysing the connected components of a [CONTACT_MATRIX](CONTACT_MATRIX.md) using [DFSCLUSTERING](DFSCLUSTERING.md) is shown below:
```plumed
# Calculate a contact matrix between the first 100 atoms in the configuration
Expand Down
Loading

1 comment on commit 4b6e41c

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/CAVITY.tmp
Found broken examples in automatic/CLASSICAL_MDS.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONVERT_TO_FES.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.tmp
Found broken examples in automatic/DUMPCUBE.tmp
Found broken examples in automatic/DUMPGRID.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/FIND_CONTOUR.tmp
Found broken examples in automatic/FIND_CONTOUR_SURFACE.tmp
Found broken examples in automatic/FIND_SPHERICAL_CONTOUR.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/GPROPERTYMAP.tmp
Found broken examples in automatic/HISTOGRAM.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/INCYLINDER.tmp
Found broken examples in automatic/INENVELOPE.tmp
Found broken examples in automatic/INTERPOLATE_GRID.tmp
Found broken examples in automatic/LOCAL_AVERAGE.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/METATENSOR.tmp
Found broken examples in automatic/MULTICOLVARDENS.tmp
Found broken examples in automatic/PAMM.tmp
Found broken examples in automatic/PCA.tmp
Found broken examples in automatic/PCAVARS.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in automatic/PYCVINTERFACE.tmp
Found broken examples in automatic/PYTHONFUNCTION.tmp
Found broken examples in automatic/Q3.tmp
Found broken examples in automatic/Q4.tmp
Found broken examples in automatic/Q6.tmp
Found broken examples in automatic/QUATERNION.tmp
Found broken examples in automatic/REWEIGHT_BIAS.tmp
Found broken examples in automatic/REWEIGHT_METAD.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_LINEAR_PROJ.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_MAHA_DIST.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/WHAM_HISTOGRAM.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.