Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGES/v2.11.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ The entries below give the details; the main cases are:
- Replica exchange through GREX evaluates both configurations with the same updated time-dependent bias. This changes exchange probabilities with the 2.11 kernel also when using older GROMACS patches; GROMACS does not need to be patched again.
- [UPPER_WALLS](UPPER_WALLS.md) and [LOWER_WALLS](LOWER_WALLS.md) acting on a periodic argument do not apply the periodic boundary conditions to the difference between the argument and `AT`.
- [JCOUPLING](JCOUPLING.md) with `TYPE=CUSTOM` needs `A`, `B` and `C`, and `SHIFT` is zero by default. `ARG=*` leaves out the values that the action cannot use.
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) use `STRANDS_CUTOFF=1` (nm) by default (`STRANDS_CUTOFF=0` uses all the pairs of strands).
The default switching function of these two and of [ALPHARMSD](ALPHARMSD.md) is stretched to be zero at `D_MAX`, where it is 1e-5, as in the other actions
that take `R_0`, `NN` and `MM` (the number of segments changes by at most 1e-5 per segment within the cutoff).
- Functions of vectors are evaluated also where all their arguments are zero (e.g. [CUSTOM](CUSTOM.md) with `FUNC=x+1`); [MOMENTS](MOMENTS.md) of periodic variables were wrong.
- [COORD_ANGLES](COORD_ANGLES.md) with more than one central atom; [GYRATION](GYRATION.md) with `TYPE=RGYR_1` and `TYPE=RGYR_3` (they were swapped).
- Wrong forces were fixed in [CENTER](CENTER.md) and [COM](COM.md) with `PHASES` in non-orthorhombic cells, [MATRIX_PRODUCT](MATRIX_PRODUCT.md) of sparse matrices,
Expand Down Expand Up @@ -183,6 +186,18 @@ The entries below give the details; the main cases are:
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) with `STYLE=inter` crashed when a chain contained a single residue; they are now an error only when no pair of strands can be built.
- `TYPE` of the three shortcuts is not case sensitive (`TYPE=drmsd` was an error).
- The secondary structure collective variables with `TYPE=DRMSD` (the default) are faster: the derivatives are accumulated per atom and the virial is computed from the atoms of each segment, which reduces the cost of the force calculation by about 40%. The setup of [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) for large proteins, which build hundreds of thousands of segments, is about 20% faster. Their documentation has been revised (default `R_0`, periodic boundary conditions, `STRANDS_CUTOFF`, `STYLE`).
- [ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) compute the number of segments that are similar to a sheet with a single action
(`ANTIBETARMSD_SCALAR`, `PARABETARMSD_SCALAR`), which skips the pairs of strands further apart than `STRANDS_CUTOFF`, adds the derivatives of each segment
directly to the atoms and does not create a vector with an element per segment; the vectors of the expanded input are computed only if they are used elsewhere.
The results are the same. With 144 peptides (370k pairs of strands, 20k atoms) and `STRANDS_CUTOFF=1` the three secondary structure variables take 41 ms per step
instead of 298 ms on one CPU core (6.1 ms instead of 100 ms on 32 cores). The derivatives of a segment are computed only when its switching function
is not constant. With `USEGPU` and `TYPE=DRMSD` the same calculation is done on the GPU (`ANTIBETARMSD_SCALAR_ACC` and `PARABETARMSD_SCALAR_ACC`
in the openaccPTM plugin: 1.8 ms per step for the three variables of the example above on one A100); with `USEGPU` and the other types the vectors are still used.
[ALPHARMSD](ALPHARMSD.md) is computed in the same way (`ALPHARMSD_SCALAR`, `ALPHARMSD_SCALAR_ACC`), which is about 1.7 times faster on the CPU.
`STRANDS_CUTOFF` is 1 nm by default. When the switching function goes to zero at a finite distance (as the default one now does, or with `D_MAX` in `LESS_THAN`), the single action
also skips the pairs of strands that are so far apart that their segment certainly has a distance from the reference beyond it: the result does not
change, and with `STRANDS_CUTOFF=0` ANTIBETARMSD for the 144 peptides above takes 160 ms per step on one CPU core instead of 930 ms
(with the default `STRANDS_CUTOFF=1` it takes 13 ms).
- Fixes in the collective variables:
- [DIHEDRAL_CORRELATION](DIHEDRAL_CORRELATION.md) with `ATOMS` (a single variable) crashed: the atoms were never requested.
- [CHARGE](CHARGE.md) returned the masses of the atoms instead of their charges, and an error is given when the MD code does not provide the charges.
Expand Down
5 changes: 5 additions & 0 deletions developer-doc/Migration211.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ These keywords are still read, as the keyword that replaces them, with a warning
- UPPER_WALLS and LOWER_WALLS acting on a periodic argument do not apply the periodic boundary conditions to the difference
between the argument and `AT` any more.
- `ARG=*` leaves out the values that the action cannot use (e.g. in PRINT).
- ANTIBETARMSD and PARABETARMSD use `STRANDS_CUTOFF=1` (nm) by default: the segments whose strands are further apart do not
contribute to the number of segments. Write `STRANDS_CUTOFF=0` to use all the pairs of strands as before.
- ALPHARMSD, ANTIBETARMSD and PARABETARMSD: with R_0, NN, MM and D_0 (and not LESS_THAN) the switching function is stretched to be
zero where it is 1e-5 (its D_MAX), as in the other actions that take these keywords; `LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12}`
gives the function of v2.10.
- A function of a sparse matrix that is not zero for zero arguments (e.g. CUSTOM with `FUNC=1-x` on a CONTACT_MATRIX
with `D_MAX`) stops with an error: the elements that the matrix does not store were silently taken as zero.
Give the function a `MASK` (e.g. the matrix itself) to compute it only on the stored elements, or remove `D_MAX`.
Expand Down
24 changes: 21 additions & 3 deletions plugins/openaccPTM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@ CONTACT_MATRIX GROUP=1-1000 SWITCH={EXP D_0=0.2 R_0=0.1 D_MAX=0.66} USEGPU
When PLUMED runs with MPI (e.g. an MD code with several MPI ranks), the actions with `USEGPU` are computed by rank 0 only,
on its GPU, and the results are sent to the other ranks. The other ranks do not use the GPU and wait for rank 0.

