Skip to content

Commit

Permalink
Fixed a small bug in GyrationShortcut. It was asking to use an action…
Browse files Browse the repository at this point in the history
… that doesn't exist
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Mar 31, 2024
1 parent 103d111 commit dc6095f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/colvar/GyrationShortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void GyrationShortcut::registerKeywords( Keywords& keys ) {
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");
keys.addActionNameSuffix("_FAST"); keys.needsAction("CENTER"); keys.needsAction("CONSTANT");
keys.needsAction("ONES"); keys.needsAction("MASSES"); keys.needsAction("DISTANCE");
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 Down Expand Up @@ -105,7 +105,7 @@ GyrationShortcut::GyrationShortcut(const ActionOptions& ao):
readInputLine( getShortcutLabel() + "_w: ONES SIZE=" + str_natoms );
} else if( str_weights.size()==1 && str_weights[0]=="@Masses" ) {
wflab = getShortcutLabel() + "_m";
readInputLine( getShortcutLabel() + "_m: MASSES ATOMS=" + atlist );
readInputLine( getShortcutLabel() + "_m: MASS ATOMS=" + atlist );
} else if( str_weights.size()>1 ) {
std::string vals=str_weights[0]; for(unsigned i=1; i<str_weights.size(); ++i) vals += "," + str_weights[i];
readInputLine( getShortcutLabel() + "_w: CONSTANT VALUES=" + vals ); wflab=getShortcutLabel() + "_w";
Expand Down
4 changes: 2 additions & 2 deletions src/colvar/SelectMassCharge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ unsigned SelectMassCharge::getModeAndSetupValues( ActionWithValue* av ) {
ActionAtomistic* aa=dynamic_cast<ActionAtomistic*>( av ); plumed_assert( aa );
for(unsigned i=0; i<aa->getNumberOfAtoms(); ++i) {
std::pair<std::size_t,std::size_t> p = aa->getValueIndices( aa->getAbsoluteIndex(i) );
if( av->getName()=="MASSES" && !aa->masv[p.first]->isConstant() ) constant=false;
if( av->getName()=="CHARGES" && !aa->chargev[p.first]->isConstant() ) constant=false;
if( av->getName().find("MASS")!=std::string::npos && !aa->masv[p.first]->isConstant() ) constant=false;
if( av->getName().find("CHARGE")!=std::string::npos && !aa->chargev[p.first]->isConstant() ) constant=false;
}
if( !constant ) av->error("cannot deal with non-constant " + av->getName() + " values");
(av->copyOutput(0))->setConstant();
Expand Down

1 comment on commit dc6095f

@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/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/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.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/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/MULTICOLVARDENS.tmp
Found broken examples in automatic/OUTPUT_CLUSTER.tmp
Found broken examples in automatic/PAMM.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/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.