Skip to content

Commit

Permalink
More fixes for manual
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Nov 3, 2024
1 parent 2b2eca0 commit 82f944b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/colvar/DihedralCorrelation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ If you want to calculate the dihedral correlations between multiple pairs of dih
this action you would use an input like this one shown below:
```plumed
d: DIHEDRAL_CORRELATION
d: DIHEDRAL_CORRELATION ...
ATOMS1=1,2,3,4,5,6,7,8
ATOMS2=5,6,7,8,9,10,11,12
ATOMS2=9,10,11,12,13,14,15,16
...
PRINT ARG=d FILE=colvar
```
Expand Down Expand Up @@ -132,6 +132,7 @@ DihedralCorrelation::DihedralCorrelation(const ActionOptions&ao):
parseFlag("NOPBC",nopbc);
pbc=!nopbc;

addValueWithDerivatives(); setNotPeriodic();
if(pbc) log.printf(" using periodic boundary conditions\n");
else log.printf(" without periodic boundary conditions\n");
}
Expand Down
2 changes: 1 addition & 1 deletion src/colvar/Gyration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In the above input the weights in the expressions above are set equal to the ele
approach is to use the masses of the atoms as in the input below:
```plumed
g: GYRATION ATOMS=1-5 TYPE=RADIUS USEMASS
g: GYRATION ATOMS=1-5 TYPE=RADIUS MASS_WEIGHTED
# This input is equivalent
# g: GYRATION ATOMS=1-5 TYPE=RADIUS WEIGHTS=@Masses
PRINT ARG=g FILE=colvar
Expand Down
17 changes: 11 additions & 6 deletions src/colvar/GyrationShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ void GyrationShortcut::registerKeywords( Keywords& keys ) {
keys.addFlag("MASS",false,"calculate the center of mass");
keys.addFlag("MASS_WEIGHTED",false,"set the masses of all the atoms equal to one");
keys.addFlag("UNORMALIZED",false,"do not divide by the sum of the weights");
if( keys.getDisplayName()=="GYRATION" ) keys.setValueDescription("scalar","the radius that was computed from the weights");
else if( keys.getDisplayName()=="GYRATION_TENSOR" ) keys.setValueDescription("matrix","the gyration tensor that was computed from the weights");
keys.addActionNameSuffix("_FAST"); keys.needsAction("CENTER"); keys.needsAction("CONSTANT");
if( keys.getDisplayName()=="GYRATION" ) {
keys.setValueDescription("scalar","the radius that was computed from the weights");
keys.addActionNameSuffix("_FAST");
} else if( keys.getDisplayName()=="GYRATION_TENSOR" ) keys.setValueDescription("matrix","the gyration tensor that was computed from the weights");
keys.needsAction("CENTER"); keys.needsAction("CONSTANT");
keys.needsAction("ONES"); keys.needsAction("MASS"); keys.needsAction("DISTANCE");
keys.needsAction("COVARIANCE_MATRIX"); keys.needsAction("SELECT_COMPONENTS");
keys.needsAction("SUM"); keys.needsAction("CUSTOM"); keys.needsAction("DIAGONALIZE");
Expand All @@ -102,7 +104,7 @@ GyrationShortcut::GyrationShortcut(const ActionOptions& ao):
{
bool usemass, phases; parseFlag("MASS",usemass); parseFlag("PHASES",phases);
std::vector<std::string> str_weights; parseVector("WEIGHTS",str_weights); std::string wflab;
if( !phases ) {
if( !phases && getName()=="GYRATION" ) {
if( usemass || str_weights.size()==0 || (str_weights.size()==1 && str_weights[0]=="@Masses") ) {
std::string wt_str;
if( str_weights.size()>0 ) {
Expand All @@ -121,8 +123,11 @@ GyrationShortcut::GyrationShortcut(const ActionOptions& ao):
bool nopbc; parseFlag("NOPBC",nopbc); std::string pbcstr; if(nopbc) pbcstr = " NOPBC";
std::string phasestr; if(phases) phasestr = " PHASES";
// Create the geometric center of the molecule
std::string weights_str=" WEIGHTS=" + str_weights[0];
for(unsigned i=1; i<str_weights.size(); ++i) weights_str += "," + str_weights[i];
std::string weights_str="";
if( str_weights.size()>0 ) {
weights_str=" WEIGHTS=" + str_weights[0];
for(unsigned i=1; i<str_weights.size(); ++i) weights_str += "," + str_weights[i];
}
readInputLine( getShortcutLabel() + "_cent: CENTER ATOMS=" + atlist + pbcstr + phasestr + weights_str );
if( str_weights.size()==0 ) {
wflab = getShortcutLabel() + "_w"; std::string str_natoms; Tools::convert( atoms.size(), str_natoms );
Expand Down
7 changes: 5 additions & 2 deletions src/colvar/PCARMSD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ Calculate the PCA components for a number of provided eigenvectors and an averag
Information about this method can be found in the reference papers in the bibliography below. An example input is provided below:
```plumed
#SETTINGS INPUTFILES=regtest/basic/rt64-pca/average.pdb,regtest/basic/rt64-pca/eigenvec.pdb
PCARMSD AVERAGE=regtest/basic/rt64-pca/average.pdb EIGENVECTORS=regtest/basic/rt64-pca/eigenvec.pdb
#SETTINGS INPUTFILES=regtest/trajectories/pca/average.pdb,regtest/trajectories/pca/eigenvec.pdb
PCARMSD ...
AVERAGE=regtest/trajectories/pca/average.pdb
EIGENVECTORS=regtest/trajectories/pca/eigenvec.pdb
...
```
This input performs optimal alignment at every step and reports the rmsd so you know if you are far or close from the average structure.
Expand Down
4 changes: 2 additions & 2 deletions src/pamm/PAMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ In this example I will explain in detail what the following input is computing:
MOLINFO MOLTYPE=protein STRUCTURE=regtest/pamm/rt-pamm-periodic/M1d.pdb
psi: TORSION ATOMS1=@psi-2 ATOMS2=@psi-3 ATOMS3=@psi-4
phi: TORSION ATOMS1=@phi-2 ATOMS2=@phi-3 ATOMS3=@phi-4
p: PAMM ARG=phi,psi CLUSTERS=regtest/pamm/rt-pamm-periodic/2D-testc-0.75.pammp MEAN1={COMPONENT=1} MEAN2={COMPONENT=2}
PRINT ARG=p.mean-1,p.mean-2 FILE=colvar
p: PAMM ARG=phi,psi CLUSTERS=regtest/pamm/rt-pamm-periodic/2D-testc-0.75.pammp MEAN
PRINT ARG=p-1_mean-1,p-2_mean FILE=colvar
```
The best place to start our explanation is to look at the contents of the `2D-testc-0.75.pammp` file, which you can do
Expand Down

1 comment on commit 82f944b

@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/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/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.