Fix seg fault for gyration collective variable
This commit is contained in:
@ -621,6 +621,7 @@ colvar::gyration::gyration(std::string const &conf)
|
|||||||
} else {
|
} else {
|
||||||
atoms->b_center = true;
|
atoms->b_center = true;
|
||||||
atoms->ref_pos.assign(1, cvm::atom_pos(0.0, 0.0, 0.0));
|
atoms->ref_pos.assign(1, cvm::atom_pos(0.0, 0.0, 0.0));
|
||||||
|
atoms->fit_gradients.assign(atoms->size(), cvm::rvector(0.0, 0.0, 0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
x.type(colvarvalue::type_scalar);
|
x.type(colvarvalue::type_scalar);
|
||||||
|
|||||||
Reference in New Issue
Block a user