### Secondary structure

With `USEGPU` and `TYPE=DRMSD`, the number of segments that are similar to a helix or a sheet computed by [ALPHARMSD](ALPHARMSD.md),
[ANTIBETARMSD](ANTIBETARMSD.md) and [PARABETARMSD](PARABETARMSD.md) (the value, or the `lessthan` component) comes from
`ALPHARMSD_SCALAR_ACC`, `ANTIBETARMSD_SCALAR_ACC` and `PARABETARMSD_SCALAR_ACC` (`src/SecondaryStructureCount.cpp`), the GPU
version of the single action that PLUMED uses on the CPU
(`src/secondarystructure/SecondaryStructureCount.h`), with the same functions for a segment: a first kernel lists the pairs of strands
within `STRANDS_CUTOFF` (1 nm by default) and whose switching function is not certainly zero (see the documentation of
ANTIBETARMSD), one GPU thread per listed segment computes its distance from the references, the switching function
and the derivatives, which are added to the atoms with atomics, and a last kernel sums the values and the virial. The forces
need no second pass. The vectors of the expanded input are computed (on the GPU) only when another action uses them.

On one A100 (8 CPU threads), for 144 peptides of 8 residues (20160 atoms, 370800 pairs of strands, about 5000 of them
within `STRANDS_CUTOFF=1`), [ALPHARMSD](ALPHARMSD.md), ANTIBETARMSD and PARABETARMSD together take 1.8 ms per step
(6.1 ms on 32 CPU cores, 12.5 ms on 8). For a single protein,
with a few hundred residues, the CPU is faster: the time on the GPU is then set by the cost of starting the kernels and of
the transfers (about 0.3 ms per step for ALPHARMSD).

### Which GPU is used

All the actions of the plugin (SAXS and SANS included) use the same GPU as the MD code, so that they work on a node with
Expand Down Expand Up @@ -111,9 +129,9 @@ The next section contains a list of the actions that can take the USEGPU command
- ~~[QUATERNION_BOND_PRODUCT_MATRIX](QUATERNION_BOND_PRODUCT_MATRIX.md)~~ setup, but deactivated
- secondarystructure:
- [SECONDARY_STRUCTURE_DRMSD](SECONDARY_STRUCTURE_DRMSD.md), and in particular:
- [ALPHARMSD](ALPHARMSD.md) only with **TYPE=DRMSD**
- [ANTIBETARMSD](ANTIBETARMSD.md) only with **TYPE=DRMSD**
- [PARABETARMSD](PARABETARMSD.md) only with **TYPE=DRMSD**
- [ALPHARMSD](ALPHARMSD.md) only with **TYPE=DRMSD** (the number of segments: `ALPHARMSD_SCALAR_ACC`, see below)
- [ANTIBETARMSD](ANTIBETARMSD.md) only with **TYPE=DRMSD** (the number of segments: `ANTIBETARMSD_SCALAR_ACC`, see below)
- [PARABETARMSD](PARABETARMSD.md) only with **TYPE=DRMSD** (the number of segments: `PARABETARMSD_SCALAR_ACC`, see below)
- volumes:
- [AROUND](AROUND.md)
- [INCYLINDER](INCYLINDER.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#! FIELDS time a11 a23 a24_lessthan
0.000000 0.0776 0.1689 0.1689
0.050000 0.2634 0.1526 0.1526
0.100000 0.1157 0.8820 0.8820
0.150000 3.2981 0.1347 0.1347
0.200000 3.0817 0.1605 0.1605
0.250000 0.1527 0.1144 0.1144
0.300000 0.2142 0.1041 0.1041
0.350000 3.1619 0.1436 0.1436
0.400000 0.6667 0.2657 0.2657
0.450000 2.2564 0.0041 0.0041
0.500000 6.9472 0.0247 0.0247
0.550000 0.2019 0.2079 0.2079
0.000000 0.0775 0.1665 0.1666
0.050000 0.2634 0.1507 0.1508
0.100000 0.1156 0.8786 0.8787
0.150000 3.2980 0.1158 0.1158
0.200000 3.0817 0.1398 0.1399
0.250000 0.1526 0.1120 0.1121
0.300000 0.2141 0.0863 0.0863
0.350000 3.1619 0.1350 0.1351
0.400000 0.6666 0.2456 0.2457
0.450000 2.2564 0.0000 0.0000
0.500000 6.9472 0.0078 0.0078
0.550000 0.2018 0.2035 0.2036
Loading
Loading