Skip to content

Commit

Permalink
AutoPas writes full checkpoint for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
HomesGH authored Sep 29, 2023
1 parent 93ab85c commit 845b160
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/molecules/AutoPasSimpleMolecule.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,24 @@ class AutoPasSimpleMolecule final : public MoleculeInterface, public autopas::Pa
}

void writeBinary(std::ostream& ostrm) const override {
unsigned int cid = _component->ID() + 1;
double zero = 0.0;
double one = 1.0;
ostrm.write(reinterpret_cast<const char*>(&_id), 8);
ostrm.write(reinterpret_cast<const char*>(&cid), 4);
ostrm.write(reinterpret_cast<const char*>(&(_r[0])), 8);
ostrm.write(reinterpret_cast<const char*>(&(_r[1])), 8);
ostrm.write(reinterpret_cast<const char*>(&(_r[2])), 8);
ostrm.write(reinterpret_cast<const char*>(&(_v[0])), 8);
ostrm.write(reinterpret_cast<const char*>(&(_v[1])), 8);
ostrm.write(reinterpret_cast<const char*>(&(_v[2])), 8);
ostrm.write(reinterpret_cast<const char*>(&one), 8); // qw
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // qx
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // qy
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // qz
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // Lx
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // Ly
ostrm.write(reinterpret_cast<const char*>(&zero), 8); // Lz
}

void clearFM() override {
Expand Down

0 comments on commit 845b160

Please sign in to comment.