Skip to content

Commit

Permalink
Ran astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Mar 10, 2025
1 parent 2d87a63 commit 6250d10
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
36 changes: 18 additions & 18 deletions src/adjmat/TopologyMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,56 +31,56 @@
/*
Adjacency matrix in which two atoms are adjacent if they are connected topologically
The functionality in this action was developed as part of a project that attempted to study
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
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](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
determining if the density within a cylinder that is centered on the vector connecting atoms $i$ and $j$ is
less than a certain threshold value. To make this determination we first determine whether any given atom $k$
The criterion that was developed to determine whether atom $i$ and $j$ are connected in this way works by
determining if the density within a cylinder that is centered on the vector connecting atoms $i$ and $j$ is
less than a certain threshold value. To make this determination we first determine whether any given atom $k$
is within the cylinder centered on the vector connecting atoms $i$ and $j$ by using the following expression
$$
f(\mathbf{r}_{ik}, \mathbf{r}_{ij}) = s_1\left( \sqrt{ |\mathbf{r}_{ij}|^2 - \left( \frac{\mathbf{r}_{ij} \cdot \mathbf{r}_{ik}}{|\mathbf{r}_{ij} |} \right)^2} \right)s_2\left( -\frac{\mathbf{r}_{ij} \cdot \mathbf{r}_{ik}}{|\mathbf{r}_{ij} |} \right) s_2\left( \frac{\mathbf{r}_{ij} \cdot \mathbf{r}_{ik}}{|\mathbf{r}_{ij} |} - |\mathbf{r}_{ij}| \right)
$$
In this expression $s_1$ and $s_2$ are switching functions, while $\mathbf{r}_{lm}$ is used to indicate the vector connecting atoms $l$ and $m$.
In this expression $s_1$ and $s_2$ are switching functions, while $\mathbf{r}_{lm}$ is used to indicate the vector connecting atoms $l$ and $m$.
We then calculate the density for a grid of $M$ points along the vector connecting atom $i$ and atom $j$ using and find the maximum density on this grid using:
$$
\rho_{ij} = \max_{m \in M} \left[ \frac{M}{d_\textrm{max}} \right] \sum_k f(r_{ik}, r_{ij}) \int_{(m-1)d_{\textrm{max}}/M}^{ md_{\textrm{max}} /M } \textrm{d}x \quad K\left( \frac{x - r_{ks} \cdot r_{ij} }{ | r_{ks} | }\right)
\rho_{ij} = \max_{m \in M} \left[ \frac{M}{d_\textrm{max}} \right] \sum_k f(r_{ik}, r_{ij}) \int_{(m-1)d_{\textrm{max}}/M}^{ md_{\textrm{max}} /M } \textrm{d}x \quad K\left( \frac{x - r_{ks} \cdot r_{ij} }{ | r_{ks} | }\right)
$$
where $d_\textrm{max}$ is the `D_MAX` parameter of the switching function $s_3$ that appears in the next equation, $K$ is a kernal function and $s$ is used to represent a point in space that is $d_\textrm{max}$ from atom $j$ along the vector connecting atom $j$ to atom $i$.
where $d_\textrm{max}$ is the `D_MAX` parameter of the switching function $s_3$ that appears in the next equation, $K$ is a kernal function and $s$ is used to represent a point in space that is $d_\textrm{max}$ from atom $j$ along the vector connecting atom $j$ to atom $i$.
The final value that is stored in the $i, j$ element of the output matrix is:
$$
T_{ij} = s_3(|\mathbf{r}_{ij}|)s_4(\rho_{ij})
$$
$$
where $s_3$ and $s_4$ are switching functions.
where $s_3$ and $s_4$ are switching functions.
We ended up abandoning this method and the project (if you want drive bubble formation you are probably better off adding a bias on the volume of the simulation cell).
We ended up abandoning this method and the project (if you want drive bubble formation you are probably better off adding a bias on the volume of the simulation cell).
However, if you would like to try this method an example input that uses this action would look like this:
```plumed
mat: TOPOLOGY_MATRIX ...
GROUP=1-85 BACKGROUND_ATOMS=86-210
GROUP=1-85 BACKGROUND_ATOMS=86-210
BIN_SIZE=1.02 SIGMA=0.17 KERNEL=triangular
CYLINDER_SWITCH={RATIONAL R_0=0.5 D_MAX=1.0}
SWITCH={RATIONAL D_0=30 R_0=0.5 D_MAX=32}
RADIUS={RATIONAL D_0=0.375 R_0=0.1 D_MAX=0.43}
CYLINDER_SWITCH={RATIONAL R_0=0.5 D_MAX=1.0}
SWITCH={RATIONAL D_0=30 R_0=0.5 D_MAX=32}
RADIUS={RATIONAL D_0=0.375 R_0=0.1 D_MAX=0.43}
DENSITY_THRESHOLD={RATIONAL R_0=0.1 D_MAX=0.5}
...
```
The switching functions $s_1$, $s_2$, $s_3$ and $s_4$ are specified using the `RADIUS`, `CYLINDER_SWITCH`, `SWITCH` and `DENSITY_THRESHOLD` keywords respectively.
We loop over the atoms in the group specified using the `BACKGROUND_ATOMS` keyword when looping over $k$ in the formulas above. An $85 \times 85$ matrix is output
from the method as we are determining the connectivity between the atoms specified via the `GROUP` keyword.
The switching functions $s_1$, $s_2$, $s_3$ and $s_4$ are specified using the `RADIUS`, `CYLINDER_SWITCH`, `SWITCH` and `DENSITY_THRESHOLD` keywords respectively.
We loop over the atoms in the group specified using the `BACKGROUND_ATOMS` keyword when looping over $k$ in the formulas above. An $85 \times 85$ matrix is output
from the method as we are determining the connectivity between the atoms specified via the `GROUP` keyword.
*/
//+ENDPLUMEDOC
Expand Down
2 changes: 1 addition & 1 deletion src/wham/Wham.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ wham: WHAM ARG=col TEMP=300
DUMPVECTOR ARG=wham FILE=wham_data
```
As illustrated in the example above this command is used when you have run $N$ trajectories each of which was computed by integrating a different biased Hamiltonian. The input above calculates
As illustrated in the example above this command is used when you have run $N$ trajectories each of which was computed by integrating a different biased Hamiltonian. The input above calculates
the probability of observing the set of configurations during the $N$ trajectories that we ran using the product of multinomial distributions using the formula shown below:
$$
Expand Down
2 changes: 1 addition & 1 deletion src/wham/WhamHistogram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The script above must be run with multiple replicas using the following command:
mpirun -np 4 plumed driver --mf_xtc alltraj.xtc --multi 4
````
For more details on how the weights for configurations are determined using the wham method see the documentation
For more details on how the weights for configurations are determined using the wham method see the documentation
for the [WHAM](WHAM.md) action.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/wham/WhamWeights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace wham {
Calculate and output weights for configurations using the weighted histogram analysis method.
This shortcut action allows you to calculate and output weights computed using the weighted histogram
analysis technique. The following input demonstrates how this works in practise by showing you how this
analysis technique. The following input demonstrates how this works in practise by showing you how this
action can be used to analyze the output from a series of umbrella sampling calculations.
The trajectory from each of the simulations run with the different biases should be concatenated into a
single trajectory before running the following analysis script on the concatenated trajectory using PLUMED
Expand All @@ -52,7 +52,7 @@ The script above must be run with multiple replicas using the following command:
mpirun -np 4 plumed driver --mf_xtc alltraj.xtc --multi 4
````
For more details on how the weights for configurations are determined using the wham method see the documentation
For more details on how the weights for configurations are determined using the wham method see the documentation
for the [WHAM](WHAM.md) action.
*/
Expand Down

1 comment on commit 6250d10

@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/ANGLES.tmp
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/CLUSTER_DIAMETER.tmp
Found broken examples in automatic/CLUSTER_DISTRIBUTION.tmp
Found broken examples in automatic/CLUSTER_PROPERTIES.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONTACT_MATRIX.tmp
Found broken examples in automatic/CONTACT_MATRIX_PROPER.tmp
Found broken examples in automatic/CONVERT_TO_FES.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.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/ENVIRONMENTSIMILARITY.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/HBOND_MATRIX.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/OUTPUT_CLUSTER.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/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/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.