@@ -309,10 +309,10 @@ void AdjacencyMatrixBase::performTask( const std::string& controller, const unsi
309
309
unsigned base = 3 *getNumberOfAtoms (); for (unsigned j=0 ; j<9 ; ++j) myvals.updateIndex ( w_ind, base+j );
310
310
// And the indices for the derivatives of the row of the matrix
311
311
if ( chainContinuesAfterThisAction () ) {
312
- unsigned nmat = getConstPntrToComponent (0 )->getPositionInMatrixStash (), nmat_ind = myvals.getNumberOfMatrixRowDerivatives ( nmat );
313
- std::vector<unsigned >& matrix_indices ( myvals.getMatrixRowDerivativeIndices ( nmat ) );
314
- matrix_indices[nmat_ind+0 ]=3 *index2+0 ; matrix_indices[nmat_ind+1 ]=3 *index2+1 ; matrix_indices[nmat_ind+2 ]=3 *index2+2 ;
315
- myvals.setNumberOfMatrixRowDerivatives ( nmat, nmat_ind+3 );
312
+ unsigned nmat = getConstPntrToComponent (0 )->getPositionInMatrixStash (), nmat_ind = myvals.getNumberOfMatrixRowDerivatives ( nmat );
313
+ std::vector<unsigned >& matrix_indices ( myvals.getMatrixRowDerivativeIndices ( nmat ) );
314
+ matrix_indices[nmat_ind+0 ]=3 *index2+0 ; matrix_indices[nmat_ind+1 ]=3 *index2+1 ; matrix_indices[nmat_ind+2 ]=3 *index2+2 ;
315
+ myvals.setNumberOfMatrixRowDerivatives ( nmat, nmat_ind+3 );
316
316
}
317
317
}
318
318
@@ -355,12 +355,12 @@ void AdjacencyMatrixBase::performTask( const std::string& controller, const unsi
355
355
myvals.addDerivative ( z_index, base+2 , -atom[0 ] ); myvals.addDerivative ( z_index, base+5 , -atom[1 ] ); myvals.addDerivative ( z_index, base+8 , -atom[2 ] );
356
356
for (unsigned k=0 ; k<9 ; ++k) { myvals.updateIndex ( x_index, base+k ); myvals.updateIndex ( y_index, base+k ); myvals.updateIndex ( z_index, base+k ); }
357
357
if ( chainContinuesAfterThisAction () ) {
358
- for (unsigned k=1 ; k<4 ; ++k) {
359
- unsigned nmat = getConstPntrToComponent (k)->getPositionInMatrixStash (), nmat_ind = myvals.getNumberOfMatrixRowDerivatives ( nmat );
360
- std::vector<unsigned >& matrix_indices ( myvals.getMatrixRowDerivativeIndices ( nmat ) );
361
- matrix_indices[nmat_ind+0 ]=3 *index2+0 ; matrix_indices[nmat_ind+1 ]=3 *index2+1 ; matrix_indices[nmat_ind+2 ]=3 *index2+2 ;
362
- myvals.setNumberOfMatrixRowDerivatives ( nmat, nmat_ind+3 );
363
- }
358
+ for (unsigned k=1 ; k<4 ; ++k) {
359
+ unsigned nmat = getConstPntrToComponent (k)->getPositionInMatrixStash (), nmat_ind = myvals.getNumberOfMatrixRowDerivatives ( nmat );
360
+ std::vector<unsigned >& matrix_indices ( myvals.getMatrixRowDerivativeIndices ( nmat ) );
361
+ matrix_indices[nmat_ind+0 ]=3 *index2+0 ; matrix_indices[nmat_ind+1 ]=3 *index2+1 ; matrix_indices[nmat_ind+2 ]=3 *index2+2 ;
362
+ myvals.setNumberOfMatrixRowDerivatives ( nmat, nmat_ind+3 );
363
+ }
364
364
}
365
365
}
366
366
}
0 commit comments