git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14823 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -862,14 +862,20 @@ colvar::rmsd::rmsd(std::string const &conf)
|
||||
} else {
|
||||
// if not, rely on existing atom indices for the group
|
||||
atoms.create_sorted_ids();
|
||||
ref_pos.resize(atoms.size());
|
||||
}
|
||||
|
||||
ref_pos.resize(atoms.size());
|
||||
cvm::load_coords(ref_pos_file.c_str(), ref_pos, atoms.sorted_ids,
|
||||
ref_pos_col, ref_pos_col_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (ref_pos.size() != atoms.size()) {
|
||||
cvm::error("Error: found " + cvm::to_str(ref_pos.size()) +
|
||||
" reference positions; expected " + cvm::to_str(atoms.size()));
|
||||
return;
|
||||
}
|
||||
|
||||
if (atoms.b_user_defined_fit) {
|
||||
cvm::log("WARNING: explicit fitting parameters were provided for atom group \"atoms\".");
|
||||
} else {
|
||||
@ -1062,6 +1068,12 @@ colvar::eigenvector::eigenvector(std::string const &conf)
|
||||
}
|
||||
}
|
||||
|
||||
if (ref_pos.size() != atoms.size()) {
|
||||
cvm::error("Error: reference positions were not provided, or do not "
|
||||
"match the number of requested atoms.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// save for later the geometric center of the provided positions (may not be the origin)
|
||||
cvm::rvector ref_pos_center(0.0, 0.0, 0.0);
|
||||
for (size_t i = 0; i < atoms.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user