Merge branch 'develop' into general-triclinic

# Conflicts:
#	src/atom.cpp
This commit is contained in:
Axel Kohlmeyer
2024-02-06 19:21:50 -05:00
356 changed files with 8055 additions and 5135 deletions

View File

@ -209,8 +209,7 @@ void WriteData::write(const std::string &file)
if (me == 0) {
fp = fopen(file.c_str(),"w");
if (fp == nullptr)
error->one(FLERR,"Cannot open data file {}: {}",
file, utils::getsyserror());
error->one(FLERR,"Cannot open data file {}: {}", file, utils::getsyserror());
}
// proc 0 writes header, ntype-length arrays, force fields
@ -229,9 +228,15 @@ void WriteData::write(const std::string &file)
if (domain->triclinic_general) atom->avec->write_data_restricted_to_general();
// per atom info in Atoms and Velocities sections
// must not write velocities without tags since we cannot read them back
if (natoms) atoms();
if (natoms) velocities();
if (atom->tag_enable) {
if (natoms) velocities();
} else {
if (me == 0)
error->warning(FLERR, "Not writing Velocities section of data file without atom IDs");
}
// molecular topology info if defined
// do not write molecular topology for atom_style template