Skip to content

Commit 4916246

Browse files
also crystdistrib and EDS
1 parent 7cbd1c5 commit 4916246

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

src/crystdistrib/Quaternion.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ Quaternion::Quaternion(const ActionOptions&ao):
149149
parseFlag("NOPBC",nopbc);
150150
pbc=!nopbc;
151151

152-
unsigned mode = getModeAndSetupValues( this );
153152
requestAtoms(atoms);
154153
}
155154

@@ -267,7 +266,7 @@ void Quaternion::calculateCV( const colvar::ColvarInput<double>& cvin, ColvarOut
267266
dy[2](2,2) = 1 - fac_derivs[2][2]*vec1_comp[2];
268267
//now normalize, and we have our y vector
269268
double magy = yt.modulo();
270-
double imagy = 1/magy, magy3 = magy*magy*magy;
269+
double magy3 = magy*magy*magy;
271270
Tensor abc;
272271
for(unsigned i=0; i<3; ++i) {
273272
abc.setRow(i, yt);

src/crystdistrib/QuaternionBondProductMatrix.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class QuaternionBondProductMatrix : public ActionWithVector {
8484
public:
8585
static void registerKeywords( Keywords& keys );
8686
explicit QuaternionBondProductMatrix(const ActionOptions&);
87-
unsigned getNumberOfDerivatives();
87+
unsigned getNumberOfDerivatives() override ;
8888
void prepare() override ;
8989
void calculate() override ;
9090
void applyNonZeroRankForces( std::vector<double>& outforces ) override ;
@@ -318,12 +318,11 @@ void QuaternionBondProductMatrix::performTask( std::size_t task_index,
318318
//I hold off on normalizing because this can be done at the very end, and it
319319
// makes the derivatives with respect to 'bond' more simple
320320

321-
double wf=0,xf=0,yf=0,zf=0;
321+
double xf=0,yf=0,zf=0;
322322

323323
for(unsigned i=0; i<4; ++i) {
324324
//real part of q1*q2
325325
output.values[0] += normFac*conj[i]*quatTemp[i]*quat[i];
326-
wf+=normFac*conj[i]*quatTemp[i]*quat[i];
327326
//i component
328327
output.values[1] += normFac*pref_i[i]*quatTemp[i]*quat[(5-i)%4];
329328
xf+=normFac*pref_i[i]*quatTemp[i]*quat[(5-i)%4];

src/eds/EDS.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ class EDS : public Bias {
220220
bool b_write_restart_;
221221
bool b_lm_;
222222
bool b_virial_;
223-
bool b_update_virial_;
224223
bool b_weights_;
225224
int seed_;
226225
int update_period_;
@@ -346,7 +345,6 @@ EDS::EDS(const ActionOptions &ao) : PLUMED_BIAS_INIT(ao),
346345
max_logweight_(0.0),
347346
wsum_(0.0),
348347
value_force2_(NULL) {
349-
double temp = -1.0;
350348
bool b_mean = false;
351349
std::vector<Value *> wvalues;
352350

0 commit comments

Comments
 (0)