zincware / MDSuite

A post-processing engine for particle simulations
https://mdsuite.readthedocs.io/
Eclipse Public License 2.0
36 stars 7 forks source link

Database generation has less time steps than file #91

Closed Fratorhe closed 3 years ago

Fratorhe commented 3 years ago

Describe the bug When I generate the database in a per-atom configuration, the number of time-steps read is a bit smaller. In this case, I did 20.000 steps, and the database loaded 19.987. I guess it may be related to the batching because it happened only in that case and the batching took 23 steps (19.987+23=20.000)...

To Reproduce Steps to reproduce the behavior:

  1. Go to tutorials\walkthrough_notebooks\Liquid_Argon
  2. Run the LAMMPS case, a file called gk_data.lmp_traj of ~3.5Gb will be created. Running time should be ~7 min.
  3. from_traj and run the conductivity_gk.py.
  4. check the hdf5 database to see the problem.

Expected behavior Size database wrt input file is inconsistent.

Screenshots image

Desktop (please complete the following information):

Additional context Python 3.7.4

SamTov commented 3 years ago

This is usually because it gets cut by the batching, although in this case it could be something smaller. In the case of batching we would need to add some additional methods to look for excess trajectories and put them in. Perhaps @PythonFZ can discuss some TF stuff.

PythonFZ commented 3 years ago

EDIT: We should be able to use tf.data.Dataset with its batching method to generate batches with different sizes. Usually the last batch would be smaller than the batches before.

SamTov commented 3 years ago

Yes this is what I was thinking

SamTov commented 3 years ago

Sorry I did not mean to close.

SamTov commented 3 years ago

@Fratorhe please check the latest push and see if this has been solved. I did not have any good data to check this quickly.

SamTov commented 3 years ago

Can we close this issue? @Fratorhe

Fratorhe commented 3 years ago

Sorry, I am finishing with the GK thermal and viscosity. I will test it in one hour or so. I will close it if it works.

SamTov commented 3 years ago

Perfect

Fratorhe commented 3 years ago

working!!