Skip to content

Commit

Permalink
Added check for null boxes in link cells
Browse files Browse the repository at this point in the history
  • Loading branch information
GiovanniBussi committed Jan 20, 2025
1 parent c86000e commit e7a1618
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tools/LinkCells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ void LinkCells::buildCellLists( const std::vector<Vector>& pos, const std::vecto

// Must be able to check that pbcs are not nonsensical in some way?? -- GAT

double determinant = pbc.getBox().determinant();

plumed_assert(determinant > epsilon) <<"Cell lists cannot be built when passing a box with null volume. Volume is "<<determinant;

// Setup the pbc object by copying it from action
mypbc.setBox( pbc.getBox() );

Expand Down

0 comments on commit e7a1618

Please sign in to comment.