Skip to content

Commit

Permalink
reset hdf5 every round on multiple hdf5s
Browse files Browse the repository at this point in the history
  • Loading branch information
barakr committed Oct 31, 2023
1 parent 11de2cc commit 36a8ac8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion include/Statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class IMPNPCTRANSPORTEXPORT Statistics : public Object {
t_sparse_3d_matrix;
typedef IMP_KERNEL_LARGE_UNORDERED_MAP< core::ParticleType,
t_sparse_3d_matrix >
// std::vector< std::vector< std::vector<int> > > >
ParticleTypeXYZDistributionMap;
ParticleTypeXYZDistributionMap particle_type_xyz_distribution_map_;
struct t_size_3d_matrix{
Expand Down
12 changes: 7 additions & 5 deletions src/Statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,11 +943,6 @@ void Statistics::update
}
}

// TODO: disable this for now
// ::npctransport_proto::Conformation *conformation =
// output.mutable_conformation();
// save_pb_conformation(get_beads(), sites_, conformation);

// save RMF for future restarts
if(!no_save_rmf_to_output){
RMF::BufferHandle buf;
Expand All @@ -963,7 +958,14 @@ void Statistics::update
std::ofstream outf(output_file_name_.c_str(), std::ios::binary);
output.SerializeToOstream(&outf);
outf.flush();

// reset HDF5 stats if having multiple HDF5s
if(get_sd()->get_is_multiple_hdf5s())
{
particle_type_zr_distribution_map_.clear();
particle_type_xyz_distribution_map_.clear();
}
}

void Statistics::reset_statistics_optimizer_states()
{
Expand Down

0 comments on commit 36a8ac8

Please sign in to comment.